/* 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 { Benchmark } from '../models';
// @ts-ignore
import type { DeleteBenchOption } from '../models';
// @ts-ignore
import type { Esrally } from '../models';
// @ts-ignore
import type { Pgbench } from '../models';
// @ts-ignore
import type { Sysbench } from '../models';
// @ts-ignore
import type { Tpcc } from '../models';
// @ts-ignore
import type { Ycsb } from '../models';
/**
 * BenchmarkApi - axios parameter creator
 * @export
 */
export const BenchmarkApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Create an esrally benchmark task
         * @param {string} orgName name of the Org
         * @param {Esrally} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createEsrally: async (orgName: string, body: Esrally, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('createEsrally', 'orgName', orgName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createEsrally', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/benchmark/esrally`
                .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: '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,
            };
        },
        /**
         * 
         * @summary Create a pgbench benchmark task
         * @param {string} orgName name of the Org
         * @param {Pgbench} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createPgbench: async (orgName: string, body: Pgbench, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('createPgbench', 'orgName', orgName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createPgbench', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/benchmark/pgbench`
                .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: '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,
            };
        },
        /**
         * 
         * @summary Create a sysbench benchmark task
         * @param {string} orgName name of the Org
         * @param {Sysbench} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createSysbench: async (orgName: string, body: Sysbench, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('createSysbench', 'orgName', orgName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createSysbench', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/benchmark/sysbench`
                .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: '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,
            };
        },
        /**
         * 
         * @summary Create a tpcc benchmark task
         * @param {string} orgName name of the Org
         * @param {Tpcc} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createTpcc: async (orgName: string, body: Tpcc, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('createTpcc', 'orgName', orgName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createTpcc', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/benchmark/tpcc`
                .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: '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,
            };
        },
        /**
         * 
         * @summary Create a ycsb benchmark task
         * @param {string} orgName name of the Org
         * @param {Ycsb} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createYcsb: async (orgName: string, body: Ycsb, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('createYcsb', 'orgName', orgName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createYcsb', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/benchmark/ycsb`
                .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: '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,
            };
        },
        /**
         * 
         * @summary Delete benchmark tasks
         * @param {string} orgName name of the Org
         * @param {DeleteBenchOption} body ids of the benchmark
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteBenchmark: async (orgName: string, body: DeleteBenchOption, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('deleteBenchmark', 'orgName', orgName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('deleteBenchmark', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/benchmark`
                .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: '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)


    
            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,
            };
        },
        /**
         * 
         * @summary Get benchmark task info
         * @param {string} orgName name of the Org
         * @param {string} benchmarkId id of the benchmark
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getBenchmark: async (orgName: string, benchmarkId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('getBenchmark', 'orgName', orgName)
            // verify required parameter 'benchmarkId' is not null or undefined
            assertParamExists('getBenchmark', 'benchmarkId', benchmarkId)
            const localVarPath = `/api/v1/organizations/{orgName}/benchmark/{benchmarkId}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"benchmarkId"}}`, encodeURIComponent(String(benchmarkId)));
            // 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 benchmark tasks
         * @param {string} orgName name of the Org
         * @param {string} [cluster] name of the cluster
         * @param {string} [benchType] type of the benchmark
         * @param {string} [clusterID] id of the cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listBenchmark: async (orgName: string, cluster?: string, benchType?: string, clusterID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('listBenchmark', 'orgName', orgName)
            const localVarPath = `/api/v1/organizations/{orgName}/benchmark`
                .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 (cluster !== undefined) {
                localVarQueryParameter['cluster'] = cluster;
            }

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

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


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

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

/**
 * BenchmarkApi - functional programming interface
 * @export
 */
export const BenchmarkApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = BenchmarkApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Create an esrally benchmark task
         * @param {string} orgName name of the Org
         * @param {Esrally} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createEsrally(orgName: string, body: Esrally, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Benchmark>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createEsrally(orgName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BenchmarkApi.createEsrally']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Create a pgbench benchmark task
         * @param {string} orgName name of the Org
         * @param {Pgbench} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createPgbench(orgName: string, body: Pgbench, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Benchmark>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createPgbench(orgName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BenchmarkApi.createPgbench']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Create a sysbench benchmark task
         * @param {string} orgName name of the Org
         * @param {Sysbench} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createSysbench(orgName: string, body: Sysbench, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Benchmark>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createSysbench(orgName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BenchmarkApi.createSysbench']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Create a tpcc benchmark task
         * @param {string} orgName name of the Org
         * @param {Tpcc} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createTpcc(orgName: string, body: Tpcc, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Benchmark>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createTpcc(orgName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BenchmarkApi.createTpcc']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Create a ycsb benchmark task
         * @param {string} orgName name of the Org
         * @param {Ycsb} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createYcsb(orgName: string, body: Ycsb, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Benchmark>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createYcsb(orgName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BenchmarkApi.createYcsb']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Delete benchmark tasks
         * @param {string} orgName name of the Org
         * @param {DeleteBenchOption} body ids of the benchmark
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteBenchmark(orgName: string, body: DeleteBenchOption, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBenchmark(orgName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BenchmarkApi.deleteBenchmark']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Get benchmark task info
         * @param {string} orgName name of the Org
         * @param {string} benchmarkId id of the benchmark
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getBenchmark(orgName: string, benchmarkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Benchmark>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getBenchmark(orgName, benchmarkId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BenchmarkApi.getBenchmark']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary List benchmark tasks
         * @param {string} orgName name of the Org
         * @param {string} [cluster] name of the cluster
         * @param {string} [benchType] type of the benchmark
         * @param {string} [clusterID] id of the cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listBenchmark(orgName: string, cluster?: string, benchType?: string, clusterID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Benchmark>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listBenchmark(orgName, cluster, benchType, clusterID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BenchmarkApi.listBenchmark']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * BenchmarkApi - factory interface
 * @export
 */
export const BenchmarkApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = BenchmarkApiFp(configuration)
    return {
        /**
         * 
         * @summary Create an esrally benchmark task
         * @param {BenchmarkApiCreateEsrallyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createEsrally(requestParameters: BenchmarkApiCreateEsrallyRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark> {
            return localVarFp.createEsrally(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Create a pgbench benchmark task
         * @param {BenchmarkApiCreatePgbenchRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createPgbench(requestParameters: BenchmarkApiCreatePgbenchRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark> {
            return localVarFp.createPgbench(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Create a sysbench benchmark task
         * @param {BenchmarkApiCreateSysbenchRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createSysbench(requestParameters: BenchmarkApiCreateSysbenchRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark> {
            return localVarFp.createSysbench(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Create a tpcc benchmark task
         * @param {BenchmarkApiCreateTpccRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createTpcc(requestParameters: BenchmarkApiCreateTpccRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark> {
            return localVarFp.createTpcc(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Create a ycsb benchmark task
         * @param {BenchmarkApiCreateYcsbRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createYcsb(requestParameters: BenchmarkApiCreateYcsbRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark> {
            return localVarFp.createYcsb(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Delete benchmark tasks
         * @param {BenchmarkApiDeleteBenchmarkRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteBenchmark(requestParameters: BenchmarkApiDeleteBenchmarkRequest, options?: RawAxiosRequestConfig): AxiosPromise<object> {
            return localVarFp.deleteBenchmark(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Get benchmark task info
         * @param {BenchmarkApiGetBenchmarkRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getBenchmark(requestParameters: BenchmarkApiGetBenchmarkRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark> {
            return localVarFp.getBenchmark(requestParameters.orgName, requestParameters.benchmarkId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary List benchmark tasks
         * @param {BenchmarkApiListBenchmarkRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listBenchmark(requestParameters: BenchmarkApiListBenchmarkRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<Benchmark>> {
            return localVarFp.listBenchmark(requestParameters.orgName, requestParameters.cluster, requestParameters.benchType, requestParameters.clusterID, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * BenchmarkApi - interface
 * @export
 * @interface BenchmarkApi
 */
export interface BenchmarkApiInterface {
    /**
     * 
     * @summary Create an esrally benchmark task
     * @param {BenchmarkApiCreateEsrallyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApiInterface
     */
    createEsrally(requestParameters: BenchmarkApiCreateEsrallyRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark>;

    /**
     * 
     * @summary Create a pgbench benchmark task
     * @param {BenchmarkApiCreatePgbenchRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApiInterface
     */
    createPgbench(requestParameters: BenchmarkApiCreatePgbenchRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark>;

    /**
     * 
     * @summary Create a sysbench benchmark task
     * @param {BenchmarkApiCreateSysbenchRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApiInterface
     */
    createSysbench(requestParameters: BenchmarkApiCreateSysbenchRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark>;

    /**
     * 
     * @summary Create a tpcc benchmark task
     * @param {BenchmarkApiCreateTpccRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApiInterface
     */
    createTpcc(requestParameters: BenchmarkApiCreateTpccRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark>;

    /**
     * 
     * @summary Create a ycsb benchmark task
     * @param {BenchmarkApiCreateYcsbRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApiInterface
     */
    createYcsb(requestParameters: BenchmarkApiCreateYcsbRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark>;

    /**
     * 
     * @summary Delete benchmark tasks
     * @param {BenchmarkApiDeleteBenchmarkRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApiInterface
     */
    deleteBenchmark(requestParameters: BenchmarkApiDeleteBenchmarkRequest, options?: RawAxiosRequestConfig): AxiosPromise<object>;

    /**
     * 
     * @summary Get benchmark task info
     * @param {BenchmarkApiGetBenchmarkRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApiInterface
     */
    getBenchmark(requestParameters: BenchmarkApiGetBenchmarkRequest, options?: RawAxiosRequestConfig): AxiosPromise<Benchmark>;

    /**
     * 
     * @summary List benchmark tasks
     * @param {BenchmarkApiListBenchmarkRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApiInterface
     */
    listBenchmark(requestParameters: BenchmarkApiListBenchmarkRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<Benchmark>>;

}

/**
 * Request parameters for createEsrally operation in BenchmarkApi.
 * @export
 * @interface BenchmarkApiCreateEsrallyRequest
 */
export interface BenchmarkApiCreateEsrallyRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof BenchmarkApiCreateEsrally
     */
    readonly orgName: string

    /**
     * 
     * @type {Esrally}
     * @memberof BenchmarkApiCreateEsrally
     */
    readonly body: Esrally
}

/**
 * Request parameters for createPgbench operation in BenchmarkApi.
 * @export
 * @interface BenchmarkApiCreatePgbenchRequest
 */
export interface BenchmarkApiCreatePgbenchRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof BenchmarkApiCreatePgbench
     */
    readonly orgName: string

    /**
     * 
     * @type {Pgbench}
     * @memberof BenchmarkApiCreatePgbench
     */
    readonly body: Pgbench
}

/**
 * Request parameters for createSysbench operation in BenchmarkApi.
 * @export
 * @interface BenchmarkApiCreateSysbenchRequest
 */
export interface BenchmarkApiCreateSysbenchRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof BenchmarkApiCreateSysbench
     */
    readonly orgName: string

    /**
     * 
     * @type {Sysbench}
     * @memberof BenchmarkApiCreateSysbench
     */
    readonly body: Sysbench
}

/**
 * Request parameters for createTpcc operation in BenchmarkApi.
 * @export
 * @interface BenchmarkApiCreateTpccRequest
 */
export interface BenchmarkApiCreateTpccRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof BenchmarkApiCreateTpcc
     */
    readonly orgName: string

    /**
     * 
     * @type {Tpcc}
     * @memberof BenchmarkApiCreateTpcc
     */
    readonly body: Tpcc
}

/**
 * Request parameters for createYcsb operation in BenchmarkApi.
 * @export
 * @interface BenchmarkApiCreateYcsbRequest
 */
export interface BenchmarkApiCreateYcsbRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof BenchmarkApiCreateYcsb
     */
    readonly orgName: string

    /**
     * 
     * @type {Ycsb}
     * @memberof BenchmarkApiCreateYcsb
     */
    readonly body: Ycsb
}

/**
 * Request parameters for deleteBenchmark operation in BenchmarkApi.
 * @export
 * @interface BenchmarkApiDeleteBenchmarkRequest
 */
export interface BenchmarkApiDeleteBenchmarkRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof BenchmarkApiDeleteBenchmark
     */
    readonly orgName: string

    /**
     * ids of the benchmark
     * @type {DeleteBenchOption}
     * @memberof BenchmarkApiDeleteBenchmark
     */
    readonly body: DeleteBenchOption
}

/**
 * Request parameters for getBenchmark operation in BenchmarkApi.
 * @export
 * @interface BenchmarkApiGetBenchmarkRequest
 */
export interface BenchmarkApiGetBenchmarkRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof BenchmarkApiGetBenchmark
     */
    readonly orgName: string

    /**
     * id of the benchmark
     * @type {string}
     * @memberof BenchmarkApiGetBenchmark
     */
    readonly benchmarkId: string
}

/**
 * Request parameters for listBenchmark operation in BenchmarkApi.
 * @export
 * @interface BenchmarkApiListBenchmarkRequest
 */
export interface BenchmarkApiListBenchmarkRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof BenchmarkApiListBenchmark
     */
    readonly orgName: string

    /**
     * name of the cluster
     * @type {string}
     * @memberof BenchmarkApiListBenchmark
     */
    readonly cluster?: string

    /**
     * type of the benchmark
     * @type {string}
     * @memberof BenchmarkApiListBenchmark
     */
    readonly benchType?: string

    /**
     * id of the cluster
     * @type {string}
     * @memberof BenchmarkApiListBenchmark
     */
    readonly clusterID?: string
}

/**
 * BenchmarkApi - object-oriented interface
 * @export
 * @class BenchmarkApi
 * @extends {BaseAPI}
 */
export class BenchmarkApi extends BaseAPI implements BenchmarkApiInterface {
    /**
     * 
     * @summary Create an esrally benchmark task
     * @param {BenchmarkApiCreateEsrallyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApi
     */
    public createEsrally(requestParameters: BenchmarkApiCreateEsrallyRequest, options?: RawAxiosRequestConfig) {
        return BenchmarkApiFp(this.configuration).createEsrally(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Create a pgbench benchmark task
     * @param {BenchmarkApiCreatePgbenchRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApi
     */
    public createPgbench(requestParameters: BenchmarkApiCreatePgbenchRequest, options?: RawAxiosRequestConfig) {
        return BenchmarkApiFp(this.configuration).createPgbench(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Create a sysbench benchmark task
     * @param {BenchmarkApiCreateSysbenchRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApi
     */
    public createSysbench(requestParameters: BenchmarkApiCreateSysbenchRequest, options?: RawAxiosRequestConfig) {
        return BenchmarkApiFp(this.configuration).createSysbench(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Create a tpcc benchmark task
     * @param {BenchmarkApiCreateTpccRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApi
     */
    public createTpcc(requestParameters: BenchmarkApiCreateTpccRequest, options?: RawAxiosRequestConfig) {
        return BenchmarkApiFp(this.configuration).createTpcc(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Create a ycsb benchmark task
     * @param {BenchmarkApiCreateYcsbRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApi
     */
    public createYcsb(requestParameters: BenchmarkApiCreateYcsbRequest, options?: RawAxiosRequestConfig) {
        return BenchmarkApiFp(this.configuration).createYcsb(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Delete benchmark tasks
     * @param {BenchmarkApiDeleteBenchmarkRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApi
     */
    public deleteBenchmark(requestParameters: BenchmarkApiDeleteBenchmarkRequest, options?: RawAxiosRequestConfig) {
        return BenchmarkApiFp(this.configuration).deleteBenchmark(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Get benchmark task info
     * @param {BenchmarkApiGetBenchmarkRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApi
     */
    public getBenchmark(requestParameters: BenchmarkApiGetBenchmarkRequest, options?: RawAxiosRequestConfig) {
        return BenchmarkApiFp(this.configuration).getBenchmark(requestParameters.orgName, requestParameters.benchmarkId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary List benchmark tasks
     * @param {BenchmarkApiListBenchmarkRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApi
     */
    public listBenchmark(requestParameters: BenchmarkApiListBenchmarkRequest, options?: RawAxiosRequestConfig) {
        return BenchmarkApiFp(this.configuration).listBenchmark(requestParameters.orgName, requestParameters.cluster, requestParameters.benchType, requestParameters.clusterID, options).then((request) => request(this.axios, this.basePath));
    }
}

