/* 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 { 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 {string} orgName name of the Org
         * @param {AlertRule} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAlertRule: async (orgName: string, body: AlertRule, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('createAlertRule', 'orgName', orgName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createAlertRule', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/alerts/rules`
                .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(body, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Delete alert rule
         * @param {string} orgName name of the Org
         * @param {string} alertName id of the alert rules
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAlertRule: async (orgName: string, alertName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('deleteAlertRule', 'orgName', orgName)
            // verify required parameter 'alertName' is not null or undefined
            assertParamExists('deleteAlertRule', 'alertName', alertName)
            const localVarPath = `/api/v1/organizations/{orgName}/alerts/rules/{alertName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .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,
            };
        },
        /**
         * 
         * @param {string} orgName name of the Org
         * @param {string} alertName name of the alert
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAlertRule: async (orgName: string, alertName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('getAlertRule', 'orgName', orgName)
            // verify required parameter 'alertName' is not null or undefined
            assertParamExists('getAlertRule', 'alertName', alertName)
            const localVarPath = `/api/v1/organizations/{orgName}/alerts/rules/{alertName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .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 {string} orgName name of the Org
         * @param {boolean} [disabled] disabled status
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAlertRules: async (orgName: string, disabled?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('listAlertRules', 'orgName', orgName)
            const localVarPath = `/api/v1/organizations/{orgName}/alerts/rules`
                .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 (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 {string} orgName The name of the organization.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restoreOrgAlertRuleToDefault: async (orgName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('restoreOrgAlertRuleToDefault', 'orgName', orgName)
            const localVarPath = `/api/v1/organizations/{orgName}/alerts/rules/config/restore`
                .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)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Update alert rule
         * @param {string} orgName name of the Org
         * @param {string} alertName id of the alert rules
         * @param {AlertRule} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAlertRule: async (orgName: string, alertName: string, body: AlertRule, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('updateAlertRule', 'orgName', orgName)
            // verify required parameter 'alertName' is not null or undefined
            assertParamExists('updateAlertRule', 'alertName', alertName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('updateAlertRule', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/alerts/rules/{alertName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .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: '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 {string} orgName name of the Org
         * @param {AlertRule} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAlertRule(orgName: string, body: AlertRule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertRule>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createAlertRule(orgName, body, 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} orgName name of the Org
         * @param {string} alertName id of the alert rules
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteAlertRule(orgName: string, alertName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAlertRule(orgName, 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);
        },
        /**
         * 
         * @param {string} orgName name of the Org
         * @param {string} alertName name of the alert
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getAlertRule(orgName: string, alertName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertRule>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getAlertRule(orgName, 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 {string} orgName name of the Org
         * @param {boolean} [disabled] disabled status
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAlertRules(orgName: string, disabled?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertRuleList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAlertRules(orgName, 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 {string} orgName The name of the organization.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async restoreOrgAlertRuleToDefault(orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestoreOrgAlertRuleToDefault200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.restoreOrgAlertRuleToDefault(orgName, 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);
        },
        /**
         * 
         * @summary Update alert rule
         * @param {string} orgName name of the Org
         * @param {string} alertName id of the alert rules
         * @param {AlertRule} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateAlertRule(orgName: string, alertName: string, body: AlertRule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertRule>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateAlertRule(orgName, alertName, 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.orgName, requestParameters.body, 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<object> {
            return localVarFp.deleteAlertRule(requestParameters.orgName, requestParameters.alertName, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @param {AlertRuleApiGetAlertRuleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAlertRule(requestParameters: AlertRuleApiGetAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertRule> {
            return localVarFp.getAlertRule(requestParameters.orgName, 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.orgName, 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 {AlertRuleApiRestoreOrgAlertRuleToDefaultRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restoreOrgAlertRuleToDefault(requestParameters: AlertRuleApiRestoreOrgAlertRuleToDefaultRequest, options?: RawAxiosRequestConfig): AxiosPromise<RestoreOrgAlertRuleToDefault200Response> {
            return localVarFp.restoreOrgAlertRuleToDefault(requestParameters.orgName, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Update alert rule
         * @param {AlertRuleApiUpdateAlertRuleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAlertRule(requestParameters: AlertRuleApiUpdateAlertRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertRule> {
            return localVarFp.updateAlertRule(requestParameters.orgName, requestParameters.alertName, 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<object>;

    /**
     * 
     * @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 {AlertRuleApiRestoreOrgAlertRuleToDefaultRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApiInterface
     */
    restoreOrgAlertRuleToDefault(requestParameters: AlertRuleApiRestoreOrgAlertRuleToDefaultRequest, options?: RawAxiosRequestConfig): AxiosPromise<RestoreOrgAlertRuleToDefault200Response>;

    /**
     * 
     * @summary Update alert rule
     * @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 {
    /**
     * name of the Org
     * @type {string}
     * @memberof AlertRuleApiCreateAlertRule
     */
    readonly orgName: string

    /**
     * 
     * @type {AlertRule}
     * @memberof AlertRuleApiCreateAlertRule
     */
    readonly body: AlertRule
}

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

    /**
     * id of the alert rules
     * @type {string}
     * @memberof AlertRuleApiDeleteAlertRule
     */
    readonly alertName: string
}

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

    /**
     * name of the alert
     * @type {string}
     * @memberof AlertRuleApiGetAlertRule
     */
    readonly alertName: string
}

/**
 * Request parameters for listAlertRules operation in AlertRuleApi.
 * @export
 * @interface AlertRuleApiListAlertRulesRequest
 */
export interface AlertRuleApiListAlertRulesRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof AlertRuleApiListAlertRules
     */
    readonly orgName: string

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

/**
 * Request parameters for restoreOrgAlertRuleToDefault operation in AlertRuleApi.
 * @export
 * @interface AlertRuleApiRestoreOrgAlertRuleToDefaultRequest
 */
export interface AlertRuleApiRestoreOrgAlertRuleToDefaultRequest {
    /**
     * The name of the organization.
     * @type {string}
     * @memberof AlertRuleApiRestoreOrgAlertRuleToDefault
     */
    readonly orgName: string
}

/**
 * Request parameters for updateAlertRule operation in AlertRuleApi.
 * @export
 * @interface AlertRuleApiUpdateAlertRuleRequest
 */
export interface AlertRuleApiUpdateAlertRuleRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof AlertRuleApiUpdateAlertRule
     */
    readonly orgName: string

    /**
     * id of the alert rules
     * @type {string}
     * @memberof AlertRuleApiUpdateAlertRule
     */
    readonly alertName: string

    /**
     * 
     * @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.orgName, requestParameters.body, 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.orgName, requestParameters.alertName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @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.orgName, 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.orgName, 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 {AlertRuleApiRestoreOrgAlertRuleToDefaultRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertRuleApi
     */
    public restoreOrgAlertRuleToDefault(requestParameters: AlertRuleApiRestoreOrgAlertRuleToDefaultRequest, options?: RawAxiosRequestConfig) {
        return AlertRuleApiFp(this.configuration).restoreOrgAlertRuleToDefault(requestParameters.orgName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Update alert rule
     * @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.orgName, requestParameters.alertName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}

