/* 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 { AlertRule } from '../models';
// @ts-ignore
import type { AlertRuleList } from '../models';
// @ts-ignore
import type { RestoreOrgAlertRuleToDefault200Response } from '../models';
/**
 * AlertRuleApi - axios parameter creator
 * @export
 */
export const AlertRuleApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Create alert rule
         * @param {AlertRule} body 
         * @param {boolean} [disabled] disabled status
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAlertRule: async (body: AlertRule, disabled?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createAlertRule', 'body', body)
            const localVarPath = `/admin/v1/alerts/rules`;
            // 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)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Delete alert rule
         * @param {string} alertName name of the alert rule
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAlertRule: async (alertName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'alertName' is not null or undefined
            assertParamExists('deleteAlertRule', 'alertName', alertName)
            const localVarPath = `/admin/v1/alerts/rules/{alertName}`
                .replace(`{${"alertName"}}`, encodeURIComponent(String(alertName)));
            // 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 alert rule
         * @param {string} alertName name of the alert rule
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAlertRule: async (alertName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'alertName' is not null or undefined
            assertParamExists('getAlertRule', 'alertName', alertName)
            const localVarPath = `/admin/v1/alerts/rules/{alertName}`
                .replace(`{${"alertName"}}`, encodeURIComponent(String(alertName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary List alert rules
         * @param {boolean} [disabled] disabled status
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAlertRules: async (disabled?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/v1/alerts/rules`;
            // 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 (disabled !== undefined) {
                localVarQueryParameter['disabled'] = disabled;
            }


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Restores the alert rule configuration for a specific organization to the system default settings.
         * @summary Restore organization\'s alert rule configuration to defaults
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restoreOrgAlertRuleToDefault: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/v1/alerts/rules/reset`;
            // 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)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @param {AlertRule} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAlertRule: async (body: AlertRule, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'body' is not null or undefined
            assertParamExists('updateAlertRule', 'body', body)
            const localVarPath = `/admin/v1/alerts/rules`;
            // 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(body, localVarRequestOptions, configuration)

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

/**
 * AlertRuleApi - functional programming interface
 * @export
 */
export const AlertRuleApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = AlertRuleApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Create alert rule
         * @param {AlertRule} body 
         * @param {boolean} [disabled] disabled status
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAlertRule(body: AlertRule, disabled?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertRule>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createAlertRule(body, disabled, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertRuleApi.createAlertRule']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Delete alert rule
         * @param {string} alertName name of the alert rule
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteAlertRule(alertName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAlertRule(alertName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertRuleApi.deleteAlertRule']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Get alert rule
         * @param {string} alertName name of the alert rule
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getAlertRule(alertName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertRule>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getAlertRule(alertName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertRuleApi.getAlertRule']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary List alert rules
         * @param {boolean} [disabled] disabled status
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAlertRules(disabled?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertRuleList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAlertRules(disabled, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertRuleApi.listAlertRules']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Restores the alert rule configuration for a specific organization to the system default settings.
         * @summary Restore organization\'s alert rule configuration to defaults
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async restoreOrgAlertRuleToDefault(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestoreOrgAlertRuleToDefault200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.restoreOrgAlertRuleToDefault(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertRuleApi.restoreOrgAlertRuleToDefault']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @param {AlertRule} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateAlertRule(body: AlertRule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertRule>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateAlertRule(body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertRuleApi.updateAlertRule']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * AlertRuleApi - factory interface
 * @export
 */
export const AlertRuleApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = AlertRuleApiFp(configuration)
    return {
        /**
         * 
         * @summary Create alert rule
         * @param {AlertRuleApiCreateAlertRuleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAlertRule(requestParameters: AlertRuleApiCreateAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertRule> {
            return localVarFp.createAlertRule(requestParameters.body, requestParameters.disabled, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Delete alert rule
         * @param {AlertRuleApiDeleteAlertRuleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAlertRule(requestParameters: AlertRuleApiDeleteAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteAlertRule(requestParameters.alertName, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Get alert rule
         * @param {AlertRuleApiGetAlertRuleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAlertRule(requestParameters: AlertRuleApiGetAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertRule> {
            return localVarFp.getAlertRule(requestParameters.alertName, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary List alert rules
         * @param {AlertRuleApiListAlertRulesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAlertRules(requestParameters: AlertRuleApiListAlertRulesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<AlertRuleList> {
            return localVarFp.listAlertRules(requestParameters.disabled, options).then((request) => request(axios, basePath));
        },
        /**
         * Restores the alert rule configuration for a specific organization to the system default settings.
         * @summary Restore organization\'s alert rule configuration to defaults
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restoreOrgAlertRuleToDefault(options?: RawAxiosRequestConfig): AxiosPromise<RestoreOrgAlertRuleToDefault200Response> {
            return localVarFp.restoreOrgAlertRuleToDefault(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @param {AlertRuleApiUpdateAlertRuleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAlertRule(requestParameters: AlertRuleApiUpdateAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertRule> {
            return localVarFp.updateAlertRule(requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * AlertRuleApi - interface
 * @export
 * @interface AlertRuleApi
 */
export interface AlertRuleApiInterface {
    /**
     * 
     * @summary Create alert rule
     * @param {AlertRuleApiCreateAlertRuleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApiInterface
     */
    createAlertRule(requestParameters: AlertRuleApiCreateAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertRule>;

    /**
     * 
     * @summary Delete alert rule
     * @param {AlertRuleApiDeleteAlertRuleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApiInterface
     */
    deleteAlertRule(requestParameters: AlertRuleApiDeleteAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * 
     * @summary Get alert rule
     * @param {AlertRuleApiGetAlertRuleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApiInterface
     */
    getAlertRule(requestParameters: AlertRuleApiGetAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertRule>;

    /**
     * 
     * @summary List alert rules
     * @param {AlertRuleApiListAlertRulesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApiInterface
     */
    listAlertRules(requestParameters?: AlertRuleApiListAlertRulesRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertRuleList>;

    /**
     * Restores the alert rule configuration for a specific organization to the system default settings.
     * @summary Restore organization\'s alert rule configuration to defaults
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApiInterface
     */
    restoreOrgAlertRuleToDefault(options?: RawAxiosRequestConfig): AxiosPromise<RestoreOrgAlertRuleToDefault200Response>;

    /**
     * 
     * @param {AlertRuleApiUpdateAlertRuleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApiInterface
     */
    updateAlertRule(requestParameters: AlertRuleApiUpdateAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertRule>;

}

/**
 * Request parameters for createAlertRule operation in AlertRuleApi.
 * @export
 * @interface AlertRuleApiCreateAlertRuleRequest
 */
export interface AlertRuleApiCreateAlertRuleRequest {
    /**
     * 
     * @type {AlertRule}
     * @memberof AlertRuleApiCreateAlertRule
     */
    readonly body: AlertRule

    /**
     * disabled status
     * @type {boolean}
     * @memberof AlertRuleApiCreateAlertRule
     */
    readonly disabled?: boolean
}

/**
 * Request parameters for deleteAlertRule operation in AlertRuleApi.
 * @export
 * @interface AlertRuleApiDeleteAlertRuleRequest
 */
export interface AlertRuleApiDeleteAlertRuleRequest {
    /**
     * name of the alert rule
     * @type {string}
     * @memberof AlertRuleApiDeleteAlertRule
     */
    readonly alertName: string
}

/**
 * Request parameters for getAlertRule operation in AlertRuleApi.
 * @export
 * @interface AlertRuleApiGetAlertRuleRequest
 */
export interface AlertRuleApiGetAlertRuleRequest {
    /**
     * name of the alert rule
     * @type {string}
     * @memberof AlertRuleApiGetAlertRule
     */
    readonly alertName: string
}

/**
 * Request parameters for listAlertRules operation in AlertRuleApi.
 * @export
 * @interface AlertRuleApiListAlertRulesRequest
 */
export interface AlertRuleApiListAlertRulesRequest {
    /**
     * disabled status
     * @type {boolean}
     * @memberof AlertRuleApiListAlertRules
     */
    readonly disabled?: boolean
}

/**
 * Request parameters for updateAlertRule operation in AlertRuleApi.
 * @export
 * @interface AlertRuleApiUpdateAlertRuleRequest
 */
export interface AlertRuleApiUpdateAlertRuleRequest {
    /**
     * 
     * @type {AlertRule}
     * @memberof AlertRuleApiUpdateAlertRule
     */
    readonly body: AlertRule
}

/**
 * AlertRuleApi - object-oriented interface
 * @export
 * @class AlertRuleApi
 * @extends {BaseAPI}
 */
export class AlertRuleApi extends BaseAPI implements AlertRuleApiInterface {
    /**
     * 
     * @summary Create alert rule
     * @param {AlertRuleApiCreateAlertRuleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApi
     */
    public createAlertRule(requestParameters: AlertRuleApiCreateAlertRuleRequest, options?: RawAxiosRequestConfig) {
        return AlertRuleApiFp(this.configuration).createAlertRule(requestParameters.body, requestParameters.disabled, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Delete alert rule
     * @param {AlertRuleApiDeleteAlertRuleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApi
     */
    public deleteAlertRule(requestParameters: AlertRuleApiDeleteAlertRuleRequest, options?: RawAxiosRequestConfig) {
        return AlertRuleApiFp(this.configuration).deleteAlertRule(requestParameters.alertName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Get alert rule
     * @param {AlertRuleApiGetAlertRuleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApi
     */
    public getAlertRule(requestParameters: AlertRuleApiGetAlertRuleRequest, options?: RawAxiosRequestConfig) {
        return AlertRuleApiFp(this.configuration).getAlertRule(requestParameters.alertName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary List alert rules
     * @param {AlertRuleApiListAlertRulesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApi
     */
    public listAlertRules(requestParameters: AlertRuleApiListAlertRulesRequest = {}, options?: RawAxiosRequestConfig) {
        return AlertRuleApiFp(this.configuration).listAlertRules(requestParameters.disabled, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Restores the alert rule configuration for a specific organization to the system default settings.
     * @summary Restore organization\'s alert rule configuration to defaults
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApi
     */
    public restoreOrgAlertRuleToDefault(options?: RawAxiosRequestConfig) {
        return AlertRuleApiFp(this.configuration).restoreOrgAlertRuleToDefault(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @param {AlertRuleApiUpdateAlertRuleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApi
     */
    public updateAlertRule(requestParameters: AlertRuleApiUpdateAlertRuleRequest, options?: RawAxiosRequestConfig) {
        return AlertRuleApiFp(this.configuration).updateAlertRule(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}

