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


import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { DeliveryTypeDictionaryItem } from '../models';
/**
 * DeliveryDirectionsServiceApi - axios parameter creator
 * @export
 */
export const DeliveryDirectionsServiceApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Получение справочника повесток
         * @summary Получение справочника доставки
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDeliveryTypeDirections: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/ervu-subpoena-registry/dictionary/deliveryDirections`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


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

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

/**
 * DeliveryDirectionsServiceApi - functional programming interface
 * @export
 */
export const DeliveryDirectionsServiceApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = DeliveryDirectionsServiceApiAxiosParamCreator(configuration)
    return {
        /**
         * Получение справочника повесток
         * @summary Получение справочника доставки
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getDeliveryTypeDirections(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DeliveryTypeDictionaryItem>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getDeliveryTypeDirections(options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
    }
};

/**
 * DeliveryDirectionsServiceApi - factory interface
 * @export
 */
export const DeliveryDirectionsServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = DeliveryDirectionsServiceApiFp(configuration)
    return {
        /**
         * Получение справочника повесток
         * @summary Получение справочника доставки
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDeliveryTypeDirections(options?: any): AxiosPromise<Array<DeliveryTypeDictionaryItem>> {
            return localVarFp.getDeliveryTypeDirections(options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * DeliveryDirectionsServiceApi - object-oriented interface
 * @export
 * @class DeliveryDirectionsServiceApi
 * @extends {BaseAPI}
 */
export class DeliveryDirectionsServiceApi extends BaseAPI {
    /**
     * Получение справочника повесток
     * @summary Получение справочника доставки
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DeliveryDirectionsServiceApi
     */
    public getDeliveryTypeDirections(options?: AxiosRequestConfig) {
        return DeliveryDirectionsServiceApiFp(this.configuration).getDeliveryTypeDirections(options).then((request) => request(this.axios, this.basePath));
    }
}
