/* tslint:disable */
/* eslint-disable */
/**
 * ERVU services
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.0.1
 * Contact: yu.mironov@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 { GetExtractsV3Request } from '../models';
// @ts-ignore
import { GetFileUpload } from '../models';
/**
 * SchedulerServiceApi - axios parameter creator
 * @export
 */
export const SchedulerServiceApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Запрос для получения списка выгрузки файлов
         * @summary Запрос для получения списка выгрузки файлов
         * @param {GetExtractsV3Request} getExtractsV3Request 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getFileUploads: async (getExtractsV3Request: GetExtractsV3Request, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'getExtractsV3Request' is not null or undefined
            assertParamExists('getFileUploads', 'getExtractsV3Request', getExtractsV3Request)
            const localVarPath = `/stat-report-scheduler/formed/`;
            // 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(getExtractsV3Request, localVarRequestOptions, configuration)

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

/**
 * SchedulerServiceApi - functional programming interface
 * @export
 */
export const SchedulerServiceApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = SchedulerServiceApiAxiosParamCreator(configuration)
    return {
        /**
         * Запрос для получения списка выгрузки файлов
         * @summary Запрос для получения списка выгрузки файлов
         * @param {GetExtractsV3Request} getExtractsV3Request 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getFileUploads(getExtractsV3Request: GetExtractsV3Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetFileUpload>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getFileUploads(getExtractsV3Request, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
    }
};

/**
 * SchedulerServiceApi - factory interface
 * @export
 */
export const SchedulerServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = SchedulerServiceApiFp(configuration)
    return {
        /**
         * Запрос для получения списка выгрузки файлов
         * @summary Запрос для получения списка выгрузки файлов
         * @param {GetExtractsV3Request} getExtractsV3Request 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getFileUploads(getExtractsV3Request: GetExtractsV3Request, options?: any): AxiosPromise<GetFileUpload> {
            return localVarFp.getFileUploads(getExtractsV3Request, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * SchedulerServiceApi - object-oriented interface
 * @export
 * @class SchedulerServiceApi
 * @extends {BaseAPI}
 */
export class SchedulerServiceApi extends BaseAPI {
    /**
     * Запрос для получения списка выгрузки файлов
     * @summary Запрос для получения списка выгрузки файлов
     * @param {GetExtractsV3Request} getExtractsV3Request 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SchedulerServiceApi
     */
    public getFileUploads(getExtractsV3Request: GetExtractsV3Request, options?: AxiosRequestConfig) {
        return SchedulerServiceApiFp(this.configuration).getFileUploads(getExtractsV3Request, options).then((request) => request(this.axios, this.basePath));
    }
}
