/* tslint:disable */
/* eslint-disable */
/**
 * Template prefill service
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.0.1
 * Contact: aleksey.topunov@rtlabs.ru
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// 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, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { GepsNotificationsRequest } from '../models';
// @ts-ignore
import { GepsNotificationsResponse } from '../models';
// @ts-ignore
import { NotificationByRecruitResponse } from '../models';
/**
 * TemplatePrefillServiceApi - axios parameter creator
 * @export
 */
export const TemplatePrefillServiceApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Получение списка ГЭПС`ов по гражданину (getGEPSNotificationByRecruit_V1)
         * @summary Получение списка ГЭПС`ов по гражданину
         * @param {string} recruitId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getGEPSNotificationByRecruitV1: async (recruitId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'recruitId' is not null or undefined
            assertParamExists('getGEPSNotificationByRecruitV1', 'recruitId', recruitId)
            const localVarPath = `/personal-template-prefill-service/notification/v1/{recruitId}`
                .replace(`{${"recruitId"}}`, encodeURIComponent(String(recruitId)));
            // 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;


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Получение списка ГЭПС`ов по гражданам (getGEPSNotifications_V1)
         * @summary Получение списка ГЭПС`ов по гражданам
         * @param {GepsNotificationsRequest} gepsNotificationsRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getGEPSNotificationsV1: async (gepsNotificationsRequest: GepsNotificationsRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'gepsNotificationsRequest' is not null or undefined
            assertParamExists('getGEPSNotificationsV1', 'gepsNotificationsRequest', gepsNotificationsRequest)
            const localVarPath = `/personal-template-prefill-service/notifications/v1/search`;
            // 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;


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

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

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

/**
 * TemplatePrefillServiceApi - functional programming interface
 * @export
 */
export const TemplatePrefillServiceApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = TemplatePrefillServiceApiAxiosParamCreator(configuration)
    return {
        /**
         * Получение списка ГЭПС`ов по гражданину (getGEPSNotificationByRecruit_V1)
         * @summary Получение списка ГЭПС`ов по гражданину
         * @param {string} recruitId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getGEPSNotificationByRecruitV1(recruitId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NotificationByRecruitResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getGEPSNotificationByRecruitV1(recruitId, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Получение списка ГЭПС`ов по гражданам (getGEPSNotifications_V1)
         * @summary Получение списка ГЭПС`ов по гражданам
         * @param {GepsNotificationsRequest} gepsNotificationsRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getGEPSNotificationsV1(gepsNotificationsRequest: GepsNotificationsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GepsNotificationsResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getGEPSNotificationsV1(gepsNotificationsRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
    }
};

/**
 * TemplatePrefillServiceApi - factory interface
 * @export
 */
export const TemplatePrefillServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = TemplatePrefillServiceApiFp(configuration)
    return {
        /**
         * Получение списка ГЭПС`ов по гражданину (getGEPSNotificationByRecruit_V1)
         * @summary Получение списка ГЭПС`ов по гражданину
         * @param {string} recruitId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getGEPSNotificationByRecruitV1(recruitId: string, options?: any): AxiosPromise<NotificationByRecruitResponse> {
            return localVarFp.getGEPSNotificationByRecruitV1(recruitId, options).then((request) => request(axios, basePath));
        },
        /**
         * Получение списка ГЭПС`ов по гражданам (getGEPSNotifications_V1)
         * @summary Получение списка ГЭПС`ов по гражданам
         * @param {GepsNotificationsRequest} gepsNotificationsRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getGEPSNotificationsV1(gepsNotificationsRequest: GepsNotificationsRequest, options?: any): AxiosPromise<GepsNotificationsResponse> {
            return localVarFp.getGEPSNotificationsV1(gepsNotificationsRequest, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * TemplatePrefillServiceApi - object-oriented interface
 * @export
 * @class TemplatePrefillServiceApi
 * @extends {BaseAPI}
 */
export class TemplatePrefillServiceApi extends BaseAPI {
    /**
     * Получение списка ГЭПС`ов по гражданину (getGEPSNotificationByRecruit_V1)
     * @summary Получение списка ГЭПС`ов по гражданину
     * @param {string} recruitId 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof TemplatePrefillServiceApi
     */
    public getGEPSNotificationByRecruitV1(recruitId: string, options?: AxiosRequestConfig) {
        return TemplatePrefillServiceApiFp(this.configuration).getGEPSNotificationByRecruitV1(recruitId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Получение списка ГЭПС`ов по гражданам (getGEPSNotifications_V1)
     * @summary Получение списка ГЭПС`ов по гражданам
     * @param {GepsNotificationsRequest} gepsNotificationsRequest 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof TemplatePrefillServiceApi
     */
    public getGEPSNotificationsV1(gepsNotificationsRequest: GepsNotificationsRequest, options?: AxiosRequestConfig) {
        return TemplatePrefillServiceApiFp(this.configuration).getGEPSNotificationsV1(gepsNotificationsRequest, options).then((request) => request(this.axios, this.basePath));
    }
}
