// tslint:disable
/**
 * mz-history
 * 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.
 */
// @ts-nocheck


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 AllPetitionData
 */
export interface AllPetitionData {
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    requestSmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    request?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    requestJson?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    response?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    responseSmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    status?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    statusSmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    statusJson?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    requestFsmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    responseFsmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    sendResponseResponse?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    getRequestRequest?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    ackRequest?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllPetitionData
     */
    ackResponse?: Array<Message>;
}
/**
 *
 * @export
 * @interface AllRequestData
 */
export interface AllRequestData {
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    request?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    requestSmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    responseSmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    responseJson?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    response?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    status?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    statusSmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    statusJson?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    requestFsmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    responseFsmev?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    sendRequestResponse?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    getResponseRequest?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    ackRequest?: Array<Message>;
    /**
     *
     * @type {Array<Message>}
     * @memberof AllRequestData
     */
    ackResponse?: Array<Message>;
}
/**
 *
 * @export
 * @interface Message
 */
export interface Message {
    /**
     *
     * @type {string}
     * @memberof Message
     */
    id?: string;
    /**
     *
     * @type {Type}
     * @memberof Message
     */
    type?: Type;
    /**
     *
     * @type {string}
     * @memberof Message
     */
    date?: string;
    /**
     *
     * @type {{ [key: string]: string; }}
     * @memberof Message
     */
    headers?: { [key: string]: string; };
    /**
     *
     * @type {string}
     * @memberof Message
     */
    content?: string;
}
/**
 *
 * @export
 * @interface PetitionData
 */
export interface PetitionData {
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    requestSmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    request?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    requestJson?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    response?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    responseSmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    status?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    statusSmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    statusJson?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    requestFsmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    responseFsmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    sendResponseResponse?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    getRequestRequest?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    ackRequest?: Message;
    /**
     *
     * @type {Message}
     * @memberof PetitionData
     */
    ackResponse?: Message;
}
/**
 *
 * @export
 * @interface PetitionInfo
 */
export interface PetitionInfo {
    /**
     *
     * @type {string}
     * @memberof PetitionInfo
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof PetitionInfo
     */
    requestedId?: string;
    /**
     *
     * @type {string}
     * @memberof PetitionInfo
     */
    messageId?: string;
    /**
     *
     * @type {number}
     * @memberof PetitionInfo
     */
    timestamp?: number;
    /**
     *
     * @type {string}
     * @memberof PetitionInfo
     */
    requestClass?: string;
    /**
     *
     * @type {string}
     * @memberof PetitionInfo
     */
    responseClass?: string;
    /**
     *
     * @type {AllPetitionData}
     * @memberof PetitionInfo
     */
    data?: AllPetitionData;
    /**
     *
     * @type {Array<RequestInfo>}
     * @memberof PetitionInfo
     */
    requests?: Array<RequestInfo>;
}
/**
 *
 * @export
 * @interface PetitionRequestData
 */
export interface PetitionRequestData {
    /**
     *
     * @type {string}
     * @memberof PetitionRequestData
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof PetitionRequestData
     */
    className?: string;
    /**
     *
     * @type {string}
     * @memberof PetitionRequestData
     */
    dateTime?: string;
}
/**
 *
 * @export
 * @interface RequestData
 */
export interface RequestData {
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    request?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    requestSmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    responseSmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    responseJson?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    response?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    status?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    statusSmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    statusJson?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    requestFsmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    responseFsmev?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    sendRequestResponse?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    getResponseRequest?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    ackRequest?: Message;
    /**
     *
     * @type {Message}
     * @memberof RequestData
     */
    ackResponse?: Message;
}
/**
 *
 * @export
 * @interface RequestInfo
 */
export interface RequestInfo {
    /**
     *
     * @type {string}
     * @memberof RequestInfo
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof RequestInfo
     */
    requestedId?: string;
    /**
     *
     * @type {string}
     * @memberof RequestInfo
     */
    messageId?: string;
    /**
     *
     * @type {number}
     * @memberof RequestInfo
     */
    timestamp?: number;
    /**
     *
     * @type {string}
     * @memberof RequestInfo
     */
    requestClass?: string;
    /**
     *
     * @type {string}
     * @memberof RequestInfo
     */
    responseClass?: string;
    /**
     *
     * @type {AllRequestData}
     * @memberof RequestInfo
     */
    data?: AllRequestData;
}
/**
 *
 * @export
 * @enum {string}
 */
export enum Type {
    REQUEST = 'REQUEST',
    REQUESTSMEV = 'REQUEST_SMEV',
    REQUESTJSON = 'REQUEST_JSON',
    STATUSSMEV = 'STATUS_SMEV',
    STATUS = 'STATUS',
    STATUSJSON = 'STATUS_JSON',
    RESPONSE = 'RESPONSE',
    RESPONSESMEV = 'RESPONSE_SMEV',
    RESPONSEJSON = 'RESPONSE_JSON',
    REQUESTFSMEV = 'REQUEST_FSMEV',
    RESPONSEFSMEV = 'RESPONSE_FSMEV',
    ACKREQUEST = 'ACK_REQUEST',
    ACKRESPONSE = 'ACK_RESPONSE',
    SENDREQUESTRESPONSE = 'SEND_REQUEST_RESPONSE',
    SENDRESPONSERESPONSE = 'SEND_RESPONSE_RESPONSE',
    GETREQUESTREQUEST = 'GET_REQUEST_REQUEST',
    GETRESPONSEREQUEST = 'GET_RESPONSE_REQUEST'
}


/**
 * DefaultApi - axios parameter creator
 * @export
 */
export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РёСЃС‚РѕСЂРёРё РїРѕ РѕР±СЂР°С‰РµРЅРёСЋ
         * @param {string} id
         * @param {Array<Type>} [types]
         * @param {string} [noContent]
         * @param {string} [withRequests]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        petition: async (id: string, types?: Array<Type>, noContent?: string, withRequests?: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id','Required parameter id was null or undefined when calling petition.');
            }
            const localVarPath = `/petitions/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            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 (types) {
                localVarQueryParameter['types'] = types;
            }

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

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



            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 {string} id
         * @param {Type} type
         * @param {number} [number]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        petitionContent: async (id: string, type: Type, number?: number, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id','Required parameter id was null or undefined when calling petitionContent.');
            }
            // verify required parameter 'type' is not null or undefined
            if (type === null || type === undefined) {
                throw new RequiredError('type','Required parameter type was null or undefined when calling petitionContent.');
            }
            const localVarPath = `/petitions/{id}/{type}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)))
                .replace(`{${"type"}}`, encodeURIComponent(String(type)));
            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 (number !== undefined) {
                localVarQueryParameter['number'] = number;
            }



            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 {string} messageId
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        petitionRequests: async (messageId: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'messageId' is not null or undefined
            if (messageId === null || messageId === undefined) {
                throw new RequiredError('messageId','Required parameter messageId was null or undefined when calling petitionRequests.');
            }
            const localVarPath = `/petitions/{messageId}/requests`
                .replace(`{${"messageId"}}`, encodeURIComponent(String(messageId)));
            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;



            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 {string} id
         * @param {Array<Type>} [types]
         * @param {string} [noContent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        request: async (id: string, types?: Array<Type>, noContent?: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id','Required parameter id was null or undefined when calling request.');
            }
            const localVarPath = `/requests/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            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 (types) {
                localVarQueryParameter['types'] = types;
            }

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



            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 {string} id
         * @param {Type} type
         * @param {number} [number]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        requestContent: async (id: string, type: Type, number?: number, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id','Required parameter id was null or undefined when calling requestContent.');
            }
            // verify required parameter 'type' is not null or undefined
            if (type === null || type === undefined) {
                throw new RequiredError('type','Required parameter type was null or undefined when calling requestContent.');
            }
            const localVarPath = `/requests/{id}/{type}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)))
                .replace(`{${"type"}}`, encodeURIComponent(String(type)));
            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 (number !== undefined) {
                localVarQueryParameter['number'] = number;
            }



            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,
            };
        },
    }
};

/**
 * DefaultApi - functional programming interface
 * @export
 */
export const DefaultApiFp = function(configuration?: Configuration) {
    return {
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РёСЃС‚РѕСЂРёРё РїРѕ РѕР±СЂР°С‰РµРЅРёСЋ
         * @param {string} id
         * @param {Array<Type>} [types]
         * @param {string} [noContent]
         * @param {string} [withRequests]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async petition(id: string, types?: Array<Type>, noContent?: string, withRequests?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PetitionInfo>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).petition(id, types, noContent, withRequests, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РєРѕРЅС‚РµРЅС‚Р° СЃРѕРѕР±С‰РµРЅРёСЏ РїРѕ РѕР±СЂР°С‰РµРЅРёСЋ
         * @param {string} id
         * @param {Type} type
         * @param {number} [number]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async petitionContent(id: string, type: Type, number?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).petitionContent(id, type, number, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РјРµР¶РІРµРґРѕРјСЃС‚РІРµРЅРЅС‹С… Р·Р°РїСЂРѕСЃРѕРІ, СЃРІСЏР·Р°РЅРЅС‹С… СЃ РѕР±СЂР°С‰РµРЅРёРµРј
         * @param {string} messageId
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async petitionRequests(messageId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PetitionRequestData>>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).petitionRequests(messageId, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РёСЃС‚РѕСЂРёРё РїРѕ РјРµР¶РІРµРґРѕРјСЃС‚РІРµРЅРЅРѕРјСѓ Р·Р°РїСЂРѕСЃСѓ
         * @param {string} id
         * @param {Array<Type>} [types]
         * @param {string} [noContent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async request(id: string, types?: Array<Type>, noContent?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestInfo>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).request(id, types, noContent, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РєРѕРЅС‚РµРЅС‚Р° СЃРѕРѕР±С‰РµРЅРёСЏ РїРѕ РјРµР¶РІРµРґРѕРјСЃС‚РІРµРЅРЅРѕРјСѓ Р·Р°РїСЂРѕСЃСѓ
         * @param {string} id
         * @param {Type} type
         * @param {number} [number]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async requestContent(id: string, type: Type, number?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
            const localVarAxiosArgs = await DefaultApiAxiosParamCreator(configuration).requestContent(id, type, number, 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 {
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РёСЃС‚РѕСЂРёРё РїРѕ РѕР±СЂР°С‰РµРЅРёСЋ
         * @param {string} id
         * @param {Array<Type>} [types]
         * @param {string} [noContent]
         * @param {string} [withRequests]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        petition(id: string, types?: Array<Type>, noContent?: string, withRequests?: string, options?: any): AxiosPromise<PetitionInfo> {
            return DefaultApiFp(configuration).petition(id, types, noContent, withRequests, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РєРѕРЅС‚РµРЅС‚Р° СЃРѕРѕР±С‰РµРЅРёСЏ РїРѕ РѕР±СЂР°С‰РµРЅРёСЋ
         * @param {string} id
         * @param {Type} type
         * @param {number} [number]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        petitionContent(id: string, type: Type, number?: number, options?: any): AxiosPromise<string> {
            return DefaultApiFp(configuration).petitionContent(id, type, number, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РјРµР¶РІРµРґРѕРјСЃС‚РІРµРЅРЅС‹С… Р·Р°РїСЂРѕСЃРѕРІ, СЃРІСЏР·Р°РЅРЅС‹С… СЃ РѕР±СЂР°С‰РµРЅРёРµРј
         * @param {string} messageId
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        petitionRequests(messageId: string, options?: any): AxiosPromise<Array<PetitionRequestData>> {
            return DefaultApiFp(configuration).petitionRequests(messageId, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РёСЃС‚РѕСЂРёРё РїРѕ РјРµР¶РІРµРґРѕРјСЃС‚РІРµРЅРЅРѕРјСѓ Р·Р°РїСЂРѕСЃСѓ
         * @param {string} id
         * @param {Array<Type>} [types]
         * @param {string} [noContent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        request(id: string, types?: Array<Type>, noContent?: string, options?: any): AxiosPromise<RequestInfo> {
            return DefaultApiFp(configuration).request(id, types, noContent, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary РџРѕР»СѓС‡РµРЅРёРµ РєРѕРЅС‚РµРЅС‚Р° СЃРѕРѕР±С‰РµРЅРёСЏ РїРѕ РјРµР¶РІРµРґРѕРјСЃС‚РІРµРЅРЅРѕРјСѓ Р·Р°РїСЂРѕСЃСѓ
         * @param {string} id
         * @param {Type} type
         * @param {number} [number]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        requestContent(id: string, type: Type, number?: number, options?: any): AxiosPromise<string> {
            return DefaultApiFp(configuration).requestContent(id, type, number, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * DefaultApi - object-oriented interface
 * @export
 * @class DefaultApi
 * @extends {BaseAPI}
 */
export class DefaultApi extends BaseAPI {
    /**
     *
     * @summary РџРѕР»СѓС‡РµРЅРёРµ РёСЃС‚РѕСЂРёРё РїРѕ РѕР±СЂР°С‰РµРЅРёСЋ
     * @param {string} id
     * @param {Array<Type>} [types]
     * @param {string} [noContent]
     * @param {string} [withRequests]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public petition(id: string, types?: Array<Type>, noContent?: string, withRequests?: string, options?: any) {
        return DefaultApiFp(this.configuration).petition(id, types, noContent, withRequests, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     *
     * @summary РџРѕР»СѓС‡РµРЅРёРµ РєРѕРЅС‚РµРЅС‚Р° СЃРѕРѕР±С‰РµРЅРёСЏ РїРѕ РѕР±СЂР°С‰РµРЅРёСЋ
     * @param {string} id
     * @param {Type} type
     * @param {number} [number]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public petitionContent(id: string, type: Type, number?: number, options?: any) {
        return DefaultApiFp(this.configuration).petitionContent(id, type, number, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     *
     * @summary РџРѕР»СѓС‡РµРЅРёРµ РјРµР¶РІРµРґРѕРјСЃС‚РІРµРЅРЅС‹С… Р·Р°РїСЂРѕСЃРѕРІ, СЃРІСЏР·Р°РЅРЅС‹С… СЃ РѕР±СЂР°С‰РµРЅРёРµРј
     * @param {string} messageId
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public petitionRequests(messageId: string, options?: any) {
        return DefaultApiFp(this.configuration).petitionRequests(messageId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     *
     * @summary РџРѕР»СѓС‡РµРЅРёРµ РёСЃС‚РѕСЂРёРё РїРѕ РјРµР¶РІРµРґРѕРјСЃС‚РІРµРЅРЅРѕРјСѓ Р·Р°РїСЂРѕСЃСѓ
     * @param {string} id
     * @param {Array<Type>} [types]
     * @param {string} [noContent]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public request(id: string, types?: Array<Type>, noContent?: string, options?: any) {
        return DefaultApiFp(this.configuration).request(id, types, noContent, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     *
     * @summary РџРѕР»СѓС‡РµРЅРёРµ РєРѕРЅС‚РµРЅС‚Р° СЃРѕРѕР±С‰РµРЅРёСЏ РїРѕ РјРµР¶РІРµРґРѕРјСЃС‚РІРµРЅРЅРѕРјСѓ Р·Р°РїСЂРѕСЃСѓ
     * @param {string} id
     * @param {Type} type
     * @param {number} [number]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    public requestContent(id: string, type: Type, number?: number, options?: any) {
        return DefaultApiFp(this.configuration).requestContent(id, type, number, options).then((request) => request(this.axios, this.basePath));
    }

}


