/* eslint-disable */ // @ts-nocheck
/**
 * mz-resend-service
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import * as globalImportUrl from 'url';
import { Configuration } from './configuration';
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';

/**
 * 
 * @export
 * @interface InlineObject
 */
export interface InlineObject {
    /**
     * 
     * @type {any}
     * @memberof InlineObject
     */
    file?: any;
}
/**
 * 
 * @export
 * @interface LostResultPetition
 */
export interface LostResultPetition {
    /**
     * 
     * @type {number}
     * @memberof LostResultPetition
     */
    totalPages?: number;
    /**
     * 
     * @type {boolean}
     * @memberof LostResultPetition
     */
    isLastPage?: boolean;
    /**
     * 
     * @type {Array<Petition>}
     * @memberof LostResultPetition
     */
    values?: Array<Petition>;
    /**
     * 
     * @type {number}
     * @memberof LostResultPetition
     */
    offset?: number;
    /**
     * 
     * @type {number}
     * @memberof LostResultPetition
     */
    limit?: number;
    /**
     * 
     * @type {number}
     * @memberof LostResultPetition
     */
    total?: number;
}
/**
 * 
 * @export
 * @interface LostResultRequest
 */
export interface LostResultRequest {
    /**
     * 
     * @type {number}
     * @memberof LostResultRequest
     */
    totalPages?: number;
    /**
     * 
     * @type {boolean}
     * @memberof LostResultRequest
     */
    isLastPage?: boolean;
    /**
     * 
     * @type {Array<Request>}
     * @memberof LostResultRequest
     */
    values?: Array<Request>;
    /**
     * 
     * @type {number}
     * @memberof LostResultRequest
     */
    offset?: number;
    /**
     * 
     * @type {number}
     * @memberof LostResultRequest
     */
    limit?: number;
    /**
     * 
     * @type {number}
     * @memberof LostResultRequest
     */
    total?: number;
}
/**
 * 
 * @export
 * @interface Message
 */
export interface Message {
    /**
     * 
     * @type {string}
     * @memberof Message
     */
    _class?: string;
    /**
     * 
     * @type {string}
     * @memberof Message
     */
    id?: string;
    /**
     * 
     * @type {string}
     * @memberof Message
     */
    description?: string;
    /**
     * 
     * @type {number}
     * @memberof Message
     */
    timestamp?: number;
    /**
     * 
     * @type {ResendTries}
     * @memberof Message
     */
    resendTries?: ResendTries;
}
/**
 * 
 * @export
 * @interface Petition
 */
export interface Petition {
    /**
     * 
     * @type {string}
     * @memberof Petition
     */
    _class?: string;
    /**
     * 
     * @type {string}
     * @memberof Petition
     */
    id?: string;
    /**
     * 
     * @type {string}
     * @memberof Petition
     */
    description?: string;
    /**
     * 
     * @type {number}
     * @memberof Petition
     */
    timestamp?: number;
    /**
     * 
     * @type {ResendTries}
     * @memberof Petition
     */
    resendTries?: ResendTries;
    /**
     * 
     * @type {string}
     * @memberof Petition
     */
    orderId?: string;
}
/**
 * 
 * @export
 * @interface Request
 */
export interface Request extends Message {
}
/**
 * 
 * @export
 * @interface ResendTries
 */
export interface ResendTries {
    /**
     * 
     * @type {number}
     * @memberof ResendTries
     */
    count?: number;
    /**
     * 
     * @type {number}
     * @memberof ResendTries
     */
    lastTryTime?: number;
}
/**
 * Бин для входных сообщений по REST
 * @export
 * @interface RestInputBean
 */
export interface RestInputBean {
    /**
     * 
     * @type {string}
     * @memberof RestInputBean
     */
    messageId?: string;
    /**
     * 
     * @type {string}
     * @memberof RestInputBean
     */
    testMsg?: string;
    /**
     * 
     * @type {boolean}
     * @memberof RestInputBean
     */
    forceSend?: boolean;
}
/**
 * 
 * @export
 * @interface RestOutputBean
 */
export interface RestOutputBean {
    /**
     * 
     * @type {string}
     * @memberof RestOutputBean
     */
    messageId?: string;
    /**
     * 
     * @type {string}
     * @memberof RestOutputBean
     */
    message?: string;
}
/**
 * Бин для входных сообщений по REST для заявлений
 * @export
 * @interface RestPetitionInputBean
 */
export interface RestPetitionInputBean {
    /**
     * 
     * @type {string}
     * @memberof RestPetitionInputBean
     */
    messageId?: string;
    /**
     * 
     * @type {string}
     * @memberof RestPetitionInputBean
     */
    testMsg?: string;
    /**
     * 
     * @type {boolean}
     * @memberof RestPetitionInputBean
     */
    forceSend?: boolean;
    /**
     * 
     * @type {string}
     * @memberof RestPetitionInputBean
     */
    orderId?: string;
}
/**
 * 
 * @export
 * @interface RestPetitionInputBeanAllOf
 */
export interface RestPetitionInputBeanAllOf {
    /**
     * 
     * @type {string}
     * @memberof RestPetitionInputBeanAllOf
     */
    orderId?: string;
}
/**
 * Бин для входных сообщений по REST для заявлений
 * @export
 * @interface RestPetitionRequestsInputBean
 */
export interface RestPetitionRequestsInputBean {
    /**
     * 
     * @type {string}
     * @memberof RestPetitionRequestsInputBean
     */
    messageId?: string;
    /**
     * 
     * @type {string}
     * @memberof RestPetitionRequestsInputBean
     */
    testMsg?: string;
    /**
     * 
     * @type {boolean}
     * @memberof RestPetitionRequestsInputBean
     */
    forceSend?: boolean;
    /**
     * 
     * @type {string}
     * @memberof RestPetitionRequestsInputBean
     */
    orderId?: string;
}
/**
 * 
 * @export
 * @interface RestPetitionRequestsInputBeanAllOf
 */
export interface RestPetitionRequestsInputBeanAllOf {
    /**
     * 
     * @type {string}
     * @memberof RestPetitionRequestsInputBeanAllOf
     */
    testMsg?: string;
}
/**
 * 
 * @export
 * @interface Result
 */
export interface Result {
    /**
     * 
     * @type {string}
     * @memberof Result
     */
    id?: string;
    /**
     * 
     * @type {ResultStatus}
     * @memberof Result
     */
    status?: ResultStatus;
    /**
     * 
     * @type {string}
     * @memberof Result
     */
    message?: string;
}
/**
 * 
 * @export
 * @enum {string}
 */
export enum ResultStatus {
    OK = 'OK',
    ERROR = 'ERROR',
    SKIPPED = 'SKIPPED'
}


/**
 * DefaultApi - axios parameter creator
 * @export
 */
export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        clear: async (options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/lost/clear`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteLostPetitionStatuses: async (options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/lost/petition/statuses`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteLostPetitions: async (options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/lost/petitions`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteLostRequests: async (options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/lost/requests`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @param {any} [file] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        fix: async (file?: any, options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/mvd`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;
            const localVarFormParams = new FormData();


            if (file !== undefined) { 
                localVarFormParams.append('file', file as any);
            }
    
    
            localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
    
            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = localVarFormParams;

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @param {number} [limit] 
         * @param {number} [offset] 
         * @param {number} [dateFrom] 
         * @param {number} [dateTo] 
         * @param {string} [fulltext] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        lostPetitionStatuses: async (limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/lost/petition/statuses`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

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

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

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

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

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


    
            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @param {number} [limit] 
         * @param {number} [offset] 
         * @param {number} [dateFrom] 
         * @param {number} [dateTo] 
         * @param {string} [fulltext] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        lostPetitions: async (limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/lost/petitions`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

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

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

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

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

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


    
            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @param {number} [limit] 
         * @param {number} [offset] 
         * @param {number} [dateFrom] 
         * @param {number} [dateTo] 
         * @param {string} [fulltext] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        lostRequests: async (limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/lost/requests`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

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

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

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

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

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


    
            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Проверка заявления не полноту и попытка исправления при обнаружении проблем
         * @summary Проверка заявления не полноту и попытка исправления при обнаружении проблем
         * @param {RestPetitionInputBean} restPetitionInputBean реквизиты обращения
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        petition: async (restPetitionInputBean: RestPetitionInputBean, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'restPetitionInputBean' is not null or undefined
            if (restPetitionInputBean === null || restPetitionInputBean === undefined) {
                throw new RequiredError('restPetitionInputBean','Required parameter restPetitionInputBean was null or undefined when calling petition.');
            }
            const localVarPath = `/petition`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            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';

            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            const needsSerialization = (typeof restPetitionInputBean !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(restPetitionInputBean !== undefined ? restPetitionInputBean : {}) : (restPetitionInputBean || "");

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Эндпоинт для проверки МЗ на полноту через сервис истории. Если МЗ не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @summary Эндпоинт для проверки МЗ на полноту через сервис истории. Если МЗ не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @param {RestInputBean} restInputBean ид сообщения для проверки
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        request: async (restInputBean: RestInputBean, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'restInputBean' is not null or undefined
            if (restInputBean === null || restInputBean === undefined) {
                throw new RequiredError('restInputBean','Required parameter restInputBean was null or undefined when calling request.');
            }
            const localVarPath = `/request`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            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';

            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            const needsSerialization = (typeof restInputBean !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(restInputBean !== undefined ? restInputBean : {}) : (restInputBean || "");

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Эндпоинт для проверки запроса статуса на полноту через сервис истории. Если статус не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @summary Эндпоинт для проверки запроса статуса на полноту через сервис истории. Если статус не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @param {RestInputBean} restInputBean ид сообщения для проверки
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        requestStatus: async (restInputBean: RestInputBean, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'restInputBean' is not null or undefined
            if (restInputBean === null || restInputBean === undefined) {
                throw new RequiredError('restInputBean','Required parameter restInputBean was null or undefined when calling requestStatus.');
            }
            const localVarPath = `/petition/status`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            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';

            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            const needsSerialization = (typeof restInputBean !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(restInputBean !== undefined ? restInputBean : {}) : (restInputBean || "");

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Переотправка всех МЗ запросов по указанному заявлению
         * @summary Переотправка всех МЗ запросов по указанному заявлению
         * @param {RestPetitionRequestsInputBean} restPetitionRequestsInputBean реквизиты обращения
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        requests: async (restPetitionRequestsInputBean: RestPetitionRequestsInputBean, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'restPetitionRequestsInputBean' is not null or undefined
            if (restPetitionRequestsInputBean === null || restPetitionRequestsInputBean === undefined) {
                throw new RequiredError('restPetitionRequestsInputBean','Required parameter restPetitionRequestsInputBean was null or undefined when calling requests.');
            }
            const localVarPath = `/petition/requests`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            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';

            localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            const needsSerialization = (typeof restPetitionRequestsInputBean !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(restPetitionRequestsInputBean !== undefined ? restPetitionRequestsInputBean : {}) : (restPetitionRequestsInputBean || "");

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * DefaultApi - functional programming interface
 * @export
 */
export const DefaultApiFp = function(configuration?: Configuration) {
    return {
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async clear(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<number>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).clear(options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteLostPetitionStatuses(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<number>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).deleteLostPetitionStatuses(options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteLostPetitions(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<number>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).deleteLostPetitions(options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteLostRequests(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<number>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).deleteLostRequests(options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * 
         * @param {any} [file] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async fix(file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Result>>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).fix(file, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * 
         * @param {number} [limit] 
         * @param {number} [offset] 
         * @param {number} [dateFrom] 
         * @param {number} [dateTo] 
         * @param {string} [fulltext] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async lostPetitionStatuses(limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LostResultPetition>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).lostPetitionStatuses(limit, offset, dateFrom, dateTo, fulltext, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * 
         * @param {number} [limit] 
         * @param {number} [offset] 
         * @param {number} [dateFrom] 
         * @param {number} [dateTo] 
         * @param {string} [fulltext] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async lostPetitions(limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LostResultPetition>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).lostPetitions(limit, offset, dateFrom, dateTo, fulltext, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * 
         * @param {number} [limit] 
         * @param {number} [offset] 
         * @param {number} [dateFrom] 
         * @param {number} [dateTo] 
         * @param {string} [fulltext] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async lostRequests(limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LostResultRequest>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).lostRequests(limit, offset, dateFrom, dateTo, fulltext, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Проверка заявления не полноту и попытка исправления при обнаружении проблем
         * @summary Проверка заявления не полноту и попытка исправления при обнаружении проблем
         * @param {RestPetitionInputBean} restPetitionInputBean реквизиты обращения
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async petition(restPetitionInputBean: RestPetitionInputBean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestOutputBean>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).petition(restPetitionInputBean, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Эндпоинт для проверки МЗ на полноту через сервис истории. Если МЗ не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @summary Эндпоинт для проверки МЗ на полноту через сервис истории. Если МЗ не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @param {RestInputBean} restInputBean ид сообщения для проверки
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async request(restInputBean: RestInputBean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestOutputBean>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).request(restInputBean, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Эндпоинт для проверки запроса статуса на полноту через сервис истории. Если статус не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @summary Эндпоинт для проверки запроса статуса на полноту через сервис истории. Если статус не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @param {RestInputBean} restInputBean ид сообщения для проверки
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async requestStatus(restInputBean: RestInputBean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestOutputBean>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).requestStatus(restInputBean, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Переотправка всех МЗ запросов по указанному заявлению
         * @summary Переотправка всех МЗ запросов по указанному заявлению
         * @param {RestPetitionRequestsInputBean} restPetitionRequestsInputBean реквизиты обращения
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async requests(restPetitionRequestsInputBean: RestPetitionRequestsInputBean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestOutputBean>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).requests(restPetitionRequestsInputBean, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
    }
};

/**
 * DefaultApi - factory interface
 * @export
 */
export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    return {
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        clear(options?: any): AxiosPromise<number> {
            return DefaultApiFp(configuration).clear(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteLostPetitionStatuses(options?: any): AxiosPromise<number> {
            return DefaultApiFp(configuration).deleteLostPetitionStatuses(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteLostPetitions(options?: any): AxiosPromise<number> {
            return DefaultApiFp(configuration).deleteLostPetitions(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteLostRequests(options?: any): AxiosPromise<number> {
            return DefaultApiFp(configuration).deleteLostRequests(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @param {any} [file] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        fix(file?: any, options?: any): AxiosPromise<Array<Result>> {
            return DefaultApiFp(configuration).fix(file, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @param {number} [limit] 
         * @param {number} [offset] 
         * @param {number} [dateFrom] 
         * @param {number} [dateTo] 
         * @param {string} [fulltext] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        lostPetitionStatuses(limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options?: any): AxiosPromise<LostResultPetition> {
            return DefaultApiFp(configuration).lostPetitionStatuses(limit, offset, dateFrom, dateTo, fulltext, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @param {number} [limit] 
         * @param {number} [offset] 
         * @param {number} [dateFrom] 
         * @param {number} [dateTo] 
         * @param {string} [fulltext] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        lostPetitions(limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options?: any): AxiosPromise<LostResultPetition> {
            return DefaultApiFp(configuration).lostPetitions(limit, offset, dateFrom, dateTo, fulltext, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @param {number} [limit] 
         * @param {number} [offset] 
         * @param {number} [dateFrom] 
         * @param {number} [dateTo] 
         * @param {string} [fulltext] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        lostRequests(limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options?: any): AxiosPromise<LostResultRequest> {
            return DefaultApiFp(configuration).lostRequests(limit, offset, dateFrom, dateTo, fulltext, options).then((request) => request(axios, basePath));
        },
        /**
         * Проверка заявления не полноту и попытка исправления при обнаружении проблем
         * @summary Проверка заявления не полноту и попытка исправления при обнаружении проблем
         * @param {RestPetitionInputBean} restPetitionInputBean реквизиты обращения
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        petition(restPetitionInputBean: RestPetitionInputBean, options?: any): AxiosPromise<RestOutputBean> {
            return DefaultApiFp(configuration).petition(restPetitionInputBean, options).then((request) => request(axios, basePath));
        },
        /**
         * Эндпоинт для проверки МЗ на полноту через сервис истории. Если МЗ не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @summary Эндпоинт для проверки МЗ на полноту через сервис истории. Если МЗ не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @param {RestInputBean} restInputBean ид сообщения для проверки
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        request(restInputBean: RestInputBean, options?: any): AxiosPromise<RestOutputBean> {
            return DefaultApiFp(configuration).request(restInputBean, options).then((request) => request(axios, basePath));
        },
        /**
         * Эндпоинт для проверки запроса статуса на полноту через сервис истории. Если статус не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @summary Эндпоинт для проверки запроса статуса на полноту через сервис истории. Если статус не полный, то  в соответствующий топик будет отправлено повторное сообщение
         * @param {RestInputBean} restInputBean ид сообщения для проверки
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        requestStatus(restInputBean: RestInputBean, options?: any): AxiosPromise<RestOutputBean> {
            return DefaultApiFp(configuration).requestStatus(restInputBean, options).then((request) => request(axios, basePath));
        },
        /**
         * Переотправка всех МЗ запросов по указанному заявлению
         * @summary Переотправка всех МЗ запросов по указанному заявлению
         * @param {RestPetitionRequestsInputBean} restPetitionRequestsInputBean реквизиты обращения
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        requests(restPetitionRequestsInputBean: RestPetitionRequestsInputBean, options?: any): AxiosPromise<RestOutputBean> {
            return DefaultApiFp(configuration).requests(restPetitionRequestsInputBean, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * DefaultApi - object-oriented interface
 * @export
 * @class DefaultApi
 * @extends {BaseAPI}
 */
export class DefaultApi extends BaseAPI {
    /**
     * 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public clear(options?: any) {
        return DefaultApiFp(this.configuration).clear(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public deleteLostPetitionStatuses(options?: any) {
        return DefaultApiFp(this.configuration).deleteLostPetitionStatuses(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public deleteLostPetitions(options?: any) {
        return DefaultApiFp(this.configuration).deleteLostPetitions(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public deleteLostRequests(options?: any) {
        return DefaultApiFp(this.configuration).deleteLostRequests(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @param {any} [file] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public fix(file?: any, options?: any) {
        return DefaultApiFp(this.configuration).fix(file, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @param {number} [limit] 
     * @param {number} [offset] 
     * @param {number} [dateFrom] 
     * @param {number} [dateTo] 
     * @param {string} [fulltext] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public lostPetitionStatuses(limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options?: any) {
        return DefaultApiFp(this.configuration).lostPetitionStatuses(limit, offset, dateFrom, dateTo, fulltext, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @param {number} [limit] 
     * @param {number} [offset] 
     * @param {number} [dateFrom] 
     * @param {number} [dateTo] 
     * @param {string} [fulltext] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public lostPetitions(limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options?: any) {
        return DefaultApiFp(this.configuration).lostPetitions(limit, offset, dateFrom, dateTo, fulltext, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @param {number} [limit] 
     * @param {number} [offset] 
     * @param {number} [dateFrom] 
     * @param {number} [dateTo] 
     * @param {string} [fulltext] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public lostRequests(limit?: number, offset?: number, dateFrom?: number, dateTo?: number, fulltext?: string, options?: any) {
        return DefaultApiFp(this.configuration).lostRequests(limit, offset, dateFrom, dateTo, fulltext, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Проверка заявления не полноту и попытка исправления при обнаружении проблем
     * @summary Проверка заявления не полноту и попытка исправления при обнаружении проблем
     * @param {RestPetitionInputBean} restPetitionInputBean реквизиты обращения
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public petition(restPetitionInputBean: RestPetitionInputBean, options?: any) {
        return DefaultApiFp(this.configuration).petition(restPetitionInputBean, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Эндпоинт для проверки МЗ на полноту через сервис истории. Если МЗ не полный, то  в соответствующий топик будет отправлено повторное сообщение
     * @summary Эндпоинт для проверки МЗ на полноту через сервис истории. Если МЗ не полный, то  в соответствующий топик будет отправлено повторное сообщение
     * @param {RestInputBean} restInputBean ид сообщения для проверки
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public request(restInputBean: RestInputBean, options?: any) {
        return DefaultApiFp(this.configuration).request(restInputBean, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Эндпоинт для проверки запроса статуса на полноту через сервис истории. Если статус не полный, то  в соответствующий топик будет отправлено повторное сообщение
     * @summary Эндпоинт для проверки запроса статуса на полноту через сервис истории. Если статус не полный, то  в соответствующий топик будет отправлено повторное сообщение
     * @param {RestInputBean} restInputBean ид сообщения для проверки
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public requestStatus(restInputBean: RestInputBean, options?: any) {
        return DefaultApiFp(this.configuration).requestStatus(restInputBean, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Переотправка всех МЗ запросов по указанному заявлению
     * @summary Переотправка всех МЗ запросов по указанному заявлению
     * @param {RestPetitionRequestsInputBean} restPetitionRequestsInputBean реквизиты обращения
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public requests(restPetitionRequestsInputBean: RestPetitionRequestsInputBean, options?: any) {
        return DefaultApiFp(this.configuration).requests(restPetitionRequestsInputBean, options).then((request) => request(this.axios, this.basePath));
    }

}


