/* tslint:disable */
/* eslint-disable */
/**
 * KubeBlocks Cloud API
 * KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources.  The API is organized around REST.  Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs.  We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. 
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@apecloud.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { APIErrorResponse } from '../models';
// @ts-ignore
import type { AggregateTaskResultList } from '../models';
// @ts-ignore
import type { AggregateTaskResultType } from '../models';
// @ts-ignore
import type { AggregateTaskType } from '../models';
// @ts-ignore
import type { AutoInspection } from '../models';
// @ts-ignore
import type { AutoInspectionResourceType } from '../models';
// @ts-ignore
import type { InspectionScript } from '../models';
// @ts-ignore
import type { InspectionTask } from '../models';
// @ts-ignore
import type { InspectionTaskFormat } from '../models';
/**
 * InspectionApi - axios parameter creator
 * @export
 */
export const InspectionApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Create inspection cron job
         * @param {AutoInspection} autoInspection 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAutoInspection: async (autoInspection: AutoInspection, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'autoInspection' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Create inspection script
         * @param {InspectionScript} inspectionScript 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createInspectionScript: async (inspectionScript: InspectionScript, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'inspectionScript' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

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

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

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

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

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


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

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

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

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

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Delete inspection script
         * @param {string} scriptId id of the inspection script
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteInspectionScript: async (scriptId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'scriptId' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @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: AggregateTaskType, start: number, end: number, engine?: string, resourceName?: string, resultType?: AggregateTaskResultType, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'aggregateType' is not null or undefined
            assertParamExists('getAggregateTaskResult', 'aggregateType', aggregateType)
            // verify required parameter 'start' is not null or undefined
            assertParamExists('getAggregateTaskResult', 'start', start)
            // verify required parameter 'end' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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

            if (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;
            }


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

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

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

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

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

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

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

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


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

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

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

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

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

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


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

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

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

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

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

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


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

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

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

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

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

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

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


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

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

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

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

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

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

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

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


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

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

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

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

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


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

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

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

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

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

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


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

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

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

/**
 * InspectionApi - functional programming interface
 * @export
 */
export const InspectionApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = InspectionApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Create inspection cron job
         * @param {AutoInspection} autoInspection 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAutoInspection(autoInspection: AutoInspection, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AutoInspection>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createAutoInspection(autoInspection, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.createAutoInspection']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Create inspection script
         * @param {InspectionScript} inspectionScript 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createInspectionScript(inspectionScript: InspectionScript, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InspectionScript>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createInspectionScript(inspectionScript, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.createInspectionScript']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, inspectionTask: InspectionTask, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createInspectionTaskByOrg(orgName, inspectionTask, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.createInspectionTaskByOrg']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAutoInspection(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.deleteAutoInspection']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInspectionScript(scriptId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.deleteInspectionScript']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: AggregateTaskType, start: number, end: number, engine?: string, resourceName?: string, resultType?: AggregateTaskResultType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AggregateTaskResultList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getAggregateTaskResult(aggregateType, start, end, engine, resourceName, resultType, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.getAggregateTaskResult']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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?: string, orgName?: string, envName?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AutoInspection>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getAutoInspection(id, orgName, envName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.getAutoInspection']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, taskId: string, format?: InspectionTaskFormat, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InspectionTask>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getInspectionTaskByOrg(orgName, taskId, format, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.getInspectionTaskByOrg']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: AutoInspectionResourceType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AutoInspection>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAutoInspections(resourceType, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.listAutoInspections']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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?: string, engines?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<InspectionScript>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listInspectionScripts(orgNames, engines, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.listInspectionScripts']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, start: number, end: number, clusterId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<InspectionTask>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listInspectionTasksByOrg(orgName, start, end, clusterId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.listInspectionTasksByOrg']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, autoInspection: AutoInspection, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AutoInspection>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateAutoInspection(id, autoInspection, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.updateAutoInspection']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, inspectionScript: InspectionScript, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InspectionScript>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateInspectionScript(scriptId, inspectionScript, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['InspectionApi.updateInspectionScript']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * InspectionApi - factory interface
 * @export
 */
export const InspectionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = InspectionApiFp(configuration)
    return {
        /**
         * 
         * @summary Create inspection cron job
         * @param {InspectionApiCreateAutoInspectionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAutoInspection(requestParameters: InspectionApiCreateAutoInspectionRequest, options?: RawAxiosRequestConfig): AxiosPromise<AutoInspection> {
            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: InspectionApiCreateInspectionScriptRequest, options?: RawAxiosRequestConfig): AxiosPromise<InspectionScript> {
            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: InspectionApiCreateInspectionTaskByOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            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: InspectionApiDeleteAutoInspectionRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            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: InspectionApiDeleteInspectionScriptRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            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: InspectionApiGetAggregateTaskResultRequest, options?: RawAxiosRequestConfig): AxiosPromise<AggregateTaskResultList> {
            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: InspectionApiGetAutoInspectionRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<AutoInspection> {
            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: InspectionApiGetInspectionTaskByOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<InspectionTask> {
            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: InspectionApiListAutoInspectionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<AutoInspection>> {
            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: InspectionApiListInspectionScriptsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Array<InspectionScript>> {
            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: InspectionApiListInspectionTasksByOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<InspectionTask>> {
            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: InspectionApiUpdateAutoInspectionRequest, options?: RawAxiosRequestConfig): AxiosPromise<AutoInspection> {
            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: InspectionApiUpdateInspectionScriptRequest, options?: RawAxiosRequestConfig): AxiosPromise<InspectionScript> {
            return localVarFp.updateInspectionScript(requestParameters.scriptId, requestParameters.inspectionScript, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * InspectionApi - interface
 * @export
 * @interface InspectionApi
 */
export interface InspectionApiInterface {
    /**
     * 
     * @summary Create inspection cron job
     * @param {InspectionApiCreateAutoInspectionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    createAutoInspection(requestParameters: InspectionApiCreateAutoInspectionRequest, options?: RawAxiosRequestConfig): AxiosPromise<AutoInspection>;

    /**
     * 
     * @summary Create inspection script
     * @param {InspectionApiCreateInspectionScriptRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    createInspectionScript(requestParameters: InspectionApiCreateInspectionScriptRequest, options?: RawAxiosRequestConfig): AxiosPromise<InspectionScript>;

    /**
     * 
     * @summary create inspection task by org
     * @param {InspectionApiCreateInspectionTaskByOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    createInspectionTaskByOrg(requestParameters: InspectionApiCreateInspectionTaskByOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * 
     * @summary delete auto inspection
     * @param {InspectionApiDeleteAutoInspectionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    deleteAutoInspection(requestParameters: InspectionApiDeleteAutoInspectionRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * 
     * @summary Delete inspection script
     * @param {InspectionApiDeleteInspectionScriptRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    deleteInspectionScript(requestParameters: InspectionApiDeleteInspectionScriptRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * 
     * @summary get aggregate task result
     * @param {InspectionApiGetAggregateTaskResultRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    getAggregateTaskResult(requestParameters: InspectionApiGetAggregateTaskResultRequest, options?: RawAxiosRequestConfig): AxiosPromise<AggregateTaskResultList>;

    /**
     * 
     * @summary get auto inspection
     * @param {InspectionApiGetAutoInspectionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    getAutoInspection(requestParameters?: InspectionApiGetAutoInspectionRequest, options?: RawAxiosRequestConfig): AxiosPromise<AutoInspection>;

    /**
     * 
     * @summary get inspection task by org
     * @param {InspectionApiGetInspectionTaskByOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    getInspectionTaskByOrg(requestParameters: InspectionApiGetInspectionTaskByOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<InspectionTask>;

    /**
     * 
     * @summary list auto inspections
     * @param {InspectionApiListAutoInspectionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    listAutoInspections(requestParameters: InspectionApiListAutoInspectionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<AutoInspection>>;

    /**
     * 
     * @summary list inspection scripts
     * @param {InspectionApiListInspectionScriptsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    listInspectionScripts(requestParameters?: InspectionApiListInspectionScriptsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<InspectionScript>>;

    /**
     * 
     * @summary list inspection tasks by org
     * @param {InspectionApiListInspectionTasksByOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    listInspectionTasksByOrg(requestParameters: InspectionApiListInspectionTasksByOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<InspectionTask>>;

    /**
     * 
     * @summary update auto inspection
     * @param {InspectionApiUpdateAutoInspectionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    updateAutoInspection(requestParameters: InspectionApiUpdateAutoInspectionRequest, options?: RawAxiosRequestConfig): AxiosPromise<AutoInspection>;

    /**
     * 
     * @summary Update inspection script
     * @param {InspectionApiUpdateInspectionScriptRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApiInterface
     */
    updateInspectionScript(requestParameters: InspectionApiUpdateInspectionScriptRequest, options?: RawAxiosRequestConfig): AxiosPromise<InspectionScript>;

}

/**
 * Request parameters for createAutoInspection operation in InspectionApi.
 * @export
 * @interface InspectionApiCreateAutoInspectionRequest
 */
export interface InspectionApiCreateAutoInspectionRequest {
    /**
     * 
     * @type {AutoInspection}
     * @memberof InspectionApiCreateAutoInspection
     */
    readonly autoInspection: AutoInspection
}

/**
 * Request parameters for createInspectionScript operation in InspectionApi.
 * @export
 * @interface InspectionApiCreateInspectionScriptRequest
 */
export interface InspectionApiCreateInspectionScriptRequest {
    /**
     * 
     * @type {InspectionScript}
     * @memberof InspectionApiCreateInspectionScript
     */
    readonly inspectionScript: InspectionScript
}

/**
 * Request parameters for createInspectionTaskByOrg operation in InspectionApi.
 * @export
 * @interface InspectionApiCreateInspectionTaskByOrgRequest
 */
export interface InspectionApiCreateInspectionTaskByOrgRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof InspectionApiCreateInspectionTaskByOrg
     */
    readonly orgName: string

    /**
     * 
     * @type {InspectionTask}
     * @memberof InspectionApiCreateInspectionTaskByOrg
     */
    readonly inspectionTask: InspectionTask
}

/**
 * Request parameters for deleteAutoInspection operation in InspectionApi.
 * @export
 * @interface InspectionApiDeleteAutoInspectionRequest
 */
export interface InspectionApiDeleteAutoInspectionRequest {
    /**
     * id of the auto inspection
     * @type {string}
     * @memberof InspectionApiDeleteAutoInspection
     */
    readonly id: string
}

/**
 * Request parameters for deleteInspectionScript operation in InspectionApi.
 * @export
 * @interface InspectionApiDeleteInspectionScriptRequest
 */
export interface InspectionApiDeleteInspectionScriptRequest {
    /**
     * id of the inspection script
     * @type {string}
     * @memberof InspectionApiDeleteInspectionScript
     */
    readonly scriptId: string
}

/**
 * Request parameters for getAggregateTaskResult operation in InspectionApi.
 * @export
 * @interface InspectionApiGetAggregateTaskResultRequest
 */
export interface InspectionApiGetAggregateTaskResultRequest {
    /**
     * the type of the aggregate task
     * @type {AggregateTaskType}
     * @memberof InspectionApiGetAggregateTaskResult
     */
    readonly aggregateType: AggregateTaskType

    /**
     * The start of the time range for the query, unit is seconds.
     * @type {number}
     * @memberof InspectionApiGetAggregateTaskResult
     */
    readonly start: number

    /**
     * The end of the time range for the query, unit is seconds.
     * @type {number}
     * @memberof InspectionApiGetAggregateTaskResult
     */
    readonly end: number

    /**
     * the engine of the task
     * @type {string}
     * @memberof InspectionApiGetAggregateTaskResult
     */
    readonly engine?: string

    /**
     * only show the result of the specific organization or environment
     * @type {string}
     * @memberof InspectionApiGetAggregateTaskResult
     */
    readonly resourceName?: string

    /**
     * result of the task
     * @type {AggregateTaskResultType}
     * @memberof InspectionApiGetAggregateTaskResult
     */
    readonly resultType?: AggregateTaskResultType
}

/**
 * Request parameters for getAutoInspection operation in InspectionApi.
 * @export
 * @interface InspectionApiGetAutoInspectionRequest
 */
export interface InspectionApiGetAutoInspectionRequest {
    /**
     * id of the auto inspection
     * @type {string}
     * @memberof InspectionApiGetAutoInspection
     */
    readonly id?: string

    /**
     * name of the Org
     * @type {string}
     * @memberof InspectionApiGetAutoInspection
     */
    readonly orgName?: string

    /**
     * name of the environment
     * @type {string}
     * @memberof InspectionApiGetAutoInspection
     */
    readonly envName?: string
}

/**
 * Request parameters for getInspectionTaskByOrg operation in InspectionApi.
 * @export
 * @interface InspectionApiGetInspectionTaskByOrgRequest
 */
export interface InspectionApiGetInspectionTaskByOrgRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof InspectionApiGetInspectionTaskByOrg
     */
    readonly orgName: string

    /**
     * list task details if specified
     * @type {string}
     * @memberof InspectionApiGetInspectionTaskByOrg
     */
    readonly taskId: string

    /**
     * the format of the task
     * @type {InspectionTaskFormat}
     * @memberof InspectionApiGetInspectionTaskByOrg
     */
    readonly format?: InspectionTaskFormat
}

/**
 * Request parameters for listAutoInspections operation in InspectionApi.
 * @export
 * @interface InspectionApiListAutoInspectionsRequest
 */
export interface InspectionApiListAutoInspectionsRequest {
    /**
     * type of the auto inspection
     * @type {AutoInspectionResourceType}
     * @memberof InspectionApiListAutoInspections
     */
    readonly resourceType: AutoInspectionResourceType
}

/**
 * Request parameters for listInspectionScripts operation in InspectionApi.
 * @export
 * @interface InspectionApiListInspectionScriptsRequest
 */
export interface InspectionApiListInspectionScriptsRequest {
    /**
     * name of the Org, multiple orgs separated by \&#39;,\&#39;, if not provided, return all scripts
     * @type {string}
     * @memberof InspectionApiListInspectionScripts
     */
    readonly orgNames?: string

    /**
     * query by, such as \&quot;node\&quot;/\&quot;mysql\&quot;, multiple engines separated by \&#39;,\&#39;
     * @type {string}
     * @memberof InspectionApiListInspectionScripts
     */
    readonly engines?: string
}

/**
 * Request parameters for listInspectionTasksByOrg operation in InspectionApi.
 * @export
 * @interface InspectionApiListInspectionTasksByOrgRequest
 */
export interface InspectionApiListInspectionTasksByOrgRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof InspectionApiListInspectionTasksByOrg
     */
    readonly orgName: string

    /**
     * The start of the time range for the query, unit is seconds.
     * @type {number}
     * @memberof InspectionApiListInspectionTasksByOrg
     */
    readonly start: number

    /**
     * The end of the time range for the query, unit is seconds.
     * @type {number}
     * @memberof InspectionApiListInspectionTasksByOrg
     */
    readonly end: number

    /**
     * list tasks for the specified cluster
     * @type {string}
     * @memberof InspectionApiListInspectionTasksByOrg
     */
    readonly clusterId?: string
}

/**
 * Request parameters for updateAutoInspection operation in InspectionApi.
 * @export
 * @interface InspectionApiUpdateAutoInspectionRequest
 */
export interface InspectionApiUpdateAutoInspectionRequest {
    /**
     * id of the auto inspection
     * @type {string}
     * @memberof InspectionApiUpdateAutoInspection
     */
    readonly id: string

    /**
     * 
     * @type {AutoInspection}
     * @memberof InspectionApiUpdateAutoInspection
     */
    readonly autoInspection: AutoInspection
}

/**
 * Request parameters for updateInspectionScript operation in InspectionApi.
 * @export
 * @interface InspectionApiUpdateInspectionScriptRequest
 */
export interface InspectionApiUpdateInspectionScriptRequest {
    /**
     * id of the inspection script
     * @type {string}
     * @memberof InspectionApiUpdateInspectionScript
     */
    readonly scriptId: string

    /**
     * 
     * @type {InspectionScript}
     * @memberof InspectionApiUpdateInspectionScript
     */
    readonly inspectionScript: InspectionScript
}

/**
 * InspectionApi - object-oriented interface
 * @export
 * @class InspectionApi
 * @extends {BaseAPI}
 */
export class InspectionApi extends BaseAPI implements InspectionApiInterface {
    /**
     * 
     * @summary Create inspection cron job
     * @param {InspectionApiCreateAutoInspectionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof InspectionApi
     */
    public createAutoInspection(requestParameters: InspectionApiCreateAutoInspectionRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public createInspectionScript(requestParameters: InspectionApiCreateInspectionScriptRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public createInspectionTaskByOrg(requestParameters: InspectionApiCreateInspectionTaskByOrgRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public deleteAutoInspection(requestParameters: InspectionApiDeleteAutoInspectionRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public deleteInspectionScript(requestParameters: InspectionApiDeleteInspectionScriptRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public getAggregateTaskResult(requestParameters: InspectionApiGetAggregateTaskResultRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public getAutoInspection(requestParameters: InspectionApiGetAutoInspectionRequest = {}, options?: RawAxiosRequestConfig) {
        return 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
     */
    public getInspectionTaskByOrg(requestParameters: InspectionApiGetInspectionTaskByOrgRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listAutoInspections(requestParameters: InspectionApiListAutoInspectionsRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listInspectionScripts(requestParameters: InspectionApiListInspectionScriptsRequest = {}, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listInspectionTasksByOrg(requestParameters: InspectionApiListInspectionTasksByOrgRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public updateAutoInspection(requestParameters: InspectionApiUpdateAutoInspectionRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public updateInspectionScript(requestParameters: InspectionApiUpdateInspectionScriptRequest, options?: RawAxiosRequestConfig) {
        return InspectionApiFp(this.configuration).updateInspectionScript(requestParameters.scriptId, requestParameters.inspectionScript, options).then((request) => request(this.axios, this.basePath));
    }
}

