// 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 { __awaiter } from "tslib";
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: (device, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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: (id, permanent, ids, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (permanent !== undefined) {
                localVarQueryParameter['permanent'] = permanent;
            }
            if (ids) {
                localVarQueryParameter['ids'] = ids;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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: (ids, id, permanent, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield 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 = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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: (deviceId, userId, userName, deviceName, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield 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 = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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: (id, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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: (size, page, fields, sort, ids, q, name, access, account, hotdesk, userId, userName, mac, ip, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/devices`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield 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 = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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: (deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield 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 = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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: (deviceId, device, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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: (deviceId, device, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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}
         */
        createDevice(device, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DevicesApiAxiosParamCreator(configuration).createDevice(device, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, 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}
         */
        deleteDevice(id, permanent, ids, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DevicesApiAxiosParamCreator(configuration).deleteDevice(id, permanent, ids, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, 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}
         */
        deleteDevice2(ids, id, permanent, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DevicesApiAxiosParamCreator(configuration).deleteDevice2(ids, id, permanent, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, 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}
         */
        listRegistrations(deviceId, userId, userName, deviceName, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DevicesApiAxiosParamCreator(configuration).listRegistrations(deviceId, userId, userName, deviceName, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, 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}
         */
        readDevice(id, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DevicesApiAxiosParamCreator(configuration).readDevice(id, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, 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}
         */
        searchDevice(size, page, fields, sort, ids, q, name, access, account, hotdesk, userId, userName, mac, ip, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield 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 = Object.assign(Object.assign({}, 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}
         */
        searchDeviceAudit(deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DevicesApiAxiosParamCreator(configuration).searchDeviceAudit(deviceId, userId, userName, deviceName, timeFrom, timeTill, fields, sort, size, page, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, 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}
         */
        updateDevice(deviceId, device, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DevicesApiAxiosParamCreator(configuration).updateDevice(deviceId, device, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, 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}
         */
        updateDevice2(deviceId, device, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DevicesApiAxiosParamCreator(configuration).updateDevice2(deviceId, device, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, 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