"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * KubeBlocks Cloud API
 * KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources.  The API is organized around REST.  Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs.  We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@apecloud.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BenchmarkApi = exports.BenchmarkApiFactory = exports.BenchmarkApiFp = exports.BenchmarkApiAxiosParamCreator = void 0;
const axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("../common");
// @ts-ignore
const base_1 = require("../base");
/**
 * BenchmarkApi - axios parameter creator
 * @export
 */
const BenchmarkApiAxiosParamCreator = function (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, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createEsrally', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Create 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, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createPgbench', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Create 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, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createSysbench', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Create 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, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createTpcc', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Create 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, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createYcsb', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary 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, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteBenchmark', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary 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, benchmarkId, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getBenchmark', 'orgName', orgName);
            // verify required parameter 'benchmarkId' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary List 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, cluster, benchType, clusterID, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (cluster !== undefined) {
                localVarQueryParameter['cluster'] = cluster;
            }
            if (benchType !== undefined) {
                localVarQueryParameter['benchType'] = benchType;
            }
            if (clusterID !== undefined) {
                localVarQueryParameter['clusterID'] = clusterID;
            }
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
exports.BenchmarkApiAxiosParamCreator = BenchmarkApiAxiosParamCreator;
/**
 * BenchmarkApi - functional programming interface
 * @export
 */
const BenchmarkApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.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, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createEsrally(orgName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BenchmarkApi.createEsrally']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Create 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, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createPgbench(orgName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BenchmarkApi.createPgbench']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Create 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, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createSysbench(orgName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BenchmarkApi.createSysbench']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Create 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, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createTpcc(orgName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BenchmarkApi.createTpcc']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Create 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, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createYcsb(orgName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BenchmarkApi.createYcsb']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Delete 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, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBenchmark(orgName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BenchmarkApi.deleteBenchmark']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Get 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, benchmarkId, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getBenchmark(orgName, benchmarkId, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BenchmarkApi.getBenchmark']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary List 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, cluster, benchType, clusterID, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listBenchmark(orgName, cluster, benchType, clusterID, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BenchmarkApi.listBenchmark']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    };
};
exports.BenchmarkApiFp = BenchmarkApiFp;
/**
 * BenchmarkApi - factory interface
 * @export
 */
const BenchmarkApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.BenchmarkApiFp)(configuration);
    return {
        /**
         *
         * @summary Create an esrally benchmark task
         * @param {BenchmarkApiCreateEsrallyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createEsrally(requestParameters, options) {
            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, options) {
            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, options) {
            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, options) {
            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, options) {
            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, options) {
            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, options) {
            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, options) {
            return localVarFp.listBenchmark(requestParameters.orgName, requestParameters.cluster, requestParameters.benchType, requestParameters.clusterID, options).then((request) => request(axios, basePath));
        },
    };
};
exports.BenchmarkApiFactory = BenchmarkApiFactory;
/**
 * BenchmarkApi - object-oriented interface
 * @export
 * @class BenchmarkApi
 * @extends {BaseAPI}
 */
class BenchmarkApi extends base_1.BaseAPI {
    /**
     *
     * @summary Create an esrally benchmark task
     * @param {BenchmarkApiCreateEsrallyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BenchmarkApi
     */
    createEsrally(requestParameters, options) {
        return (0, exports.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
     */
    createPgbench(requestParameters, options) {
        return (0, exports.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
     */
    createSysbench(requestParameters, options) {
        return (0, exports.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
     */
    createTpcc(requestParameters, options) {
        return (0, exports.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
     */
    createYcsb(requestParameters, options) {
        return (0, exports.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
     */
    deleteBenchmark(requestParameters, options) {
        return (0, exports.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
     */
    getBenchmark(requestParameters, options) {
        return (0, exports.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
     */
    listBenchmark(requestParameters, options) {
        return (0, exports.BenchmarkApiFp)(this.configuration).listBenchmark(requestParameters.orgName, requestParameters.cluster, requestParameters.benchType, requestParameters.clusterID, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.BenchmarkApi = BenchmarkApi;
//# sourceMappingURL=benchmark-api.js.map