// 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';
/**
 * UserAccessTokensApi - axios parameter creator
 * @export
 */
export const UserAccessTokensApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @param {string} tokenUserId identifier
         * @param {ProcessingTokenUserIdRequiredAuthorizationTokenUsageOptionalShortDescription} token
         * @param {boolean} [enable] ObjectId user &#x3D; 1; // [required]  string usage &#x3D; 2;  // [optional] usage description  bool enable &#x3D; 3;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        addUserAccessToken: (tokenUserId, token, enable, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'tokenUserId' is not null or undefined
            if (tokenUserId === null || tokenUserId === undefined) {
                throw new RequiredError('tokenUserId', 'Required parameter tokenUserId was null or undefined when calling addUserAccessToken.');
            }
            // verify required parameter 'token' is not null or undefined
            if (token === null || token === undefined) {
                throw new RequiredError('token', 'Required parameter token was null or undefined when calling addUserAccessToken.');
            }
            const localVarPath = `/users/{token.user.id}/tokens`.replace(`{${'token.user.id'}}`, encodeURIComponent(String(tokenUserId)));
            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;
            }
            if (enable !== undefined) {
                localVarQueryParameter['enable'] = enable;
            }
            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 token !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(token !== undefined ? token : {})
                : token || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} userId identifier
         * @param {string} id tokenKey::uuid
         * @param {string} [userName] display name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteUserAccessToken: (userId, id, userName, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'userId' is not null or undefined
            if (userId === null || userId === undefined) {
                throw new RequiredError('userId', 'Required parameter userId was null or undefined when calling deleteUserAccessToken.');
            }
            // 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 deleteUserAccessToken.');
            }
            const localVarPath = `/users/{user.id}/tokens/{id}`
                .replace(`{${'user.id'}}`, encodeURIComponent(String(userId)))
                .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 (userName !== undefined) {
                localVarQueryParameter['user.name'] = userName;
            }
            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} userId identifier
         * @param {string} id tokenKey::uuid
         * @param {string} [userName] display name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getUserAccessToken: (userId, id, userName, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'userId' is not null or undefined
            if (userId === null || userId === undefined) {
                throw new RequiredError('userId', 'Required parameter userId was null or undefined when calling getUserAccessToken.');
            }
            // 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 getUserAccessToken.');
            }
            const localVarPath = `/users/{user.id}/tokens/{id}`
                .replace(`{${'user.id'}}`, encodeURIComponent(String(userId)))
                .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 (userName !== undefined) {
                localVarQueryParameter['user.name'] = userName;
            }
            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} userId identifier
         * @param {string} [userName] display name
         * @param {string} [q] int32 page &#x3D; 2; int64 size &#x3D; 3;  .usage ILIKE :q
         * @param {Array<string>} [fields] ----- Search Options -------------------------  select: output (fields,...)
         * @param {Array<string>} [sort] select: order by (fields,...)
         * @param {number} [page] select: offset {page}
         * @param {number} [size] select: limit {size}
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listUserAccessToken: (userId, userName, q, fields, sort, page, size, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'userId' is not null or undefined
            if (userId === null || userId === undefined) {
                throw new RequiredError('userId', 'Required parameter userId was null or undefined when calling listUserAccessToken.');
            }
            const localVarPath = `/users/{user.id}/tokens`.replace(`{${'user.id'}}`, encodeURIComponent(String(userId)));
            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 (userName !== undefined) {
                localVarQueryParameter['user.name'] = userName;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            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} updateUserId identifier
         * @param {string} updateId tokenKey::token_key
         * @param {RequiredIdentificationModificationsAbout} update
         * @param {Array<string>} [fields] [optional] PATCH implementation
         * @param {boolean} [enable]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUserAccessToken: (updateUserId, updateId, update, fields, enable, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'updateUserId' is not null or undefined
            if (updateUserId === null || updateUserId === undefined) {
                throw new RequiredError('updateUserId', 'Required parameter updateUserId was null or undefined when calling updateUserAccessToken.');
            }
            // verify required parameter 'updateId' is not null or undefined
            if (updateId === null || updateId === undefined) {
                throw new RequiredError('updateId', 'Required parameter updateId was null or undefined when calling updateUserAccessToken.');
            }
            // verify required parameter 'update' is not null or undefined
            if (update === null || update === undefined) {
                throw new RequiredError('update', 'Required parameter update was null or undefined when calling updateUserAccessToken.');
            }
            const localVarPath = `/users/{update.user.id}/tokens/{update.id}`
                .replace(`{${'update.user.id'}}`, encodeURIComponent(String(updateUserId)))
                .replace(`{${'update.id'}}`, encodeURIComponent(String(updateId)));
            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;
            }
            if (enable !== undefined) {
                localVarQueryParameter['enable'] = enable;
            }
            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 update !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(update !== undefined ? update : {})
                : update || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} updateUserId identifier
         * @param {string} updateId tokenKey::token_key
         * @param {RequiredIdentificationModificationsAbout1} update
         * @param {Array<string>} [fields] [optional] PATCH implementation
         * @param {boolean} [enable]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUserAccessToken2: (updateUserId, updateId, update, fields, enable, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'updateUserId' is not null or undefined
            if (updateUserId === null || updateUserId === undefined) {
                throw new RequiredError('updateUserId', 'Required parameter updateUserId was null or undefined when calling updateUserAccessToken2.');
            }
            // verify required parameter 'updateId' is not null or undefined
            if (updateId === null || updateId === undefined) {
                throw new RequiredError('updateId', 'Required parameter updateId was null or undefined when calling updateUserAccessToken2.');
            }
            // verify required parameter 'update' is not null or undefined
            if (update === null || update === undefined) {
                throw new RequiredError('update', 'Required parameter update was null or undefined when calling updateUserAccessToken2.');
            }
            const localVarPath = `/users/{update.user.id}/tokens/{update.id}`
                .replace(`{${'update.user.id'}}`, encodeURIComponent(String(updateUserId)))
                .replace(`{${'update.id'}}`, encodeURIComponent(String(updateId)));
            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;
            }
            if (enable !== undefined) {
                localVarQueryParameter['enable'] = enable;
            }
            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 update !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(update !== undefined ? update : {})
                : update || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
    };
};
/**
 * UserAccessTokensApi - functional programming interface
 * @export
 */
export const UserAccessTokensApiFp = function (configuration) {
    return {
        /**
         *
         * @param {string} tokenUserId identifier
         * @param {ProcessingTokenUserIdRequiredAuthorizationTokenUsageOptionalShortDescription} token
         * @param {boolean} [enable] ObjectId user &#x3D; 1; // [required]  string usage &#x3D; 2;  // [optional] usage description  bool enable &#x3D; 3;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        addUserAccessToken(tokenUserId, token, enable, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UserAccessTokensApiAxiosParamCreator(configuration).addUserAccessToken(tokenUserId, token, enable, 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} userId identifier
         * @param {string} id tokenKey::uuid
         * @param {string} [userName] display name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteUserAccessToken(userId, id, userName, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UserAccessTokensApiAxiosParamCreator(configuration).deleteUserAccessToken(userId, id, userName, 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} userId identifier
         * @param {string} id tokenKey::uuid
         * @param {string} [userName] display name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getUserAccessToken(userId, id, userName, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UserAccessTokensApiAxiosParamCreator(configuration).getUserAccessToken(userId, id, userName, 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} userId identifier
         * @param {string} [userName] display name
         * @param {string} [q] int32 page &#x3D; 2; int64 size &#x3D; 3;  .usage ILIKE :q
         * @param {Array<string>} [fields] ----- Search Options -------------------------  select: output (fields,...)
         * @param {Array<string>} [sort] select: order by (fields,...)
         * @param {number} [page] select: offset {page}
         * @param {number} [size] select: limit {size}
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listUserAccessToken(userId, userName, q, fields, sort, page, size, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UserAccessTokensApiAxiosParamCreator(configuration).listUserAccessToken(userId, userName, q, fields, sort, page, size, 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} updateUserId identifier
         * @param {string} updateId tokenKey::token_key
         * @param {RequiredIdentificationModificationsAbout} update
         * @param {Array<string>} [fields] [optional] PATCH implementation
         * @param {boolean} [enable]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUserAccessToken(updateUserId, updateId, update, fields, enable, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UserAccessTokensApiAxiosParamCreator(configuration).updateUserAccessToken(updateUserId, updateId, update, fields, enable, 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} updateUserId identifier
         * @param {string} updateId tokenKey::token_key
         * @param {RequiredIdentificationModificationsAbout1} update
         * @param {Array<string>} [fields] [optional] PATCH implementation
         * @param {boolean} [enable]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUserAccessToken2(updateUserId, updateId, update, fields, enable, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UserAccessTokensApiAxiosParamCreator(configuration).updateUserAccessToken2(updateUserId, updateId, update, fields, enable, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * UserAccessTokensApi - factory interface
 * @export
 */
export const UserAccessTokensApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @param {string} tokenUserId identifier
         * @param {ProcessingTokenUserIdRequiredAuthorizationTokenUsageOptionalShortDescription} token
         * @param {boolean} [enable] ObjectId user &#x3D; 1; // [required]  string usage &#x3D; 2;  // [optional] usage description  bool enable &#x3D; 3;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        addUserAccessToken(tokenUserId, token, enable, options) {
            return UserAccessTokensApiFp(configuration)
                .addUserAccessToken(tokenUserId, token, enable, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} userId identifier
         * @param {string} id tokenKey::uuid
         * @param {string} [userName] display name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteUserAccessToken(userId, id, userName, options) {
            return UserAccessTokensApiFp(configuration)
                .deleteUserAccessToken(userId, id, userName, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} userId identifier
         * @param {string} id tokenKey::uuid
         * @param {string} [userName] display name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getUserAccessToken(userId, id, userName, options) {
            return UserAccessTokensApiFp(configuration)
                .getUserAccessToken(userId, id, userName, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} userId identifier
         * @param {string} [userName] display name
         * @param {string} [q] int32 page &#x3D; 2; int64 size &#x3D; 3;  .usage ILIKE :q
         * @param {Array<string>} [fields] ----- Search Options -------------------------  select: output (fields,...)
         * @param {Array<string>} [sort] select: order by (fields,...)
         * @param {number} [page] select: offset {page}
         * @param {number} [size] select: limit {size}
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listUserAccessToken(userId, userName, q, fields, sort, page, size, options) {
            return UserAccessTokensApiFp(configuration)
                .listUserAccessToken(userId, userName, q, fields, sort, page, size, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} updateUserId identifier
         * @param {string} updateId tokenKey::token_key
         * @param {RequiredIdentificationModificationsAbout} update
         * @param {Array<string>} [fields] [optional] PATCH implementation
         * @param {boolean} [enable]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUserAccessToken(updateUserId, updateId, update, fields, enable, options) {
            return UserAccessTokensApiFp(configuration)
                .updateUserAccessToken(updateUserId, updateId, update, fields, enable, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} updateUserId identifier
         * @param {string} updateId tokenKey::token_key
         * @param {RequiredIdentificationModificationsAbout1} update
         * @param {Array<string>} [fields] [optional] PATCH implementation
         * @param {boolean} [enable]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUserAccessToken2(updateUserId, updateId, update, fields, enable, options) {
            return UserAccessTokensApiFp(configuration)
                .updateUserAccessToken2(updateUserId, updateId, update, fields, enable, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * UserAccessTokensApi - object-oriented interface
 * @export
 * @class UserAccessTokensApi
 * @extends {BaseAPI}
 */
export class UserAccessTokensApi extends BaseAPI {
    /**
     *
     * @param {string} tokenUserId identifier
     * @param {ProcessingTokenUserIdRequiredAuthorizationTokenUsageOptionalShortDescription} token
     * @param {boolean} [enable] ObjectId user &#x3D; 1; // [required]  string usage &#x3D; 2;  // [optional] usage description  bool enable &#x3D; 3;
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UserAccessTokensApi
     */
    addUserAccessToken(tokenUserId, token, enable, options) {
        return UserAccessTokensApiFp(this.configuration)
            .addUserAccessToken(tokenUserId, token, enable, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} userId identifier
     * @param {string} id tokenKey::uuid
     * @param {string} [userName] display name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UserAccessTokensApi
     */
    deleteUserAccessToken(userId, id, userName, options) {
        return UserAccessTokensApiFp(this.configuration)
            .deleteUserAccessToken(userId, id, userName, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} userId identifier
     * @param {string} id tokenKey::uuid
     * @param {string} [userName] display name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UserAccessTokensApi
     */
    getUserAccessToken(userId, id, userName, options) {
        return UserAccessTokensApiFp(this.configuration)
            .getUserAccessToken(userId, id, userName, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} userId identifier
     * @param {string} [userName] display name
     * @param {string} [q] int32 page &#x3D; 2; int64 size &#x3D; 3;  .usage ILIKE :q
     * @param {Array<string>} [fields] ----- Search Options -------------------------  select: output (fields,...)
     * @param {Array<string>} [sort] select: order by (fields,...)
     * @param {number} [page] select: offset {page}
     * @param {number} [size] select: limit {size}
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UserAccessTokensApi
     */
    listUserAccessToken(userId, userName, q, fields, sort, page, size, options) {
        return UserAccessTokensApiFp(this.configuration)
            .listUserAccessToken(userId, userName, q, fields, sort, page, size, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} updateUserId identifier
     * @param {string} updateId tokenKey::token_key
     * @param {RequiredIdentificationModificationsAbout} update
     * @param {Array<string>} [fields] [optional] PATCH implementation
     * @param {boolean} [enable]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UserAccessTokensApi
     */
    updateUserAccessToken(updateUserId, updateId, update, fields, enable, options) {
        return UserAccessTokensApiFp(this.configuration)
            .updateUserAccessToken(updateUserId, updateId, update, fields, enable, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} updateUserId identifier
     * @param {string} updateId tokenKey::token_key
     * @param {RequiredIdentificationModificationsAbout1} update
     * @param {Array<string>} [fields] [optional] PATCH implementation
     * @param {boolean} [enable]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UserAccessTokensApi
     */
    updateUserAccessToken2(updateUserId, updateId, update, fields, enable, options) {
        return UserAccessTokensApiFp(this.configuration)
            .updateUserAccessToken2(updateUserId, updateId, update, fields, enable, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=user-access-tokens-api.js.map