// tslint:disable
/**
 * Webitel API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 24.04.0
 * Contact: support@webitel.com
 *
 * 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 globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, BaseAPI, RequiredError, } from '../base';
/**
 * LanguagesApi - axios parameter creator
 * @export
 */
export const LanguagesApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Associate more language(s) with the Contact.
         * @param {string} contactId Link contact ID.
         * @param {Array<ContactsInputLanguage>} input Array of the unique well-formed IETF BCP 47 language tag(s) to associate with the Contact. The first element will become &#x60;primary&#x60; one.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        addContactLanguages: async (contactId, input, fields, options = {}) => {
            // verify required parameter 'contactId' is not null or undefined
            if (contactId === null || contactId === undefined) {
                throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling addContactLanguages.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling addContactLanguages.');
            }
            const localVarPath = `/contacts/{contact_id}/languages`.replace(`{${'contact_id'}}`, encodeURIComponent(String(contactId)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'POST',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Remove the Contact\'s language association.
         * @param {string} contactId Contact ID associated with.
         * @param {string} etag Unique ID of the language association: {id,etag,code}.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        delContactLanguage: async (contactId, etag, fields, options = {}) => {
            // verify required parameter 'contactId' is not null or undefined
            if (contactId === null || contactId === undefined) {
                throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling delContactLanguage.');
            }
            // verify required parameter 'etag' is not null or undefined
            if (etag === null || etag === undefined) {
                throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling delContactLanguage.');
            }
            const localVarPath = `/contacts/{contact_id}/languages/{etag}`
                .replace(`{${'contact_id'}}`, encodeURIComponent(String(contactId)))
                .replace(`{${'etag'}}`, encodeURIComponent(String(etag)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'DELETE',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 Remove the Contact\'s language association(s).
         * @param {string} contactId Link contact ID.
         * @param {Array<string>} etag Set of unique language{etag} association(s) to remove.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        delContactLanguages: async (contactId, etag, fields, options = {}) => {
            // verify required parameter 'contactId' is not null or undefined
            if (contactId === null || contactId === undefined) {
                throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling delContactLanguages.');
            }
            // verify required parameter 'etag' is not null or undefined
            if (etag === null || etag === undefined) {
                throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling delContactLanguages.');
            }
            const localVarPath = `/contacts/{contact_id}/languages`.replace(`{${'contact_id'}}`, encodeURIComponent(String(contactId)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'DELETE',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (etag) {
                localVarQueryParameter['etag'] = etag;
            }
            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 List of the Contact\'s language association(s).
         * @param {string} contactId Contact ID associated with.
         * @param {number} [page] Page number of result dataset records. offset &#x3D; (page*size)
         * @param {number} [size] Size count of records on result page. limit &#x3D; (size++)
         * @param {string} [q] Search term: language tag (lang, name, region, ..) &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
         * @param {Array<string>} [sort] Sort the result according to fields.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {Array<string>} [id] Language(s) with unique ID|ETag only.
         * @param {boolean} [primary] Primary language only.
         * @param {string} [code]
         * @param {string} [lang]
         * @param {string} [name]
         * @param {string} [region]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContactLanguages: async (contactId, page, size, q, sort, fields, id, primary, code, lang, name, region, options = {}) => {
            // verify required parameter 'contactId' is not null or undefined
            if (contactId === null || contactId === undefined) {
                throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling getContactLanguages.');
            }
            const localVarPath = `/contacts/{contact_id}/languages`.replace(`{${'contact_id'}}`, encodeURIComponent(String(contactId)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'GET',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (primary !== undefined) {
                localVarQueryParameter['primary'] = primary;
            }
            if (code !== undefined) {
                localVarQueryParameter['code'] = code;
            }
            if (lang !== undefined) {
                localVarQueryParameter['lang'] = lang;
            }
            if (name !== undefined) {
                localVarQueryParameter['name'] = name;
            }
            if (region !== undefined) {
                localVarQueryParameter['region'] = region;
            }
            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 Update the Contact\'s language association details.
         * @param {string} contactId Contact ID associated with.
         * @param {string} etag Unique ID of the latest version of an existing association.
         * @param {InlineObject2} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setContactLanguage: async (contactId, etag, input, fields, options = {}) => {
            // verify required parameter 'contactId' is not null or undefined
            if (contactId === null || contactId === undefined) {
                throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling setContactLanguage.');
            }
            // verify required parameter 'etag' is not null or undefined
            if (etag === null || etag === undefined) {
                throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling setContactLanguage.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling setContactLanguage.');
            }
            const localVarPath = `/contacts/{contact_id}/languages/{etag}`
                .replace(`{${'contact_id'}}`, encodeURIComponent(String(contactId)))
                .replace(`{${'etag'}}`, encodeURIComponent(String(etag)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'PUT',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Update the Contact\'s language association details.
         * @param {string} contactId Contact ID associated with.
         * @param {string} etag Unique ID of the latest version of an existing association.
         * @param {InlineObject3} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setContactLanguage2: async (contactId, etag, input, fields, options = {}) => {
            // verify required parameter 'contactId' is not null or undefined
            if (contactId === null || contactId === undefined) {
                throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling setContactLanguage2.');
            }
            // verify required parameter 'etag' is not null or undefined
            if (etag === null || etag === undefined) {
                throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling setContactLanguage2.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling setContactLanguage2.');
            }
            const localVarPath = `/contacts/{contact_id}/languages/{etag}`
                .replace(`{${'contact_id'}}`, encodeURIComponent(String(contactId)))
                .replace(`{${'etag'}}`, encodeURIComponent(String(etag)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'PATCH',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Reset all Contact\'s languages to fit the specified fixed set.
         * @param {string} contactId Contact ID associated with.
         * @param {Array<ContactsInputLanguage>} input Final set [array] of the unique well-formed IETF BCP 47 language tag(s) to associate with the Contact. The first element will become &#x60;primary&#x60; one.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setContactLanguages: async (contactId, input, fields, options = {}) => {
            // verify required parameter 'contactId' is not null or undefined
            if (contactId === null || contactId === undefined) {
                throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling setContactLanguages.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling setContactLanguages.');
            }
            const localVarPath = `/contacts/{contact_id}/languages`.replace(`{${'contact_id'}}`, encodeURIComponent(String(contactId)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'PUT',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
/**
 * LanguagesApi - functional programming interface
 * @export
 */
export const LanguagesApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Associate more language(s) with the Contact.
         * @param {string} contactId Link contact ID.
         * @param {Array<ContactsInputLanguage>} input Array of the unique well-formed IETF BCP 47 language tag(s) to associate with the Contact. The first element will become &#x60;primary&#x60; one.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async addContactLanguages(contactId, input, fields, options) {
            const localVarAxiosArgs = await LanguagesApiAxiosParamCreator(configuration).addContactLanguages(contactId, input, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Remove the Contact\'s language association.
         * @param {string} contactId Contact ID associated with.
         * @param {string} etag Unique ID of the language association: {id,etag,code}.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async delContactLanguage(contactId, etag, fields, options) {
            const localVarAxiosArgs = await LanguagesApiAxiosParamCreator(configuration).delContactLanguage(contactId, etag, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Remove the Contact\'s language association(s).
         * @param {string} contactId Link contact ID.
         * @param {Array<string>} etag Set of unique language{etag} association(s) to remove.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async delContactLanguages(contactId, etag, fields, options) {
            const localVarAxiosArgs = await LanguagesApiAxiosParamCreator(configuration).delContactLanguages(contactId, etag, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary List of the Contact\'s language association(s).
         * @param {string} contactId Contact ID associated with.
         * @param {number} [page] Page number of result dataset records. offset &#x3D; (page*size)
         * @param {number} [size] Size count of records on result page. limit &#x3D; (size++)
         * @param {string} [q] Search term: language tag (lang, name, region, ..) &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
         * @param {Array<string>} [sort] Sort the result according to fields.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {Array<string>} [id] Language(s) with unique ID|ETag only.
         * @param {boolean} [primary] Primary language only.
         * @param {string} [code]
         * @param {string} [lang]
         * @param {string} [name]
         * @param {string} [region]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getContactLanguages(contactId, page, size, q, sort, fields, id, primary, code, lang, name, region, options) {
            const localVarAxiosArgs = await LanguagesApiAxiosParamCreator(configuration).getContactLanguages(contactId, page, size, q, sort, fields, id, primary, code, lang, name, region, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Update the Contact\'s language association details.
         * @param {string} contactId Contact ID associated with.
         * @param {string} etag Unique ID of the latest version of an existing association.
         * @param {InlineObject2} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setContactLanguage(contactId, etag, input, fields, options) {
            const localVarAxiosArgs = await LanguagesApiAxiosParamCreator(configuration).setContactLanguage(contactId, etag, input, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Update the Contact\'s language association details.
         * @param {string} contactId Contact ID associated with.
         * @param {string} etag Unique ID of the latest version of an existing association.
         * @param {InlineObject3} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setContactLanguage2(contactId, etag, input, fields, options) {
            const localVarAxiosArgs = await LanguagesApiAxiosParamCreator(configuration).setContactLanguage2(contactId, etag, input, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Reset all Contact\'s languages to fit the specified fixed set.
         * @param {string} contactId Contact ID associated with.
         * @param {Array<ContactsInputLanguage>} input Final set [array] of the unique well-formed IETF BCP 47 language tag(s) to associate with the Contact. The first element will become &#x60;primary&#x60; one.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async setContactLanguages(contactId, input, fields, options) {
            const localVarAxiosArgs = await LanguagesApiAxiosParamCreator(configuration).setContactLanguages(contactId, input, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
    };
};
/**
 * LanguagesApi - factory interface
 * @export
 */
export const LanguagesApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Associate more language(s) with the Contact.
         * @param {string} contactId Link contact ID.
         * @param {Array<ContactsInputLanguage>} input Array of the unique well-formed IETF BCP 47 language tag(s) to associate with the Contact. The first element will become &#x60;primary&#x60; one.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        addContactLanguages(contactId, input, fields, options) {
            return LanguagesApiFp(configuration)
                .addContactLanguages(contactId, input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Remove the Contact\'s language association.
         * @param {string} contactId Contact ID associated with.
         * @param {string} etag Unique ID of the language association: {id,etag,code}.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        delContactLanguage(contactId, etag, fields, options) {
            return LanguagesApiFp(configuration)
                .delContactLanguage(contactId, etag, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Remove the Contact\'s language association(s).
         * @param {string} contactId Link contact ID.
         * @param {Array<string>} etag Set of unique language{etag} association(s) to remove.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        delContactLanguages(contactId, etag, fields, options) {
            return LanguagesApiFp(configuration)
                .delContactLanguages(contactId, etag, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List of the Contact\'s language association(s).
         * @param {string} contactId Contact ID associated with.
         * @param {number} [page] Page number of result dataset records. offset &#x3D; (page*size)
         * @param {number} [size] Size count of records on result page. limit &#x3D; (size++)
         * @param {string} [q] Search term: language tag (lang, name, region, ..) &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
         * @param {Array<string>} [sort] Sort the result according to fields.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {Array<string>} [id] Language(s) with unique ID|ETag only.
         * @param {boolean} [primary] Primary language only.
         * @param {string} [code]
         * @param {string} [lang]
         * @param {string} [name]
         * @param {string} [region]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContactLanguages(contactId, page, size, q, sort, fields, id, primary, code, lang, name, region, options) {
            return LanguagesApiFp(configuration)
                .getContactLanguages(contactId, page, size, q, sort, fields, id, primary, code, lang, name, region, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update the Contact\'s language association details.
         * @param {string} contactId Contact ID associated with.
         * @param {string} etag Unique ID of the latest version of an existing association.
         * @param {InlineObject2} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setContactLanguage(contactId, etag, input, fields, options) {
            return LanguagesApiFp(configuration)
                .setContactLanguage(contactId, etag, input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update the Contact\'s language association details.
         * @param {string} contactId Contact ID associated with.
         * @param {string} etag Unique ID of the latest version of an existing association.
         * @param {InlineObject3} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setContactLanguage2(contactId, etag, input, fields, options) {
            return LanguagesApiFp(configuration)
                .setContactLanguage2(contactId, etag, input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Reset all Contact\'s languages to fit the specified fixed set.
         * @param {string} contactId Contact ID associated with.
         * @param {Array<ContactsInputLanguage>} input Final set [array] of the unique well-formed IETF BCP 47 language tag(s) to associate with the Contact. The first element will become &#x60;primary&#x60; one.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        setContactLanguages(contactId, input, fields, options) {
            return LanguagesApiFp(configuration)
                .setContactLanguages(contactId, input, fields, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * LanguagesApi - object-oriented interface
 * @export
 * @class LanguagesApi
 * @extends {BaseAPI}
 */
export class LanguagesApi extends BaseAPI {
    /**
     *
     * @summary Associate more language(s) with the Contact.
     * @param {string} contactId Link contact ID.
     * @param {Array<ContactsInputLanguage>} input Array of the unique well-formed IETF BCP 47 language tag(s) to associate with the Contact. The first element will become &#x60;primary&#x60; one.
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LanguagesApi
     */
    addContactLanguages(contactId, input, fields, options) {
        return LanguagesApiFp(this.configuration)
            .addContactLanguages(contactId, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Remove the Contact\'s language association.
     * @param {string} contactId Contact ID associated with.
     * @param {string} etag Unique ID of the language association: {id,etag,code}.
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LanguagesApi
     */
    delContactLanguage(contactId, etag, fields, options) {
        return LanguagesApiFp(this.configuration)
            .delContactLanguage(contactId, etag, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Remove the Contact\'s language association(s).
     * @param {string} contactId Link contact ID.
     * @param {Array<string>} etag Set of unique language{etag} association(s) to remove.
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LanguagesApi
     */
    delContactLanguages(contactId, etag, fields, options) {
        return LanguagesApiFp(this.configuration)
            .delContactLanguages(contactId, etag, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List of the Contact\'s language association(s).
     * @param {string} contactId Contact ID associated with.
     * @param {number} [page] Page number of result dataset records. offset &#x3D; (page*size)
     * @param {number} [size] Size count of records on result page. limit &#x3D; (size++)
     * @param {string} [q] Search term: language tag (lang, name, region, ..) &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
     * @param {Array<string>} [sort] Sort the result according to fields.
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {Array<string>} [id] Language(s) with unique ID|ETag only.
     * @param {boolean} [primary] Primary language only.
     * @param {string} [code]
     * @param {string} [lang]
     * @param {string} [name]
     * @param {string} [region]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LanguagesApi
     */
    getContactLanguages(contactId, page, size, q, sort, fields, id, primary, code, lang, name, region, options) {
        return LanguagesApiFp(this.configuration)
            .getContactLanguages(contactId, page, size, q, sort, fields, id, primary, code, lang, name, region, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update the Contact\'s language association details.
     * @param {string} contactId Contact ID associated with.
     * @param {string} etag Unique ID of the latest version of an existing association.
     * @param {InlineObject2} input
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LanguagesApi
     */
    setContactLanguage(contactId, etag, input, fields, options) {
        return LanguagesApiFp(this.configuration)
            .setContactLanguage(contactId, etag, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update the Contact\'s language association details.
     * @param {string} contactId Contact ID associated with.
     * @param {string} etag Unique ID of the latest version of an existing association.
     * @param {InlineObject3} input
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LanguagesApi
     */
    setContactLanguage2(contactId, etag, input, fields, options) {
        return LanguagesApiFp(this.configuration)
            .setContactLanguage2(contactId, etag, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Reset all Contact\'s languages to fit the specified fixed set.
     * @param {string} contactId Contact ID associated with.
     * @param {Array<ContactsInputLanguage>} input Final set [array] of the unique well-formed IETF BCP 47 language tag(s) to associate with the Contact. The first element will become &#x60;primary&#x60; one.
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LanguagesApi
     */
    setContactLanguages(contactId, input, fields, options) {
        return LanguagesApiFp(this.configuration)
            .setContactLanguages(contactId, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=languages-api.js.map