// tslint:disable
// @ts-nocheck
/**
 * FIAS Search
 * Service allow to perform full text search for addresses in FIAS database
 *
 * The version of the OpenAPI document: 2.4.4-SNAPSHOT (378)
 * Contact: akurako@inpromconsult.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 * 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
 * @enum {string}
 */
export enum AddressLevel {
    REGION = 'REGION',
    DISTRICT = 'DISTRICT',
    CITY = 'CITY',
    STREET = 'STREET',
    SETTLEMENT = 'SETTLEMENT',
    LOCALITY = 'LOCALITY',
    UNKNOWN = 'UNKNOWN'
}

/**
 *
 * @export
 * @interface AddressPartTO
 */
export interface AddressPartTO {
    /**
     *
     * @type {string}
     * @memberof AddressPartTO
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof AddressPartTO
     */
    type?: string;
    /**
     *
     * @type {string}
     * @memberof AddressPartTO
     */
    name?: string;
}
/**
 *
 * @export
 * @interface AddressTO
 */
export interface AddressTO {
    /**
     *
     * @type {string}
     * @memberof AddressTO
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof AddressTO
     */
    parent?: string;
    /**
     *
     * @type {string}
     * @memberof AddressTO
     */
    name?: string;
    /**
     *
     * @type {string}
     * @memberof AddressTO
     */
    postal?: string;
    /**
     *
     * @type {string}
     * @memberof AddressTO
     */
    code?: string;
    /**
     *
     * @type {AddressType}
     * @memberof AddressTO
     */
    type?: AddressType;
    /**
     *
     * @type {string}
     * @memberof AddressTO
     */
    fullname?: string;
    /**
     *
     * @type {AddressLevel}
     * @memberof AddressTO
     */
    level?: AddressLevel;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTO
     */
    region?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTO
     */
    district?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTO
     */
    locality?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTO
     */
    city?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTO
     */
    street?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTO
     */
    settlement?: AddressPartTO;
    /**
     *
     * @type {SteadPartTO}
     * @memberof AddressTO
     */
    stead?: SteadPartTO;
    /**
     *
     * @type {HousePartTO}
     * @memberof AddressTO
     */
    house?: HousePartTO;
    /**
     *
     * @type {RoomPartTO}
     * @memberof AddressTO
     */
    room?: RoomPartTO;
}
/**
 *
 * @export
 * @interface AddressTOAllOf
 */
export interface AddressTOAllOf {
    /**
     *
     * @type {AddressType}
     * @memberof AddressTOAllOf
     */
    type?: AddressType;
    /**
     *
     * @type {string}
     * @memberof AddressTOAllOf
     */
    fullname?: string;
    /**
     *
     * @type {AddressLevel}
     * @memberof AddressTOAllOf
     */
    level?: AddressLevel;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTOAllOf
     */
    region?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTOAllOf
     */
    district?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTOAllOf
     */
    locality?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTOAllOf
     */
    city?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTOAllOf
     */
    street?: AddressPartTO;
    /**
     *
     * @type {AddressPartTO}
     * @memberof AddressTOAllOf
     */
    settlement?: AddressPartTO;
    /**
     *
     * @type {SteadPartTO}
     * @memberof AddressTOAllOf
     */
    stead?: SteadPartTO;
    /**
     *
     * @type {HousePartTO}
     * @memberof AddressTOAllOf
     */
    house?: HousePartTO;
    /**
     *
     * @type {RoomPartTO}
     * @memberof AddressTOAllOf
     */
    room?: RoomPartTO;
}
/**
 *
 * @export
 * @enum {string}
 */
export enum AddressType {
    ADDRESS = 'ADDRESS',
    HOUSE = 'HOUSE',
    ROOM = 'ROOM',
    STEAD = 'STEAD'
}

/**
 *
 * @export
 * @interface DeprecatedSearchEqualResultDeprecatedSimpleAddress
 */
export interface DeprecatedSearchEqualResultDeprecatedSimpleAddress {
    /**
     *
     * @type {number}
     * @memberof DeprecatedSearchEqualResultDeprecatedSimpleAddress
     */
    code?: number;
    /**
     *
     * @type {string}
     * @memberof DeprecatedSearchEqualResultDeprecatedSimpleAddress
     */
    description?: string;
    /**
     *
     * @type {DeprecatedSimpleAddress}
     * @memberof DeprecatedSearchEqualResultDeprecatedSimpleAddress
     */
    data?: DeprecatedSimpleAddress;
}
/**
 *
 * @export
 * @interface DeprecatedSearchHitDeprecatedSimpleAddress
 */
export interface DeprecatedSearchHitDeprecatedSimpleAddress {
    /**
     *
     * @type {DeprecatedSimpleAddress}
     * @memberof DeprecatedSearchHitDeprecatedSimpleAddress
     */
    data?: DeprecatedSimpleAddress;
    /**
     *
     * @type {string}
     * @memberof DeprecatedSearchHitDeprecatedSimpleAddress
     */
    highlight?: string;
}
/**
 *
 * @export
 * @interface DeprecatedSearchWrapper
 */
export interface DeprecatedSearchWrapper {
    /**
     *
     * @type {string}
     * @memberof DeprecatedSearchWrapper
     */
    original?: string;
    /**
     *
     * @type {string}
     * @memberof DeprecatedSearchWrapper
     */
    matched?: string;
    /**
     *
     * @type {Array<DeprecatedSearchHitDeprecatedSimpleAddress>}
     * @memberof DeprecatedSearchWrapper
     */
    data?: Array<DeprecatedSearchHitDeprecatedSimpleAddress>;
}
/**
 *
 * @export
 * @interface DeprecatedSimpleAddress
 */
export interface DeprecatedSimpleAddress {
    /**
     *
     * @type {string}
     * @memberof DeprecatedSimpleAddress
     */
    guid?: string;
    /**
     *
     * @type {string}
     * @memberof DeprecatedSimpleAddress
     */
    livestatus?: string;
}
/**
 *
 * @export
 * @interface DetailedAddressTO
 */
export interface DetailedAddressTO {
    /**
     *
     * @type {string}
     * @memberof DetailedAddressTO
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof DetailedAddressTO
     */
    parent?: string;
    /**
     *
     * @type {string}
     * @memberof DetailedAddressTO
     */
    name?: string;
    /**
     *
     * @type {string}
     * @memberof DetailedAddressTO
     */
    postal?: string;
    /**
     *
     * @type {string}
     * @memberof DetailedAddressTO
     */
    code?: string;
}
/**
 *
 * @export
 * @interface DetailedAddressTOAllOf
 */
export interface DetailedAddressTOAllOf {
    /**
     *
     * @type {string}
     * @memberof DetailedAddressTOAllOf
     */
    postal?: string;
    /**
     *
     * @type {string}
     * @memberof DetailedAddressTOAllOf
     */
    code?: string;
}
/**
 *
 * @export
 * @interface HitAddressTO
 */
export interface HitAddressTO {
    /**
     *
     * @type {string}
     * @memberof HitAddressTO
     */
    highlight?: string;
    /**
     *
     * @type {AddressTO}
     * @memberof HitAddressTO
     */
    data?: AddressTO;
    /**
     *
     * @type {AddressType}
     * @memberof HitAddressTO
     */
    type?: AddressType;
    /**
     *
     * @type {AddressLevel}
     * @memberof HitAddressTO
     */
    level?: AddressLevel;
}
/**
 *
 * @export
 * @interface HitSimpleAddressTO
 */
export interface HitSimpleAddressTO {
    /**
     *
     * @type {string}
     * @memberof HitSimpleAddressTO
     */
    highlight?: string;
    /**
     *
     * @type {SimpleAddressTO}
     * @memberof HitSimpleAddressTO
     */
    data?: SimpleAddressTO;
    /**
     *
     * @type {AddressType}
     * @memberof HitSimpleAddressTO
     */
    type?: AddressType;
    /**
     *
     * @type {AddressLevel}
     * @memberof HitSimpleAddressTO
     */
    level?: AddressLevel;
}
/**
 *
 * @export
 * @interface HousePartTO
 */
export interface HousePartTO {
    /**
     *
     * @type {string}
     * @memberof HousePartTO
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTO
     */
    parent?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTO
     */
    name?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTO
     */
    postal?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTO
     */
    code?: string;
    /**
     *
     * @type {AddressType}
     * @memberof HousePartTO
     */
    type?: AddressType;
    /**
     *
     * @type {string}
     * @memberof HousePartTO
     */
    number?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTO
     */
    block?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTO
     */
    structure?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTO
     */
    cadastral?: string;
}
/**
 *
 * @export
 * @interface HousePartTOAllOf
 */
export interface HousePartTOAllOf {
    /**
     *
     * @type {AddressType}
     * @memberof HousePartTOAllOf
     */
    type?: AddressType;
    /**
     *
     * @type {string}
     * @memberof HousePartTOAllOf
     */
    number?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTOAllOf
     */
    block?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTOAllOf
     */
    structure?: string;
    /**
     *
     * @type {string}
     * @memberof HousePartTOAllOf
     */
    cadastral?: string;
}
/**
 *
 * @export
 * @interface MessageResponse
 */
export interface MessageResponse {
    /**
     *
     * @type {string}
     * @memberof MessageResponse
     */
    request?: string;
    /**
     *
     * @type {boolean}
     * @memberof MessageResponse
     */
    success?: boolean;
    /**
     *
     * @type {string}
     * @memberof MessageResponse
     */
    message?: string;
}
/**
 *
 * @export
 * @interface RoomPartTO
 */
export interface RoomPartTO {
    /**
     *
     * @type {string}
     * @memberof RoomPartTO
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTO
     */
    parent?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTO
     */
    name?: string;
    /**
     *
     * @type {AddressType}
     * @memberof RoomPartTO
     */
    type?: AddressType;
    /**
     *
     * @type {string}
     * @memberof RoomPartTO
     */
    flat?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTO
     */
    flatCadastral?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTO
     */
    room?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTO
     */
    roomCadastral?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTO
     */
    postal?: string;
}
/**
 *
 * @export
 * @interface RoomPartTOAllOf
 */
export interface RoomPartTOAllOf {
    /**
     *
     * @type {AddressType}
     * @memberof RoomPartTOAllOf
     */
    type?: AddressType;
    /**
     *
     * @type {string}
     * @memberof RoomPartTOAllOf
     */
    flat?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTOAllOf
     */
    flatCadastral?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTOAllOf
     */
    room?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTOAllOf
     */
    roomCadastral?: string;
    /**
     *
     * @type {string}
     * @memberof RoomPartTOAllOf
     */
    postal?: string;
}
/**
 * Объект поискового запроса
 * @export
 * @interface SearchRequest
 */
export interface SearchRequest {
    /**
     *
     * @type {Array<string>}
     * @memberof SearchRequest
     */
    locations: Array<string>;
    /**
     * Количество результатов которое надо вернуть
     * @type {number}
     * @memberof SearchRequest
     */
    amount?: number | null;
    /**
     * Поисковой запрос
     * @type {string}
     * @memberof SearchRequest
     */
    query: string;
}
/**
 *
 * @export
 * @interface SearchWrapper
 */
export interface SearchWrapper {
    /**
     *
     * @type {Array<HitAddressTO>}
     * @memberof SearchWrapper
     */
    hits?: Array<HitAddressTO>;
    /**
     *
     * @type {string}
     * @memberof SearchWrapper
     */
    original?: string;
    /**
     *
     * @type {string}
     * @memberof SearchWrapper
     */
    matched?: string;
}
/**
 *
 * @export
 * @interface SimpleAddressTO
 */
export interface SimpleAddressTO {
    /**
     *
     * @type {string}
     * @memberof SimpleAddressTO
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof SimpleAddressTO
     */
    parent?: string;
    /**
     *
     * @type {string}
     * @memberof SimpleAddressTO
     */
    name?: string;
}
/**
 *
 * @export
 * @interface SteadPartTO
 */
export interface SteadPartTO {
    /**
     *
     * @type {string}
     * @memberof SteadPartTO
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof SteadPartTO
     */
    parent?: string;
    /**
     *
     * @type {string}
     * @memberof SteadPartTO
     */
    name?: string;
    /**
     *
     * @type {string}
     * @memberof SteadPartTO
     */
    postal?: string;
    /**
     *
     * @type {string}
     * @memberof SteadPartTO
     */
    code?: string;
    /**
     *
     * @type {AddressType}
     * @memberof SteadPartTO
     */
    type?: AddressType;
    /**
     *
     * @type {string}
     * @memberof SteadPartTO
     */
    number?: string;
    /**
     *
     * @type {string}
     * @memberof SteadPartTO
     */
    cadastral?: string;
}
/**
 *
 * @export
 * @interface SteadPartTOAllOf
 */
export interface SteadPartTOAllOf {
    /**
     *
     * @type {AddressType}
     * @memberof SteadPartTOAllOf
     */
    type?: AddressType;
    /**
     *
     * @type {string}
     * @memberof SteadPartTOAllOf
     */
    number?: string;
    /**
     *
     * @type {string}
     * @memberof SteadPartTOAllOf
     */
    cadastral?: string;
}

/**
 * APIV1DeprecatedApi - axios parameter creator
 * @export
 */
export const APIV1DeprecatedApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAddressByGuid: async (guid: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'guid' is not null or undefined
            if (guid === null || guid === undefined) {
                throw new RequiredError('guid','Required parameter guid was null or undefined when calling searchAddressByGuid.');
            }
            const localVarPath = `/search/address-object/{guid}`
                .replace(`{${"guid"}}`, encodeURIComponent(String(guid)));
            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,
            };
        },
        /**
         * Осуществляет поиск объект адреса по query
         * @summary Поиск по query
         * @param {string} query
         * @param {boolean} slice
         * @param {boolean} postal
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAll: async (query: string, slice: boolean, postal: boolean, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'query' is not null or undefined
            if (query === null || query === undefined) {
                throw new RequiredError('query','Required parameter query was null or undefined when calling searchAll.');
            }
            // verify required parameter 'slice' is not null or undefined
            if (slice === null || slice === undefined) {
                throw new RequiredError('slice','Required parameter slice was null or undefined when calling searchAll.');
            }
            // verify required parameter 'postal' is not null or undefined
            if (postal === null || postal === undefined) {
                throw new RequiredError('postal','Required parameter postal was null or undefined when calling searchAll.');
            }
            const localVarPath = `/search/all`;
            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 (query !== undefined) {
                localVarQueryParameter['query'] = query;
            }

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

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



            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,
            };
        },
        /**
         * Осуществляет поиск объект адреса по fullname на полное посимвольное соответствие
         * @summary Поиск на полное совпадение адреса
         * @param {string} query
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchEqual: async (query: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'query' is not null or undefined
            if (query === null || query === undefined) {
                throw new RequiredError('query','Required parameter query was null or undefined when calling searchEqual.');
            }
            const localVarPath = `/search/equal`;
            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 (query !== undefined) {
                localVarQueryParameter['query'] = query;
            }



            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,
            };
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchHouseByGuid: async (guid: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'guid' is not null or undefined
            if (guid === null || guid === undefined) {
                throw new RequiredError('guid','Required parameter guid was null or undefined when calling searchHouseByGuid.');
            }
            const localVarPath = `/search/house/{guid}`
                .replace(`{${"guid"}}`, encodeURIComponent(String(guid)));
            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,
            };
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchRoomByGuid: async (guid: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'guid' is not null or undefined
            if (guid === null || guid === undefined) {
                throw new RequiredError('guid','Required parameter guid was null or undefined when calling searchRoomByGuid.');
            }
            const localVarPath = `/search/room/{guid}`
                .replace(`{${"guid"}}`, encodeURIComponent(String(guid)));
            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,
            };
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchSteadByGuid: async (guid: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'guid' is not null or undefined
            if (guid === null || guid === undefined) {
                throw new RequiredError('guid','Required parameter guid was null or undefined when calling searchSteadByGuid.');
            }
            const localVarPath = `/search/stead/{guid}`
                .replace(`{${"guid"}}`, encodeURIComponent(String(guid)));
            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,
            };
        },
    }
};

/**
 * APIV1DeprecatedApi - functional programming interface
 * @export
 */
export const APIV1DeprecatedApiFp = function(configuration?: Configuration) {
    return {
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchAddressByGuid(guid: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DeprecatedSearchHitDeprecatedSimpleAddress>>> {
            const localVarAxiosArgs = await APIV1DeprecatedApiAxiosParamCreator(configuration).searchAddressByGuid(guid, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Осуществляет поиск объект адреса по query
         * @summary Поиск по query
         * @param {string} query
         * @param {boolean} slice
         * @param {boolean} postal
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchAll(query: string, slice: boolean, postal: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeprecatedSearchWrapper>> {
            const localVarAxiosArgs = await APIV1DeprecatedApiAxiosParamCreator(configuration).searchAll(query, slice, postal, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Осуществляет поиск объект адреса по fullname на полное посимвольное соответствие
         * @summary Поиск на полное совпадение адреса
         * @param {string} query
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchEqual(query: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeprecatedSearchEqualResultDeprecatedSimpleAddress>> {
            const localVarAxiosArgs = await APIV1DeprecatedApiAxiosParamCreator(configuration).searchEqual(query, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchHouseByGuid(guid: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DeprecatedSearchHitDeprecatedSimpleAddress>>> {
            const localVarAxiosArgs = await APIV1DeprecatedApiAxiosParamCreator(configuration).searchHouseByGuid(guid, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchRoomByGuid(guid: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DeprecatedSearchHitDeprecatedSimpleAddress>>> {
            const localVarAxiosArgs = await APIV1DeprecatedApiAxiosParamCreator(configuration).searchRoomByGuid(guid, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchSteadByGuid(guid: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DeprecatedSearchHitDeprecatedSimpleAddress>>> {
            const localVarAxiosArgs = await APIV1DeprecatedApiAxiosParamCreator(configuration).searchSteadByGuid(guid, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
    }
};

/**
 * APIV1DeprecatedApi - factory interface
 * @export
 */
export const APIV1DeprecatedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    return {
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAddressByGuid(guid: string, options?: any): AxiosPromise<Array<DeprecatedSearchHitDeprecatedSimpleAddress>> {
            return APIV1DeprecatedApiFp(configuration).searchAddressByGuid(guid, options).then((request) => request(axios, basePath));
        },
        /**
         * Осуществляет поиск объект адреса по query
         * @summary Поиск по query
         * @param {string} query
         * @param {boolean} slice
         * @param {boolean} postal
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAll(query: string, slice: boolean, postal: boolean, options?: any): AxiosPromise<DeprecatedSearchWrapper> {
            return APIV1DeprecatedApiFp(configuration).searchAll(query, slice, postal, options).then((request) => request(axios, basePath));
        },
        /**
         * Осуществляет поиск объект адреса по fullname на полное посимвольное соответствие
         * @summary Поиск на полное совпадение адреса
         * @param {string} query
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchEqual(query: string, options?: any): AxiosPromise<DeprecatedSearchEqualResultDeprecatedSimpleAddress> {
            return APIV1DeprecatedApiFp(configuration).searchEqual(query, options).then((request) => request(axios, basePath));
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchHouseByGuid(guid: string, options?: any): AxiosPromise<Array<DeprecatedSearchHitDeprecatedSimpleAddress>> {
            return APIV1DeprecatedApiFp(configuration).searchHouseByGuid(guid, options).then((request) => request(axios, basePath));
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchRoomByGuid(guid: string, options?: any): AxiosPromise<Array<DeprecatedSearchHitDeprecatedSimpleAddress>> {
            return APIV1DeprecatedApiFp(configuration).searchRoomByGuid(guid, options).then((request) => request(axios, basePath));
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} guid
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchSteadByGuid(guid: string, options?: any): AxiosPromise<Array<DeprecatedSearchHitDeprecatedSimpleAddress>> {
            return APIV1DeprecatedApiFp(configuration).searchSteadByGuid(guid, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * APIV1DeprecatedApi - object-oriented interface
 * @export
 * @class APIV1DeprecatedApi
 * @extends {BaseAPI}
 */
export class APIV1DeprecatedApi extends BaseAPI {
    /**
     * Возвращает объект адреса по его ID
     * @summary Возвращает объект адреса
     * @param {string} guid
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof APIV1DeprecatedApi
     */
    public searchAddressByGuid(guid: string, options?: any) {
        return APIV1DeprecatedApiFp(this.configuration).searchAddressByGuid(guid, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Осуществляет поиск объект адреса по query
     * @summary Поиск по query
     * @param {string} query
     * @param {boolean} slice
     * @param {boolean} postal
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof APIV1DeprecatedApi
     */
    public searchAll(query: string, slice: boolean, postal: boolean, options?: any) {
        return APIV1DeprecatedApiFp(this.configuration).searchAll(query, slice, postal, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Осуществляет поиск объект адреса по fullname на полное посимвольное соответствие
     * @summary Поиск на полное совпадение адреса
     * @param {string} query
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof APIV1DeprecatedApi
     */
    public searchEqual(query: string, options?: any) {
        return APIV1DeprecatedApiFp(this.configuration).searchEqual(query, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Возвращает объект адреса по его ID
     * @summary Возвращает объект адреса
     * @param {string} guid
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof APIV1DeprecatedApi
     */
    public searchHouseByGuid(guid: string, options?: any) {
        return APIV1DeprecatedApiFp(this.configuration).searchHouseByGuid(guid, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Возвращает объект адреса по его ID
     * @summary Возвращает объект адреса
     * @param {string} guid
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof APIV1DeprecatedApi
     */
    public searchRoomByGuid(guid: string, options?: any) {
        return APIV1DeprecatedApiFp(this.configuration).searchRoomByGuid(guid, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Возвращает объект адреса по его ID
     * @summary Возвращает объект адреса
     * @param {string} guid
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof APIV1DeprecatedApi
     */
    public searchSteadByGuid(guid: string, options?: any) {
        return APIV1DeprecatedApiFp(this.configuration).searchSteadByGuid(guid, options).then((request) => request(this.axios, this.basePath));
    }

}


/**
 * APIV2Api - axios parameter creator
 * @export
 */
export const APIV2ApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Осуществляет поиск объекта адреса по query
         * @summary Поиск по query
         * @param {SearchRequest} searchRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        search: async (searchRequest: SearchRequest, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'searchRequest' is not null or undefined
            if (searchRequest === null || searchRequest === undefined) {
                throw new RequiredError('searchRequest','Required parameter searchRequest was null or undefined when calling search.');
            }
            const localVarPath = `/v2`;
            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;charset=utf-8';

            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 searchRequest !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(searchRequest !== undefined ? searchRequest : {}) : (searchRequest || "");

            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchById: async (id: 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 searchById.');
            }
            const localVarPath = `/v2/{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;



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

/**
 * APIV2Api - functional programming interface
 * @export
 */
export const APIV2ApiFp = function(configuration?: Configuration) {
    return {
        /**
         * Осуществляет поиск объекта адреса по query
         * @summary Поиск по query
         * @param {SearchRequest} searchRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async search(searchRequest: SearchRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchWrapper>> {
            const localVarAxiosArgs = await APIV2ApiAxiosParamCreator(configuration).search(searchRequest, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchById(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AddressTO>> {
            const localVarAxiosArgs = await APIV2ApiAxiosParamCreator(configuration).searchById(id, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                return axios.request(axiosRequestArgs);
            };
        },
    }
};

/**
 * APIV2Api - factory interface
 * @export
 */
export const APIV2ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    return {
        /**
         * Осуществляет поиск объекта адреса по query
         * @summary Поиск по query
         * @param {SearchRequest} searchRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        search(searchRequest: SearchRequest, options?: any): AxiosPromise<SearchWrapper> {
            return APIV2ApiFp(configuration).search(searchRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * Возвращает объект адреса по его ID
         * @summary Возвращает объект адреса
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchById(id: string, options?: any): AxiosPromise<AddressTO> {
            return APIV2ApiFp(configuration).searchById(id, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * APIV2Api - object-oriented interface
 * @export
 * @class APIV2Api
 * @extends {BaseAPI}
 */
export class APIV2Api extends BaseAPI {
    /**
     * Осуществляет поиск объекта адреса по query
     * @summary Поиск по query
     * @param {SearchRequest} searchRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof APIV2Api
     */
    public search(searchRequest: SearchRequest, options?: any) {
        return APIV2ApiFp(this.configuration).search(searchRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Возвращает объект адреса по его ID
     * @summary Возвращает объект адреса
     * @param {string} id
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof APIV2Api
     */
    public searchById(id: string, options?: any) {
        return APIV2ApiFp(this.configuration).searchById(id, options).then((request) => request(this.axios, this.basePath));
    }

}


