// 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';
/**
 * DevicesApi - axios parameter creator
 * @export
 */
export const DevicesApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @param {ApiDevice} device string password &#x3D; 2;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDevice: async (device, options = {}) => {
            // verify required parameter 'device' is not null or undefined
            if (device === null || device === undefined) {
                throw new RequiredError('device', 'Required parameter device was null or undefined when calling createDevice.');
            }
            const localVarPath = `/devices`;
            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;
            }
            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 device !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(device !== undefined ? device : {})
                : device || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @param {string} id
         * @param {boolean} [permanent]
         * @param {Array<string>} [ids] bulk
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDevice: async (id, permanent, ids, options = {}) => {
            // 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 deleteDevice.');
            }
            const localVarPath = `/devices/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            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 (permanent !== undefined) {
                localVarQueryParameter['permanent'] = permanent;
            }
            if (ids) {
                localVarQueryParameter['ids'] = ids;
            }
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @param {Array<string>} ids bulk
         * @param {string} [id]
         * @param {boolean} [permanent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDevice2: async (ids, id, permanent, options = {}) => {
            // verify required parameter 'ids' is not null or undefined
            if (ids === null || ids === undefined) {
                throw new RequiredError('ids', 'Required parameter ids was null or undefined when calling deleteDevice2.');
            }
            const localVarPath = `/devices`;
            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 (id !== undefined) {
                localVarQueryParameter['id'] = id;
            }
            if (permanent !== undefined) {
                localVarQueryParameter['permanent'] = permanent;
            }
            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 ids !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(ids !== undefined ? ids : {})
                : ids || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @param {string} deviceId Object ID
         * @param {string} [userId] Object ID
         * @param {string} [userName] Display Name
         * @param {string} [deviceName] Display Name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listRegistrations: async (deviceId, userId, userName, deviceName, options = {}) => {
            // verify required parameter 'deviceId' is not null or undefined
            if (deviceId === null || deviceId === undefined) {
                throw new RequiredError('deviceId', 'Required parameter deviceId was null or undefined when calling listRegistrations.');
            }
            const localVarPath = `/devices/{device.id}/registered`.replace(`{${'device.id'}}`, encodeURIComponent(String(deviceId)));
            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 (userId !== undefined) {
                localVarQueryParameter['user.id'] = userId;
            }
            if (userName !== undefined) {
                localVarQueryParameter['user.name'] = userName;
            }
            if (deviceName !== undefined) {
                localVarQueryParameter['device.name'] = deviceName;
            }
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @param {string} id
         * @param {Array<string>} [fields] output selection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readDevice: async (id, fields, options = {}) => {
            // 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 readDevice.');
            }
            const localVarPath = `/devices/{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 = {};
            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,
            };
        },
        /**
         *
         * @param {number} [size] ----- Select Options -------------------------  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {Array<string>} [ids] ----- Search Basic Filters ---------------------------  selection: by unique identifier
         * @param {string} [q] term-of-search: lookup[name,account,hotdesk,brand,model,mac,ip]
         * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
         * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
         * @param {string} [account] ----- Device-Specific Filters ----------------  substring like \&#39;%name%\&#39;
         * @param {string} [hotdesk] filter: has hotdesk (&#x3D;pattern); is hotdesk (&#x3D;*)
         * @param {string} [userId] Object ID
         * @param {string} [userName] Display Name
         * @param {string} [mac] filter: by MAC address
         * @param {string} [ip] filter: by IP address
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchDevice: async (size, page, fields, sort, ids, q, name, access, account, hotdesk, userId, userName, mac, ip, options = {}) => {
            const localVarPath = `/devices`;
            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 (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (ids) {
                localVarQueryParameter['ids'] = ids;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (name !== undefined) {
                localVarQueryParameter['name'] = name;
            }
            if (access !== undefined) {
                localVarQueryParameter['access'] = access;
            }
            if (account !== undefined) {
                localVarQueryParameter['account'] = account;
            }
            if (hotdesk !== undefined) {
                localVarQueryParameter['hotdesk'] = hotdesk;
            }
            if (userId !== undefined) {
                localVarQueryParameter['user.id'] = userId;
            }
            if (userName !== undefined) {
                localVarQueryParameter['user.name'] = userName;
            }
            if (mac !== undefined) {
                localVarQueryParameter['mac'] = mac;
            }
            if (ip !== undefined) {
                localVarQueryParameter['ip'] = ip;
            }
            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 ----- Details (1:M) ----------------------------------------------
         * @param {string} deviceId Object ID
         * @param {string} [userId] Object ID
         * @param {string} [userName] Display Name
         * @param {string} [deviceName] Display Name
         * @param {string} [timeFrom] Filter: timing range (optional)  unix milliseconds
         * @param {string} [timeTill] unix milliseconds
         * @param {Array<string>} [fields] Search Options
         * @param {Array<string>} [sort]
         * @param {number} [size]
         * @param {number} [page]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchDeviceAudit: async (deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options = {}) => {
            // verify required parameter 'deviceId' is not null or undefined
            if (deviceId === null || deviceId === undefined) {
                throw new RequiredError('deviceId', 'Required parameter deviceId was null or undefined when calling searchDeviceAudit.');
            }
            const localVarPath = `/devices/{device.id}/users/audit`.replace(`{${'device.id'}}`, encodeURIComponent(String(deviceId)));
            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 (userId !== undefined) {
                localVarQueryParameter['user.id'] = userId;
            }
            if (userName !== undefined) {
                localVarQueryParameter['user.name'] = userName;
            }
            if (deviceName !== undefined) {
                localVarQueryParameter['device.name'] = deviceName;
            }
            if (timeFrom !== undefined) {
                localVarQueryParameter['time_from'] = timeFrom;
            }
            if (timeTill !== undefined) {
                localVarQueryParameter['time_till'] = timeTill;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @param {string} deviceId object id
         * @param {DeviceProfile} device
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDevice: async (deviceId, device, fields, options = {}) => {
            // verify required parameter 'deviceId' is not null or undefined
            if (deviceId === null || deviceId === undefined) {
                throw new RequiredError('deviceId', 'Required parameter deviceId was null or undefined when calling updateDevice.');
            }
            // verify required parameter 'device' is not null or undefined
            if (device === null || device === undefined) {
                throw new RequiredError('device', 'Required parameter device was null or undefined when calling updateDevice.');
            }
            const localVarPath = `/devices/{device.id}`.replace(`{${'device.id'}}`, encodeURIComponent(String(deviceId)));
            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 device !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(device !== undefined ? device : {})
                : device || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @param {string} deviceId object id
         * @param {DeviceProfile1} device
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDevice2: async (deviceId, device, fields, options = {}) => {
            // verify required parameter 'deviceId' is not null or undefined
            if (deviceId === null || deviceId === undefined) {
                throw new RequiredError('deviceId', 'Required parameter deviceId was null or undefined when calling updateDevice2.');
            }
            // verify required parameter 'device' is not null or undefined
            if (device === null || device === undefined) {
                throw new RequiredError('device', 'Required parameter device was null or undefined when calling updateDevice2.');
            }
            const localVarPath = `/devices/{device.id}`.replace(`{${'device.id'}}`, encodeURIComponent(String(deviceId)));
            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 device !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(device !== undefined ? device : {})
                : device || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
/**
 * DevicesApi - functional programming interface
 * @export
 */
export const DevicesApiFp = function (configuration) {
    return {
        /**
         *
         * @param {ApiDevice} device string password &#x3D; 2;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createDevice(device, options) {
            const localVarAxiosArgs = await DevicesApiAxiosParamCreator(configuration).createDevice(device, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {string} id
         * @param {boolean} [permanent]
         * @param {Array<string>} [ids] bulk
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteDevice(id, permanent, ids, options) {
            const localVarAxiosArgs = await DevicesApiAxiosParamCreator(configuration).deleteDevice(id, permanent, ids, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {Array<string>} ids bulk
         * @param {string} [id]
         * @param {boolean} [permanent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteDevice2(ids, id, permanent, options) {
            const localVarAxiosArgs = await DevicesApiAxiosParamCreator(configuration).deleteDevice2(ids, id, permanent, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {string} deviceId Object ID
         * @param {string} [userId] Object ID
         * @param {string} [userName] Display Name
         * @param {string} [deviceName] Display Name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listRegistrations(deviceId, userId, userName, deviceName, options) {
            const localVarAxiosArgs = await DevicesApiAxiosParamCreator(configuration).listRegistrations(deviceId, userId, userName, deviceName, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {string} id
         * @param {Array<string>} [fields] output selection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async readDevice(id, fields, options) {
            const localVarAxiosArgs = await DevicesApiAxiosParamCreator(configuration).readDevice(id, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {number} [size] ----- Select Options -------------------------  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {Array<string>} [ids] ----- Search Basic Filters ---------------------------  selection: by unique identifier
         * @param {string} [q] term-of-search: lookup[name,account,hotdesk,brand,model,mac,ip]
         * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
         * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
         * @param {string} [account] ----- Device-Specific Filters ----------------  substring like \&#39;%name%\&#39;
         * @param {string} [hotdesk] filter: has hotdesk (&#x3D;pattern); is hotdesk (&#x3D;*)
         * @param {string} [userId] Object ID
         * @param {string} [userName] Display Name
         * @param {string} [mac] filter: by MAC address
         * @param {string} [ip] filter: by IP address
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchDevice(size, page, fields, sort, ids, q, name, access, account, hotdesk, userId, userName, mac, ip, options) {
            const localVarAxiosArgs = await DevicesApiAxiosParamCreator(configuration).searchDevice(size, page, fields, sort, ids, q, name, access, account, hotdesk, userId, userName, mac, ip, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary ----- Details (1:M) ----------------------------------------------
         * @param {string} deviceId Object ID
         * @param {string} [userId] Object ID
         * @param {string} [userName] Display Name
         * @param {string} [deviceName] Display Name
         * @param {string} [timeFrom] Filter: timing range (optional)  unix milliseconds
         * @param {string} [timeTill] unix milliseconds
         * @param {Array<string>} [fields] Search Options
         * @param {Array<string>} [sort]
         * @param {number} [size]
         * @param {number} [page]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchDeviceAudit(deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options) {
            const localVarAxiosArgs = await DevicesApiAxiosParamCreator(configuration).searchDeviceAudit(deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {string} deviceId object id
         * @param {DeviceProfile} device
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateDevice(deviceId, device, fields, options) {
            const localVarAxiosArgs = await DevicesApiAxiosParamCreator(configuration).updateDevice(deviceId, device, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {string} deviceId object id
         * @param {DeviceProfile1} device
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateDevice2(deviceId, device, fields, options) {
            const localVarAxiosArgs = await DevicesApiAxiosParamCreator(configuration).updateDevice2(deviceId, device, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
    };
};
/**
 * DevicesApi - factory interface
 * @export
 */
export const DevicesApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @param {ApiDevice} device string password &#x3D; 2;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDevice(device, options) {
            return DevicesApiFp(configuration)
                .createDevice(device, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} id
         * @param {boolean} [permanent]
         * @param {Array<string>} [ids] bulk
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDevice(id, permanent, ids, options) {
            return DevicesApiFp(configuration)
                .deleteDevice(id, permanent, ids, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {Array<string>} ids bulk
         * @param {string} [id]
         * @param {boolean} [permanent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDevice2(ids, id, permanent, options) {
            return DevicesApiFp(configuration)
                .deleteDevice2(ids, id, permanent, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} deviceId Object ID
         * @param {string} [userId] Object ID
         * @param {string} [userName] Display Name
         * @param {string} [deviceName] Display Name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listRegistrations(deviceId, userId, userName, deviceName, options) {
            return DevicesApiFp(configuration)
                .listRegistrations(deviceId, userId, userName, deviceName, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} id
         * @param {Array<string>} [fields] output selection
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readDevice(id, fields, options) {
            return DevicesApiFp(configuration)
                .readDevice(id, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {number} [size] ----- Select Options -------------------------  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {Array<string>} [ids] ----- Search Basic Filters ---------------------------  selection: by unique identifier
         * @param {string} [q] term-of-search: lookup[name,account,hotdesk,brand,model,mac,ip]
         * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
         * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
         * @param {string} [account] ----- Device-Specific Filters ----------------  substring like \&#39;%name%\&#39;
         * @param {string} [hotdesk] filter: has hotdesk (&#x3D;pattern); is hotdesk (&#x3D;*)
         * @param {string} [userId] Object ID
         * @param {string} [userName] Display Name
         * @param {string} [mac] filter: by MAC address
         * @param {string} [ip] filter: by IP address
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchDevice(size, page, fields, sort, ids, q, name, access, account, hotdesk, userId, userName, mac, ip, options) {
            return DevicesApiFp(configuration)
                .searchDevice(size, page, fields, sort, ids, q, name, access, account, hotdesk, userId, userName, mac, ip, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary ----- Details (1:M) ----------------------------------------------
         * @param {string} deviceId Object ID
         * @param {string} [userId] Object ID
         * @param {string} [userName] Display Name
         * @param {string} [deviceName] Display Name
         * @param {string} [timeFrom] Filter: timing range (optional)  unix milliseconds
         * @param {string} [timeTill] unix milliseconds
         * @param {Array<string>} [fields] Search Options
         * @param {Array<string>} [sort]
         * @param {number} [size]
         * @param {number} [page]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchDeviceAudit(deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options) {
            return DevicesApiFp(configuration)
                .searchDeviceAudit(deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} deviceId object id
         * @param {DeviceProfile} device
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDevice(deviceId, device, fields, options) {
            return DevicesApiFp(configuration)
                .updateDevice(deviceId, device, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} deviceId object id
         * @param {DeviceProfile1} device
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDevice2(deviceId, device, fields, options) {
            return DevicesApiFp(configuration)
                .updateDevice2(deviceId, device, fields, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * DevicesApi - object-oriented interface
 * @export
 * @class DevicesApi
 * @extends {BaseAPI}
 */
export class DevicesApi extends BaseAPI {
    /**
     *
     * @param {ApiDevice} device string password &#x3D; 2;
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DevicesApi
     */
    createDevice(device, options) {
        return DevicesApiFp(this.configuration)
            .createDevice(device, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} id
     * @param {boolean} [permanent]
     * @param {Array<string>} [ids] bulk
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DevicesApi
     */
    deleteDevice(id, permanent, ids, options) {
        return DevicesApiFp(this.configuration)
            .deleteDevice(id, permanent, ids, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {Array<string>} ids bulk
     * @param {string} [id]
     * @param {boolean} [permanent]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DevicesApi
     */
    deleteDevice2(ids, id, permanent, options) {
        return DevicesApiFp(this.configuration)
            .deleteDevice2(ids, id, permanent, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} deviceId Object ID
     * @param {string} [userId] Object ID
     * @param {string} [userName] Display Name
     * @param {string} [deviceName] Display Name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DevicesApi
     */
    listRegistrations(deviceId, userId, userName, deviceName, options) {
        return DevicesApiFp(this.configuration)
            .listRegistrations(deviceId, userId, userName, deviceName, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} id
     * @param {Array<string>} [fields] output selection
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DevicesApi
     */
    readDevice(id, fields, options) {
        return DevicesApiFp(this.configuration)
            .readDevice(id, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {number} [size] ----- Select Options -------------------------  default: 16
     * @param {number} [page] default: 1
     * @param {Array<string>} [fields] attributes list
     * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
     * @param {Array<string>} [ids] ----- Search Basic Filters ---------------------------  selection: by unique identifier
     * @param {string} [q] term-of-search: lookup[name,account,hotdesk,brand,model,mac,ip]
     * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
     * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
     * @param {string} [account] ----- Device-Specific Filters ----------------  substring like \&#39;%name%\&#39;
     * @param {string} [hotdesk] filter: has hotdesk (&#x3D;pattern); is hotdesk (&#x3D;*)
     * @param {string} [userId] Object ID
     * @param {string} [userName] Display Name
     * @param {string} [mac] filter: by MAC address
     * @param {string} [ip] filter: by IP address
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DevicesApi
     */
    searchDevice(size, page, fields, sort, ids, q, name, access, account, hotdesk, userId, userName, mac, ip, options) {
        return DevicesApiFp(this.configuration)
            .searchDevice(size, page, fields, sort, ids, q, name, access, account, hotdesk, userId, userName, mac, ip, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary ----- Details (1:M) ----------------------------------------------
     * @param {string} deviceId Object ID
     * @param {string} [userId] Object ID
     * @param {string} [userName] Display Name
     * @param {string} [deviceName] Display Name
     * @param {string} [timeFrom] Filter: timing range (optional)  unix milliseconds
     * @param {string} [timeTill] unix milliseconds
     * @param {Array<string>} [fields] Search Options
     * @param {Array<string>} [sort]
     * @param {number} [size]
     * @param {number} [page]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DevicesApi
     */
    searchDeviceAudit(deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options) {
        return DevicesApiFp(this.configuration)
            .searchDeviceAudit(deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} deviceId object id
     * @param {DeviceProfile} device
     * @param {Array<string>} [fields] PATCH: partial update
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DevicesApi
     */
    updateDevice(deviceId, device, fields, options) {
        return DevicesApiFp(this.configuration)
            .updateDevice(deviceId, device, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} deviceId object id
     * @param {DeviceProfile1} device
     * @param {Array<string>} [fields] PATCH: partial update
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DevicesApi
     */
    updateDevice2(deviceId, device, fields, options) {
        return DevicesApiFp(this.configuration)
            .updateDevice2(deviceId, device, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=devices-api.js.map