/* tslint:disable */
/* eslint-disable */
/**
 * Admin API
 * The Admin API is used to manage the ApeCloud platform. 
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@apecloud.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { APIErrorResponse } from '../models';
// @ts-ignore
import type { Event } from '../models';
// @ts-ignore
import type { EventFilterOptionList } from '../models';
// @ts-ignore
import type { EventFilterType } from '../models';
// @ts-ignore
import type { EventList } from '../models';
// @ts-ignore
import type { EventResultStatus } from '../models';
/**
 * EventApi - axios parameter creator
 * @export
 */
export const EventApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Retrieves detailed information about an event based on the provided Event ID.
         * @summary Query event detail by Event ID
         * @param {string} eventID Unique identifier for the event.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getEvent: async (eventID: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'eventID' is not null or undefined
            assertParamExists('getEvent', 'eventID', eventID)
            const localVarPath = `/admin/v1/events/{eventID}`
                .replace(`{${"eventID"}}`, encodeURIComponent(String(eventID)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Query available filters for event listing
         * @summary Query available filters for event listing
         * @param {EventFilterType} filterType The event filter field you want to obtain.
         * @param {string} source The event filter you want to query from a certain source.
         * @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} [resourceType] The resource type you want to obtain.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getEventFilter: async (filterType: EventFilterType, source: string, start: number, end: number, resourceType?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'filterType' is not null or undefined
            assertParamExists('getEventFilter', 'filterType', filterType)
            // verify required parameter 'source' is not null or undefined
            assertParamExists('getEventFilter', 'source', source)
            // verify required parameter 'start' is not null or undefined
            assertParamExists('getEventFilter', 'start', start)
            // verify required parameter 'end' is not null or undefined
            assertParamExists('getEventFilter', 'end', end)
            const localVarPath = `/admin/v1/eventfilter/{filterType}`
                .replace(`{${"filterType"}}`, encodeURIComponent(String(filterType)));
            // 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 (source !== undefined) {
                localVarQueryParameter['source'] = source;
            }

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

            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,
            };
        },
        /**
         * List events
         * @summary List events
         * @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 {EventResultStatus} [status] the status of the event
         * @param {string} [customQuery] Advanced query conditions, supporting all types of filterType. Such as \&quot;orgID:111 orgID:222 operatorID:333\&quot;
         * @param {number} [pageNumber] the pageNumber of the query
         * @param {number} [pageSize] the pageSize of the query
         * @param {string} [orderBy] A generic orderBy construct used to specify which field to sort by in the interface. (e.g., startTime or endTime).  The validity of this field is verified by the apiserver,  and it is not required in the YAML. 
         * @param {boolean} [sortDesc] Specifies the sorting direction. &#x60;true&#x60; for descending, &#x60;false&#x60; for ascending.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEvents: async (start: number, end: number, status?: EventResultStatus, customQuery?: string, pageNumber?: number, pageSize?: number, orderBy?: string, sortDesc?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'start' is not null or undefined
            assertParamExists('listEvents', 'start', start)
            // verify required parameter 'end' is not null or undefined
            assertParamExists('listEvents', 'end', end)
            const localVarPath = `/admin/v1/events`;
            // 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 (status !== undefined) {
                localVarQueryParameter['status'] = status;
            }

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

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

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

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

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

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List events
         * @summary List events
         * @param {string} orgName Organization Name
         * @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} [customQuery] Advanced query conditions, supporting all types of filterType. Such as \&quot;operatorID:333 operatorID:444\&quot;
         * @param {EventResultStatus} [status] the status of the event
         * @param {number} [pageNumber] the pageNumber of the query
         * @param {number} [pageSize] the pageSize of the query
         * @param {string} [orderBy] A generic orderBy construct used to specify which field to sort by in the interface. (e.g., startTime or endTime).  The validity of this field is verified by the apiserver,  and it is not required in the YAML. 
         * @param {boolean} [sortDesc] Specifies the sorting direction. &#x60;true&#x60; for descending, &#x60;false&#x60; for ascending.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOrgEvents: async (orgName: string, start: number, end: number, customQuery?: string, status?: EventResultStatus, pageNumber?: number, pageSize?: number, orderBy?: string, sortDesc?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('listOrgEvents', 'orgName', orgName)
            // verify required parameter 'start' is not null or undefined
            assertParamExists('listOrgEvents', 'start', start)
            // verify required parameter 'end' is not null or undefined
            assertParamExists('listOrgEvents', 'end', end)
            const localVarPath = `/admin/v1/organizations/{orgName}/events`
                .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 (customQuery !== undefined) {
                localVarQueryParameter['customQuery'] = customQuery;
            }

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

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

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

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

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

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

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


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

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

/**
 * EventApi - functional programming interface
 * @export
 */
export const EventApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = EventApiAxiosParamCreator(configuration)
    return {
        /**
         * Retrieves detailed information about an event based on the provided Event ID.
         * @summary Query event detail by Event ID
         * @param {string} eventID Unique identifier for the event.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getEvent(eventID: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Event>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getEvent(eventID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EventApi.getEvent']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Query available filters for event listing
         * @summary Query available filters for event listing
         * @param {EventFilterType} filterType The event filter field you want to obtain.
         * @param {string} source The event filter you want to query from a certain source.
         * @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} [resourceType] The resource type you want to obtain.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getEventFilter(filterType: EventFilterType, source: string, start: number, end: number, resourceType?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventFilterOptionList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getEventFilter(filterType, source, start, end, resourceType, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EventApi.getEventFilter']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List events
         * @summary List events
         * @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 {EventResultStatus} [status] the status of the event
         * @param {string} [customQuery] Advanced query conditions, supporting all types of filterType. Such as \&quot;orgID:111 orgID:222 operatorID:333\&quot;
         * @param {number} [pageNumber] the pageNumber of the query
         * @param {number} [pageSize] the pageSize of the query
         * @param {string} [orderBy] A generic orderBy construct used to specify which field to sort by in the interface. (e.g., startTime or endTime).  The validity of this field is verified by the apiserver,  and it is not required in the YAML. 
         * @param {boolean} [sortDesc] Specifies the sorting direction. &#x60;true&#x60; for descending, &#x60;false&#x60; for ascending.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEvents(start: number, end: number, status?: EventResultStatus, customQuery?: string, pageNumber?: number, pageSize?: number, orderBy?: string, sortDesc?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEvents(start, end, status, customQuery, pageNumber, pageSize, orderBy, sortDesc, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EventApi.listEvents']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List events
         * @summary List events
         * @param {string} orgName Organization Name
         * @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} [customQuery] Advanced query conditions, supporting all types of filterType. Such as \&quot;operatorID:333 operatorID:444\&quot;
         * @param {EventResultStatus} [status] the status of the event
         * @param {number} [pageNumber] the pageNumber of the query
         * @param {number} [pageSize] the pageSize of the query
         * @param {string} [orderBy] A generic orderBy construct used to specify which field to sort by in the interface. (e.g., startTime or endTime).  The validity of this field is verified by the apiserver,  and it is not required in the YAML. 
         * @param {boolean} [sortDesc] Specifies the sorting direction. &#x60;true&#x60; for descending, &#x60;false&#x60; for ascending.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listOrgEvents(orgName: string, start: number, end: number, customQuery?: string, status?: EventResultStatus, pageNumber?: number, pageSize?: number, orderBy?: string, sortDesc?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listOrgEvents(orgName, start, end, customQuery, status, pageNumber, pageSize, orderBy, sortDesc, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EventApi.listOrgEvents']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * EventApi - factory interface
 * @export
 */
export const EventApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = EventApiFp(configuration)
    return {
        /**
         * Retrieves detailed information about an event based on the provided Event ID.
         * @summary Query event detail by Event ID
         * @param {EventApiGetEventRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getEvent(requestParameters: EventApiGetEventRequest, options?: RawAxiosRequestConfig): AxiosPromise<Event> {
            return localVarFp.getEvent(requestParameters.eventID, options).then((request) => request(axios, basePath));
        },
        /**
         * Query available filters for event listing
         * @summary Query available filters for event listing
         * @param {EventApiGetEventFilterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getEventFilter(requestParameters: EventApiGetEventFilterRequest, options?: RawAxiosRequestConfig): AxiosPromise<EventFilterOptionList> {
            return localVarFp.getEventFilter(requestParameters.filterType, requestParameters.source, requestParameters.start, requestParameters.end, requestParameters.resourceType, options).then((request) => request(axios, basePath));
        },
        /**
         * List events
         * @summary List events
         * @param {EventApiListEventsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEvents(requestParameters: EventApiListEventsRequest, options?: RawAxiosRequestConfig): AxiosPromise<EventList> {
            return localVarFp.listEvents(requestParameters.start, requestParameters.end, requestParameters.status, requestParameters.customQuery, requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, requestParameters.sortDesc, options).then((request) => request(axios, basePath));
        },
        /**
         * List events
         * @summary List events
         * @param {EventApiListOrgEventsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOrgEvents(requestParameters: EventApiListOrgEventsRequest, options?: RawAxiosRequestConfig): AxiosPromise<EventList> {
            return localVarFp.listOrgEvents(requestParameters.orgName, requestParameters.start, requestParameters.end, requestParameters.customQuery, requestParameters.status, requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, requestParameters.sortDesc, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * EventApi - interface
 * @export
 * @interface EventApi
 */
export interface EventApiInterface {
    /**
     * Retrieves detailed information about an event based on the provided Event ID.
     * @summary Query event detail by Event ID
     * @param {EventApiGetEventRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EventApiInterface
     */
    getEvent(requestParameters: EventApiGetEventRequest, options?: RawAxiosRequestConfig): AxiosPromise<Event>;

    /**
     * Query available filters for event listing
     * @summary Query available filters for event listing
     * @param {EventApiGetEventFilterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EventApiInterface
     */
    getEventFilter(requestParameters: EventApiGetEventFilterRequest, options?: RawAxiosRequestConfig): AxiosPromise<EventFilterOptionList>;

    /**
     * List events
     * @summary List events
     * @param {EventApiListEventsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EventApiInterface
     */
    listEvents(requestParameters: EventApiListEventsRequest, options?: RawAxiosRequestConfig): AxiosPromise<EventList>;

    /**
     * List events
     * @summary List events
     * @param {EventApiListOrgEventsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EventApiInterface
     */
    listOrgEvents(requestParameters: EventApiListOrgEventsRequest, options?: RawAxiosRequestConfig): AxiosPromise<EventList>;

}

/**
 * Request parameters for getEvent operation in EventApi.
 * @export
 * @interface EventApiGetEventRequest
 */
export interface EventApiGetEventRequest {
    /**
     * Unique identifier for the event.
     * @type {string}
     * @memberof EventApiGetEvent
     */
    readonly eventID: string
}

/**
 * Request parameters for getEventFilter operation in EventApi.
 * @export
 * @interface EventApiGetEventFilterRequest
 */
export interface EventApiGetEventFilterRequest {
    /**
     * The event filter field you want to obtain.
     * @type {EventFilterType}
     * @memberof EventApiGetEventFilter
     */
    readonly filterType: EventFilterType

    /**
     * The event filter you want to query from a certain source.
     * @type {string}
     * @memberof EventApiGetEventFilter
     */
    readonly source: string

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

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

    /**
     * The resource type you want to obtain.
     * @type {string}
     * @memberof EventApiGetEventFilter
     */
    readonly resourceType?: string
}

/**
 * Request parameters for listEvents operation in EventApi.
 * @export
 * @interface EventApiListEventsRequest
 */
export interface EventApiListEventsRequest {
    /**
     * The start of the time range for the query, unit is seconds.
     * @type {number}
     * @memberof EventApiListEvents
     */
    readonly start: number

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

    /**
     * the status of the event
     * @type {EventResultStatus}
     * @memberof EventApiListEvents
     */
    readonly status?: EventResultStatus

    /**
     * Advanced query conditions, supporting all types of filterType. Such as \&quot;orgID:111 orgID:222 operatorID:333\&quot;
     * @type {string}
     * @memberof EventApiListEvents
     */
    readonly customQuery?: string

    /**
     * the pageNumber of the query
     * @type {number}
     * @memberof EventApiListEvents
     */
    readonly pageNumber?: number

    /**
     * the pageSize of the query
     * @type {number}
     * @memberof EventApiListEvents
     */
    readonly pageSize?: number

    /**
     * A generic orderBy construct used to specify which field to sort by in the interface. (e.g., startTime or endTime).  The validity of this field is verified by the apiserver,  and it is not required in the YAML. 
     * @type {string}
     * @memberof EventApiListEvents
     */
    readonly orderBy?: string

    /**
     * Specifies the sorting direction. &#x60;true&#x60; for descending, &#x60;false&#x60; for ascending.
     * @type {boolean}
     * @memberof EventApiListEvents
     */
    readonly sortDesc?: boolean
}

/**
 * Request parameters for listOrgEvents operation in EventApi.
 * @export
 * @interface EventApiListOrgEventsRequest
 */
export interface EventApiListOrgEventsRequest {
    /**
     * Organization Name
     * @type {string}
     * @memberof EventApiListOrgEvents
     */
    readonly orgName: string

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

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

    /**
     * Advanced query conditions, supporting all types of filterType. Such as \&quot;operatorID:333 operatorID:444\&quot;
     * @type {string}
     * @memberof EventApiListOrgEvents
     */
    readonly customQuery?: string

    /**
     * the status of the event
     * @type {EventResultStatus}
     * @memberof EventApiListOrgEvents
     */
    readonly status?: EventResultStatus

    /**
     * the pageNumber of the query
     * @type {number}
     * @memberof EventApiListOrgEvents
     */
    readonly pageNumber?: number

    /**
     * the pageSize of the query
     * @type {number}
     * @memberof EventApiListOrgEvents
     */
    readonly pageSize?: number

    /**
     * A generic orderBy construct used to specify which field to sort by in the interface. (e.g., startTime or endTime).  The validity of this field is verified by the apiserver,  and it is not required in the YAML. 
     * @type {string}
     * @memberof EventApiListOrgEvents
     */
    readonly orderBy?: string

    /**
     * Specifies the sorting direction. &#x60;true&#x60; for descending, &#x60;false&#x60; for ascending.
     * @type {boolean}
     * @memberof EventApiListOrgEvents
     */
    readonly sortDesc?: boolean
}

/**
 * EventApi - object-oriented interface
 * @export
 * @class EventApi
 * @extends {BaseAPI}
 */
export class EventApi extends BaseAPI implements EventApiInterface {
    /**
     * Retrieves detailed information about an event based on the provided Event ID.
     * @summary Query event detail by Event ID
     * @param {EventApiGetEventRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EventApi
     */
    public getEvent(requestParameters: EventApiGetEventRequest, options?: RawAxiosRequestConfig) {
        return EventApiFp(this.configuration).getEvent(requestParameters.eventID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Query available filters for event listing
     * @summary Query available filters for event listing
     * @param {EventApiGetEventFilterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EventApi
     */
    public getEventFilter(requestParameters: EventApiGetEventFilterRequest, options?: RawAxiosRequestConfig) {
        return EventApiFp(this.configuration).getEventFilter(requestParameters.filterType, requestParameters.source, requestParameters.start, requestParameters.end, requestParameters.resourceType, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * List events
     * @summary List events
     * @param {EventApiListEventsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EventApi
     */
    public listEvents(requestParameters: EventApiListEventsRequest, options?: RawAxiosRequestConfig) {
        return EventApiFp(this.configuration).listEvents(requestParameters.start, requestParameters.end, requestParameters.status, requestParameters.customQuery, requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, requestParameters.sortDesc, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * List events
     * @summary List events
     * @param {EventApiListOrgEventsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EventApi
     */
    public listOrgEvents(requestParameters: EventApiListOrgEventsRequest, options?: RawAxiosRequestConfig) {
        return EventApiFp(this.configuration).listOrgEvents(requestParameters.orgName, requestParameters.start, requestParameters.end, requestParameters.customQuery, requestParameters.status, requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, requestParameters.sortDesc, options).then((request) => request(this.axios, this.basePath));
    }
}

