"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.InspectionApi = exports.InspectionApiFactory = exports.InspectionApiFp = exports.InspectionApiAxiosParamCreator = 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");
/**
 * InspectionApi - axios parameter creator
 * @export
 */
const InspectionApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create inspection cron job
         * @param {AutoInspection} autoInspection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAutoInspection: async (autoInspection, options = {}) => {
            // verify required parameter 'autoInspection' is not null or undefined
            (0, common_1.assertParamExists)('createAutoInspection', 'autoInspection', autoInspection);
            const localVarPath = `/api/v1/autoInspections`;
            // 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)(autoInspection, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Create inspection script
         * @param {InspectionScript} inspectionScript
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createInspectionScript: async (inspectionScript, options = {}) => {
            // verify required parameter 'inspectionScript' is not null or undefined
            (0, common_1.assertParamExists)('createInspectionScript', 'inspectionScript', inspectionScript);
            const localVarPath = `/api/v1/inspectionScripts`;
            // 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)(inspectionScript, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary create inspection task by org
         * @param {string} orgName name of the Org
         * @param {InspectionTask} inspectionTask
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createInspectionTaskByOrg: async (orgName, inspectionTask, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createInspectionTaskByOrg', 'orgName', orgName);
            // verify required parameter 'inspectionTask' is not null or undefined
            (0, common_1.assertParamExists)('createInspectionTaskByOrg', 'inspectionTask', inspectionTask);
            const localVarPath = `/api/v1/organizations/{orgName}/inspectionTasksByOrg`
                .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)(inspectionTask, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary delete auto inspection
         * @param {string} id id of the auto inspection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAutoInspection: async (id, options = {}) => {
            // verify required parameter 'id' is not null or undefined
            (0, common_1.assertParamExists)('deleteAutoInspection', 'id', id);
            const localVarPath = `/api/v1/autoInspections/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // 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);
            (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 Delete inspection script
         * @param {string} scriptId id of the inspection script
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteInspectionScript: async (scriptId, options = {}) => {
            // verify required parameter 'scriptId' is not null or undefined
            (0, common_1.assertParamExists)('deleteInspectionScript', 'scriptId', scriptId);
            const localVarPath = `/api/v1/inspectionScripts/{scriptId}`
                .replace(`{${"scriptId"}}`, encodeURIComponent(String(scriptId)));
            // 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);
            (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 get aggregate task result
         * @param {AggregateTaskType} aggregateType the type of the aggregate task
         * @param {number} start The start of the time range for the query, unit is seconds.
         * @param {number} end The end of the time range for the query, unit is seconds.
         * @param {string} [engine] the engine of the task
         * @param {string} [resourceName] only show the result of the specific organization or environment
         * @param {AggregateTaskResultType} [resultType] result of the task
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAggregateTaskResult: async (aggregateType, start, end, engine, resourceName, resultType, options = {}) => {
            // verify required parameter 'aggregateType' is not null or undefined
            (0, common_1.assertParamExists)('getAggregateTaskResult', 'aggregateType', aggregateType);
            // verify required parameter 'start' is not null or undefined
            (0, common_1.assertParamExists)('getAggregateTaskResult', 'start', start);
            // verify required parameter 'end' is not null or undefined
            (0, common_1.assertParamExists)('getAggregateTaskResult', 'end', end);
            const localVarPath = `/api/v1/inspectionTasks/aggregate`;
            // 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 (aggregateType !== undefined) {
                localVarQueryParameter['aggregateType'] = aggregateType;
            }
            if (engine !== undefined) {
                localVarQueryParameter['engine'] = engine;
            }
            if (resourceName !== undefined) {
                localVarQueryParameter['resourceName'] = resourceName;
            }
            if (resultType !== undefined) {
                localVarQueryParameter['resultType'] = resultType;
            }
            if (start !== undefined) {
                localVarQueryParameter['start'] = start;
            }
            if (end !== undefined) {
                localVarQueryParameter['end'] = end;
            }
            (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 get auto inspection
         * @param {string} [id] id of the auto inspection
         * @param {string} [orgName] name of the Org
         * @param {string} [envName] name of the environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAutoInspection: async (id, orgName, envName, options = {}) => {
            const localVarPath = `/api/v1/autoInspection`;
            // 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 (id !== undefined) {
                localVarQueryParameter['id'] = id;
            }
            if (orgName !== undefined) {
                localVarQueryParameter['orgName'] = orgName;
            }
            if (envName !== undefined) {
                localVarQueryParameter['envName'] = envName;
            }
            (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 get inspection task by org
         * @param {string} orgName name of the Org
         * @param {string} taskId list task details if specified
         * @param {InspectionTaskFormat} [format] the format of the task
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getInspectionTaskByOrg: async (orgName, taskId, format, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getInspectionTaskByOrg', 'orgName', orgName);
            // verify required parameter 'taskId' is not null or undefined
            (0, common_1.assertParamExists)('getInspectionTaskByOrg', 'taskId', taskId);
            const localVarPath = `/api/v1/organizations/{orgName}/inspectionTasksByOrg/{taskId}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId)));
            // 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 (format !== undefined) {
                localVarQueryParameter['format'] = format;
            }
            (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 auto inspections
         * @param {AutoInspectionResourceType} resourceType type of the auto inspection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAutoInspections: async (resourceType, options = {}) => {
            // verify required parameter 'resourceType' is not null or undefined
            (0, common_1.assertParamExists)('listAutoInspections', 'resourceType', resourceType);
            const localVarPath = `/api/v1/autoInspections`;
            // 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 (resourceType !== undefined) {
                localVarQueryParameter['resourceType'] = resourceType;
            }
            (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 inspection scripts
         * @param {string} [orgNames] name of the Org, multiple orgs separated by \&#39;,\&#39;, if not provided, return all scripts
         * @param {string} [engines] query by, such as \&quot;node\&quot;/\&quot;mysql\&quot;, multiple engines separated by \&#39;,\&#39;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listInspectionScripts: async (orgNames, engines, options = {}) => {
            const localVarPath = `/api/v1/inspectionScripts`;
            // 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 (orgNames !== undefined) {
                localVarQueryParameter['orgNames'] = orgNames;
            }
            if (engines !== undefined) {
                localVarQueryParameter['engines'] = engines;
            }
            (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 inspection tasks by org
         * @param {string} orgName name of the Org
         * @param {number} start The start of the time range for the query, unit is seconds.
         * @param {number} end The end of the time range for the query, unit is seconds.
         * @param {string} [clusterId] list tasks for the specified cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listInspectionTasksByOrg: async (orgName, start, end, clusterId, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listInspectionTasksByOrg', 'orgName', orgName);
            // verify required parameter 'start' is not null or undefined
            (0, common_1.assertParamExists)('listInspectionTasksByOrg', 'start', start);
            // verify required parameter 'end' is not null or undefined
            (0, common_1.assertParamExists)('listInspectionTasksByOrg', 'end', end);
            const localVarPath = `/api/v1/organizations/{orgName}/inspectionTasksByOrg`
                .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 (clusterId !== undefined) {
                localVarQueryParameter['clusterId'] = clusterId;
            }
            if (start !== undefined) {
                localVarQueryParameter['start'] = start;
            }
            if (end !== undefined) {
                localVarQueryParameter['end'] = end;
            }
            (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 update auto inspection
         * @param {string} id id of the auto inspection
         * @param {AutoInspection} autoInspection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAutoInspection: async (id, autoInspection, options = {}) => {
            // verify required parameter 'id' is not null or undefined
            (0, common_1.assertParamExists)('updateAutoInspection', 'id', id);
            // verify required parameter 'autoInspection' is not null or undefined
            (0, common_1.assertParamExists)('updateAutoInspection', 'autoInspection', autoInspection);
            const localVarPath = `/api/v1/autoInspections/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // 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: 'PATCH' }, 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)(autoInspection, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Update inspection script
         * @param {string} scriptId id of the inspection script
         * @param {InspectionScript} inspectionScript
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateInspectionScript: async (scriptId, inspectionScript, options = {}) => {
            // verify required parameter 'scriptId' is not null or undefined
            (0, common_1.assertParamExists)('updateInspectionScript', 'scriptId', scriptId);
            // verify required parameter 'inspectionScript' is not null or undefined
            (0, common_1.assertParamExists)('updateInspectionScript', 'inspectionScript', inspectionScript);
            const localVarPath = `/api/v1/inspectionScripts/{scriptId}`
                .replace(`{${"scriptId"}}`, encodeURIComponent(String(scriptId)));
            // 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: 'PATCH' }, 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)(inspectionScript, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
exports.InspectionApiAxiosParamCreator = InspectionApiAxiosParamCreator;
/**
 * InspectionApi - functional programming interface
 * @export
 */
const InspectionApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.InspectionApiAxiosParamCreator)(configuration);
    return {
        /**
         *
         * @summary Create inspection cron job
         * @param {AutoInspection} autoInspection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAutoInspection(autoInspection, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createAutoInspection(autoInspection, 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['InspectionApi.createAutoInspection']) === 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 inspection script
         * @param {InspectionScript} inspectionScript
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createInspectionScript(inspectionScript, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createInspectionScript(inspectionScript, 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['InspectionApi.createInspectionScript']) === 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 inspection task by org
         * @param {string} orgName name of the Org
         * @param {InspectionTask} inspectionTask
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createInspectionTaskByOrg(orgName, inspectionTask, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createInspectionTaskByOrg(orgName, inspectionTask, 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['InspectionApi.createInspectionTaskByOrg']) === 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 auto inspection
         * @param {string} id id of the auto inspection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteAutoInspection(id, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAutoInspection(id, 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['InspectionApi.deleteAutoInspection']) === 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 inspection script
         * @param {string} scriptId id of the inspection script
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteInspectionScript(scriptId, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInspectionScript(scriptId, 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['InspectionApi.deleteInspectionScript']) === 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 aggregate task result
         * @param {AggregateTaskType} aggregateType the type of the aggregate task
         * @param {number} start The start of the time range for the query, unit is seconds.
         * @param {number} end The end of the time range for the query, unit is seconds.
         * @param {string} [engine] the engine of the task
         * @param {string} [resourceName] only show the result of the specific organization or environment
         * @param {AggregateTaskResultType} [resultType] result of the task
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getAggregateTaskResult(aggregateType, start, end, engine, resourceName, resultType, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getAggregateTaskResult(aggregateType, start, end, engine, resourceName, resultType, 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['InspectionApi.getAggregateTaskResult']) === 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 auto inspection
         * @param {string} [id] id of the auto inspection
         * @param {string} [orgName] name of the Org
         * @param {string} [envName] name of the environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getAutoInspection(id, orgName, envName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getAutoInspection(id, orgName, envName, 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['InspectionApi.getAutoInspection']) === 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 inspection task by org
         * @param {string} orgName name of the Org
         * @param {string} taskId list task details if specified
         * @param {InspectionTaskFormat} [format] the format of the task
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getInspectionTaskByOrg(orgName, taskId, format, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getInspectionTaskByOrg(orgName, taskId, format, 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['InspectionApi.getInspectionTaskByOrg']) === 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 auto inspections
         * @param {AutoInspectionResourceType} resourceType type of the auto inspection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAutoInspections(resourceType, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAutoInspections(resourceType, 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['InspectionApi.listAutoInspections']) === 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 inspection scripts
         * @param {string} [orgNames] name of the Org, multiple orgs separated by \&#39;,\&#39;, if not provided, return all scripts
         * @param {string} [engines] query by, such as \&quot;node\&quot;/\&quot;mysql\&quot;, multiple engines separated by \&#39;,\&#39;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listInspectionScripts(orgNames, engines, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listInspectionScripts(orgNames, engines, 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['InspectionApi.listInspectionScripts']) === 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 inspection tasks by org
         * @param {string} orgName name of the Org
         * @param {number} start The start of the time range for the query, unit is seconds.
         * @param {number} end The end of the time range for the query, unit is seconds.
         * @param {string} [clusterId] list tasks for the specified cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listInspectionTasksByOrg(orgName, start, end, clusterId, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listInspectionTasksByOrg(orgName, start, end, 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['InspectionApi.listInspectionTasksByOrg']) === 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 update auto inspection
         * @param {string} id id of the auto inspection
         * @param {AutoInspection} autoInspection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateAutoInspection(id, autoInspection, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateAutoInspection(id, autoInspection, 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['InspectionApi.updateAutoInspection']) === 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 Update inspection script
         * @param {string} scriptId id of the inspection script
         * @param {InspectionScript} inspectionScript
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateInspectionScript(scriptId, inspectionScript, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateInspectionScript(scriptId, inspectionScript, 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['InspectionApi.updateInspectionScript']) === 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.InspectionApiFp = InspectionApiFp;
/**
 * InspectionApi - factory interface
 * @export
 */
const InspectionApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.InspectionApiFp)(configuration);
    return {
        /**
         *
         * @summary Create inspection cron job
         * @param {InspectionApiCreateAutoInspectionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAutoInspection(requestParameters, options) {
            return localVarFp.createAutoInspection(requestParameters.autoInspection, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Create inspection script
         * @param {InspectionApiCreateInspectionScriptRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createInspectionScript(requestParameters, options) {
            return localVarFp.createInspectionScript(requestParameters.inspectionScript, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary create inspection task by org
         * @param {InspectionApiCreateInspectionTaskByOrgRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createInspectionTaskByOrg(requestParameters, options) {
            return localVarFp.createInspectionTaskByOrg(requestParameters.orgName, requestParameters.inspectionTask, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary delete auto inspection
         * @param {InspectionApiDeleteAutoInspectionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAutoInspection(requestParameters, options) {
            return localVarFp.deleteAutoInspection(requestParameters.id, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete inspection script
         * @param {InspectionApiDeleteInspectionScriptRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteInspectionScript(requestParameters, options) {
            return localVarFp.deleteInspectionScript(requestParameters.scriptId, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary get aggregate task result
         * @param {InspectionApiGetAggregateTaskResultRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAggregateTaskResult(requestParameters, options) {
            return localVarFp.getAggregateTaskResult(requestParameters.aggregateType, requestParameters.start, requestParameters.end, requestParameters.engine, requestParameters.resourceName, requestParameters.resultType, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary get auto inspection
         * @param {InspectionApiGetAutoInspectionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAutoInspection(requestParameters = {}, options) {
            return localVarFp.getAutoInspection(requestParameters.id, requestParameters.orgName, requestParameters.envName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary get inspection task by org
         * @param {InspectionApiGetInspectionTaskByOrgRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getInspectionTaskByOrg(requestParameters, options) {
            return localVarFp.getInspectionTaskByOrg(requestParameters.orgName, requestParameters.taskId, requestParameters.format, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary list auto inspections
         * @param {InspectionApiListAutoInspectionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAutoInspections(requestParameters, options) {
            return localVarFp.listAutoInspections(requestParameters.resourceType, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary list inspection scripts
         * @param {InspectionApiListInspectionScriptsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listInspectionScripts(requestParameters = {}, options) {
            return localVarFp.listInspectionScripts(requestParameters.orgNames, requestParameters.engines, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary list inspection tasks by org
         * @param {InspectionApiListInspectionTasksByOrgRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listInspectionTasksByOrg(requestParameters, options) {
            return localVarFp.listInspectionTasksByOrg(requestParameters.orgName, requestParameters.start, requestParameters.end, requestParameters.clusterId, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary update auto inspection
         * @param {InspectionApiUpdateAutoInspectionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAutoInspection(requestParameters, options) {
            return localVarFp.updateAutoInspection(requestParameters.id, requestParameters.autoInspection, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update inspection script
         * @param {InspectionApiUpdateInspectionScriptRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateInspectionScript(requestParameters, options) {
            return localVarFp.updateInspectionScript(requestParameters.scriptId, requestParameters.inspectionScript, options).then((request) => request(axios, basePath));
        },
    };
};
exports.InspectionApiFactory = InspectionApiFactory;
/**
 * InspectionApi - object-oriented interface
 * @export
 * @class InspectionApi
 * @extends {BaseAPI}
 */
class InspectionApi extends base_1.BaseAPI {
    /**
     *
     * @summary Create inspection cron job
     * @param {InspectionApiCreateAutoInspectionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    createAutoInspection(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).createAutoInspection(requestParameters.autoInspection, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Create inspection script
     * @param {InspectionApiCreateInspectionScriptRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    createInspectionScript(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).createInspectionScript(requestParameters.inspectionScript, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary create inspection task by org
     * @param {InspectionApiCreateInspectionTaskByOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    createInspectionTaskByOrg(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).createInspectionTaskByOrg(requestParameters.orgName, requestParameters.inspectionTask, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary delete auto inspection
     * @param {InspectionApiDeleteAutoInspectionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    deleteAutoInspection(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).deleteAutoInspection(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete inspection script
     * @param {InspectionApiDeleteInspectionScriptRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    deleteInspectionScript(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).deleteInspectionScript(requestParameters.scriptId, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary get aggregate task result
     * @param {InspectionApiGetAggregateTaskResultRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    getAggregateTaskResult(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).getAggregateTaskResult(requestParameters.aggregateType, requestParameters.start, requestParameters.end, requestParameters.engine, requestParameters.resourceName, requestParameters.resultType, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary get auto inspection
     * @param {InspectionApiGetAutoInspectionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    getAutoInspection(requestParameters = {}, options) {
        return (0, exports.InspectionApiFp)(this.configuration).getAutoInspection(requestParameters.id, requestParameters.orgName, requestParameters.envName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary get inspection task by org
     * @param {InspectionApiGetInspectionTaskByOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    getInspectionTaskByOrg(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).getInspectionTaskByOrg(requestParameters.orgName, requestParameters.taskId, requestParameters.format, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary list auto inspections
     * @param {InspectionApiListAutoInspectionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    listAutoInspections(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).listAutoInspections(requestParameters.resourceType, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary list inspection scripts
     * @param {InspectionApiListInspectionScriptsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    listInspectionScripts(requestParameters = {}, options) {
        return (0, exports.InspectionApiFp)(this.configuration).listInspectionScripts(requestParameters.orgNames, requestParameters.engines, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary list inspection tasks by org
     * @param {InspectionApiListInspectionTasksByOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    listInspectionTasksByOrg(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).listInspectionTasksByOrg(requestParameters.orgName, requestParameters.start, requestParameters.end, requestParameters.clusterId, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary update auto inspection
     * @param {InspectionApiUpdateAutoInspectionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    updateAutoInspection(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).updateAutoInspection(requestParameters.id, requestParameters.autoInspection, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update inspection script
     * @param {InspectionApiUpdateInspectionScriptRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    updateInspectionScript(requestParameters, options) {
        return (0, exports.InspectionApiFp)(this.configuration).updateInspectionScript(requestParameters.scriptId, requestParameters.inspectionScript, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.InspectionApi = InspectionApi;
//# sourceMappingURL=inspection-api.js.map