/* 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 { AlertReceiver } from '../models';
// @ts-ignore
import type { AlertReceiverCategory } from '../models';
// @ts-ignore
import type { AlertReceiverList } from '../models';
/**
 * AlertReceiverApi - axios parameter creator
 * @export
 */
export const AlertReceiverApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Create alert receiver
         * @param {string} orgName name of the Org
         * @param {AlertReceiverCategory} category alert receiver category
         * @param {AlertReceiver} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAlertReceiver: async (orgName: string, category: AlertReceiverCategory, body: AlertReceiver, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('createAlertReceiver', 'orgName', orgName)
            // verify required parameter 'category' is not null or undefined
            assertParamExists('createAlertReceiver', 'category', category)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createAlertReceiver', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/receivers`
                .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)

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


    
            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 receiver
         * @param {string} orgName name of the Org
         * @param {string} receiverId id of the alert receivers
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAlertReceiver: async (orgName: string, receiverId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('deleteAlertReceiver', 'orgName', orgName)
            // verify required parameter 'receiverId' is not null or undefined
            assertParamExists('deleteAlertReceiver', 'receiverId', receiverId)
            const localVarPath = `/api/v1/organizations/{orgName}/receivers/{receiverId}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"receiverId"}}`, encodeURIComponent(String(receiverId)));
            // 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 receiver
         * @param {string} orgName name of the Org
         * @param {string} receiverId id of the alert receivers
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAlertReceiver: async (orgName: string, receiverId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('getAlertReceiver', 'orgName', orgName)
            // verify required parameter 'receiverId' is not null or undefined
            assertParamExists('getAlertReceiver', 'receiverId', receiverId)
            const localVarPath = `/api/v1/organizations/{orgName}/receivers/{receiverId}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"receiverId"}}`, encodeURIComponent(String(receiverId)));
            // 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 receivers
         * @param {string} orgName name of the Org
         * @param {AlertReceiverCategory} [category] alert receiver category
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAlertReceivers: async (orgName: string, category?: AlertReceiverCategory, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('listAlertReceivers', 'orgName', orgName)
            const localVarPath = `/api/v1/organizations/{orgName}/receivers`
                .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 (category !== undefined) {
                localVarQueryParameter['category'] = category;
            }


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * partially update the alert receiver
         * @summary Update alert receiver
         * @param {string} orgName name of the Org
         * @param {string} receiverId id of the alert receivers
         * @param {AlertReceiver} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAlertReceiver: async (orgName: string, receiverId: string, body: AlertReceiver, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('patchAlertReceiver', 'orgName', orgName)
            // verify required parameter 'receiverId' is not null or undefined
            assertParamExists('patchAlertReceiver', 'receiverId', receiverId)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('patchAlertReceiver', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}/receivers/{receiverId}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"receiverId"}}`, encodeURIComponent(String(receiverId)));
            // 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,
            };
        },
    }
};

/**
 * AlertReceiverApi - functional programming interface
 * @export
 */
export const AlertReceiverApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = AlertReceiverApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Create alert receiver
         * @param {string} orgName name of the Org
         * @param {AlertReceiverCategory} category alert receiver category
         * @param {AlertReceiver} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAlertReceiver(orgName: string, category: AlertReceiverCategory, body: AlertReceiver, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertReceiver>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createAlertReceiver(orgName, category, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertReceiverApi.createAlertReceiver']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Delete alert receiver
         * @param {string} orgName name of the Org
         * @param {string} receiverId id of the alert receivers
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteAlertReceiver(orgName: string, receiverId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAlertReceiver(orgName, receiverId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertReceiverApi.deleteAlertReceiver']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Get alert receiver
         * @param {string} orgName name of the Org
         * @param {string} receiverId id of the alert receivers
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getAlertReceiver(orgName: string, receiverId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertReceiver>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getAlertReceiver(orgName, receiverId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertReceiverApi.getAlertReceiver']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary List alert receivers
         * @param {string} orgName name of the Org
         * @param {AlertReceiverCategory} [category] alert receiver category
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAlertReceivers(orgName: string, category?: AlertReceiverCategory, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertReceiverList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAlertReceivers(orgName, category, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertReceiverApi.listAlertReceivers']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * partially update the alert receiver
         * @summary Update alert receiver
         * @param {string} orgName name of the Org
         * @param {string} receiverId id of the alert receivers
         * @param {AlertReceiver} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchAlertReceiver(orgName: string, receiverId: string, body: AlertReceiver, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertReceiver>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchAlertReceiver(orgName, receiverId, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AlertReceiverApi.patchAlertReceiver']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * AlertReceiverApi - factory interface
 * @export
 */
export const AlertReceiverApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = AlertReceiverApiFp(configuration)
    return {
        /**
         * 
         * @summary Create alert receiver
         * @param {AlertReceiverApiCreateAlertReceiverRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAlertReceiver(requestParameters: AlertReceiverApiCreateAlertReceiverRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertReceiver> {
            return localVarFp.createAlertReceiver(requestParameters.orgName, requestParameters.category, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Delete alert receiver
         * @param {AlertReceiverApiDeleteAlertReceiverRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAlertReceiver(requestParameters: AlertReceiverApiDeleteAlertReceiverRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteAlertReceiver(requestParameters.orgName, requestParameters.receiverId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Get alert receiver
         * @param {AlertReceiverApiGetAlertReceiverRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAlertReceiver(requestParameters: AlertReceiverApiGetAlertReceiverRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertReceiver> {
            return localVarFp.getAlertReceiver(requestParameters.orgName, requestParameters.receiverId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary List alert receivers
         * @param {AlertReceiverApiListAlertReceiversRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAlertReceivers(requestParameters: AlertReceiverApiListAlertReceiversRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertReceiverList> {
            return localVarFp.listAlertReceivers(requestParameters.orgName, requestParameters.category, options).then((request) => request(axios, basePath));
        },
        /**
         * partially update the alert receiver
         * @summary Update alert receiver
         * @param {AlertReceiverApiPatchAlertReceiverRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAlertReceiver(requestParameters: AlertReceiverApiPatchAlertReceiverRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertReceiver> {
            return localVarFp.patchAlertReceiver(requestParameters.orgName, requestParameters.receiverId, requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * AlertReceiverApi - interface
 * @export
 * @interface AlertReceiverApi
 */
export interface AlertReceiverApiInterface {
    /**
     * 
     * @summary Create alert receiver
     * @param {AlertReceiverApiCreateAlertReceiverRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertReceiverApiInterface
     */
    createAlertReceiver(requestParameters: AlertReceiverApiCreateAlertReceiverRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertReceiver>;

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

    /**
     * 
     * @summary Get alert receiver
     * @param {AlertReceiverApiGetAlertReceiverRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertReceiverApiInterface
     */
    getAlertReceiver(requestParameters: AlertReceiverApiGetAlertReceiverRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertReceiver>;

    /**
     * 
     * @summary List alert receivers
     * @param {AlertReceiverApiListAlertReceiversRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertReceiverApiInterface
     */
    listAlertReceivers(requestParameters: AlertReceiverApiListAlertReceiversRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertReceiverList>;

    /**
     * partially update the alert receiver
     * @summary Update alert receiver
     * @param {AlertReceiverApiPatchAlertReceiverRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertReceiverApiInterface
     */
    patchAlertReceiver(requestParameters: AlertReceiverApiPatchAlertReceiverRequest, options?: RawAxiosRequestConfig): AxiosPromise<AlertReceiver>;

}

/**
 * Request parameters for createAlertReceiver operation in AlertReceiverApi.
 * @export
 * @interface AlertReceiverApiCreateAlertReceiverRequest
 */
export interface AlertReceiverApiCreateAlertReceiverRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof AlertReceiverApiCreateAlertReceiver
     */
    readonly orgName: string

    /**
     * alert receiver category
     * @type {AlertReceiverCategory}
     * @memberof AlertReceiverApiCreateAlertReceiver
     */
    readonly category: AlertReceiverCategory

    /**
     * 
     * @type {AlertReceiver}
     * @memberof AlertReceiverApiCreateAlertReceiver
     */
    readonly body: AlertReceiver
}

/**
 * Request parameters for deleteAlertReceiver operation in AlertReceiverApi.
 * @export
 * @interface AlertReceiverApiDeleteAlertReceiverRequest
 */
export interface AlertReceiverApiDeleteAlertReceiverRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof AlertReceiverApiDeleteAlertReceiver
     */
    readonly orgName: string

    /**
     * id of the alert receivers
     * @type {string}
     * @memberof AlertReceiverApiDeleteAlertReceiver
     */
    readonly receiverId: string
}

/**
 * Request parameters for getAlertReceiver operation in AlertReceiverApi.
 * @export
 * @interface AlertReceiverApiGetAlertReceiverRequest
 */
export interface AlertReceiverApiGetAlertReceiverRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof AlertReceiverApiGetAlertReceiver
     */
    readonly orgName: string

    /**
     * id of the alert receivers
     * @type {string}
     * @memberof AlertReceiverApiGetAlertReceiver
     */
    readonly receiverId: string
}

/**
 * Request parameters for listAlertReceivers operation in AlertReceiverApi.
 * @export
 * @interface AlertReceiverApiListAlertReceiversRequest
 */
export interface AlertReceiverApiListAlertReceiversRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof AlertReceiverApiListAlertReceivers
     */
    readonly orgName: string

    /**
     * alert receiver category
     * @type {AlertReceiverCategory}
     * @memberof AlertReceiverApiListAlertReceivers
     */
    readonly category?: AlertReceiverCategory
}

/**
 * Request parameters for patchAlertReceiver operation in AlertReceiverApi.
 * @export
 * @interface AlertReceiverApiPatchAlertReceiverRequest
 */
export interface AlertReceiverApiPatchAlertReceiverRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof AlertReceiverApiPatchAlertReceiver
     */
    readonly orgName: string

    /**
     * id of the alert receivers
     * @type {string}
     * @memberof AlertReceiverApiPatchAlertReceiver
     */
    readonly receiverId: string

    /**
     * 
     * @type {AlertReceiver}
     * @memberof AlertReceiverApiPatchAlertReceiver
     */
    readonly body: AlertReceiver
}

/**
 * AlertReceiverApi - object-oriented interface
 * @export
 * @class AlertReceiverApi
 * @extends {BaseAPI}
 */
export class AlertReceiverApi extends BaseAPI implements AlertReceiverApiInterface {
    /**
     * 
     * @summary Create alert receiver
     * @param {AlertReceiverApiCreateAlertReceiverRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertReceiverApi
     */
    public createAlertReceiver(requestParameters: AlertReceiverApiCreateAlertReceiverRequest, options?: RawAxiosRequestConfig) {
        return AlertReceiverApiFp(this.configuration).createAlertReceiver(requestParameters.orgName, requestParameters.category, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Delete alert receiver
     * @param {AlertReceiverApiDeleteAlertReceiverRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertReceiverApi
     */
    public deleteAlertReceiver(requestParameters: AlertReceiverApiDeleteAlertReceiverRequest, options?: RawAxiosRequestConfig) {
        return AlertReceiverApiFp(this.configuration).deleteAlertReceiver(requestParameters.orgName, requestParameters.receiverId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Get alert receiver
     * @param {AlertReceiverApiGetAlertReceiverRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertReceiverApi
     */
    public getAlertReceiver(requestParameters: AlertReceiverApiGetAlertReceiverRequest, options?: RawAxiosRequestConfig) {
        return AlertReceiverApiFp(this.configuration).getAlertReceiver(requestParameters.orgName, requestParameters.receiverId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary List alert receivers
     * @param {AlertReceiverApiListAlertReceiversRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertReceiverApi
     */
    public listAlertReceivers(requestParameters: AlertReceiverApiListAlertReceiversRequest, options?: RawAxiosRequestConfig) {
        return AlertReceiverApiFp(this.configuration).listAlertReceivers(requestParameters.orgName, requestParameters.category, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * partially update the alert receiver
     * @summary Update alert receiver
     * @param {AlertReceiverApiPatchAlertReceiverRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AlertReceiverApi
     */
    public patchAlertReceiver(requestParameters: AlertReceiverApiPatchAlertReceiverRequest, options?: RawAxiosRequestConfig) {
        return AlertReceiverApiFp(this.configuration).patchAlertReceiver(requestParameters.orgName, requestParameters.receiverId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}

