"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Admin API
 * The Admin API is used to manage the ApeCloud platform.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@apecloud.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdministratorApi = exports.AdministratorApiFactory = exports.AdministratorApiFp = exports.AdministratorApiAxiosParamCreator = void 0;
const axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("../common");
// @ts-ignore
const base_1 = require("../base");
/**
 * AdministratorApi - axios parameter creator
 * @export
 */
const AdministratorApiAxiosParamCreator = function (configuration) {
    return {
        /**
         * Assign a role to a specific administrator user
         * @summary Add a role to an administrator user
         * @param {string} administratorID
         * @param {AddAdministratorsUserRoleRequest} [addAdministratorsUserRoleRequest]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        addAdministratorsUserRole: async (administratorID, addAdministratorsUserRoleRequest, options = {}) => {
            // verify required parameter 'administratorID' is not null or undefined
            (0, common_1.assertParamExists)('addAdministratorsUserRole', 'administratorID', administratorID);
            const localVarPath = `/admin/v1/administrators/{administratorID}/roles`
                .replace(`{${"administratorID"}}`, encodeURIComponent(String(administratorID)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(addAdministratorsUserRoleRequest, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Add multiple permissions to a custom administrator role
         * @summary Batch add permissions to an administrator role
         * @param {string} roleName
         * @param {Array<string>} requestBody
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        batchAddAdministratorsRolePermissions: async (roleName, requestBody, options = {}) => {
            // verify required parameter 'roleName' is not null or undefined
            (0, common_1.assertParamExists)('batchAddAdministratorsRolePermissions', 'roleName', roleName);
            // verify required parameter 'requestBody' is not null or undefined
            (0, common_1.assertParamExists)('batchAddAdministratorsRolePermissions', 'requestBody', requestBody);
            const localVarPath = `/admin/v1/administrators/roles/{roleName}/permissions/batch`
                .replace(`{${"roleName"}}`, encodeURIComponent(String(roleName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(requestBody, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Remove multiple permissions from a custom administrator role
         * @summary Batch remove permissions from an administrator role
         * @param {string} roleName
         * @param {Array<string>} requestBody
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        batchRemoveAdministratorsRolePermissions: async (roleName, requestBody, options = {}) => {
            // verify required parameter 'roleName' is not null or undefined
            (0, common_1.assertParamExists)('batchRemoveAdministratorsRolePermissions', 'roleName', roleName);
            // verify required parameter 'requestBody' is not null or undefined
            (0, common_1.assertParamExists)('batchRemoveAdministratorsRolePermissions', 'requestBody', requestBody);
            const localVarPath = `/admin/v1/administrators/roles/{roleName}/permissions/batch`
                .replace(`{${"roleName"}}`, encodeURIComponent(String(roleName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(requestBody, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Create a new administrator
         * @summary Create a new administrator
         * @param {UserCreate} userCreate
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAdministrator: async (userCreate, options = {}) => {
            // verify required parameter 'userCreate' is not null or undefined
            (0, common_1.assertParamExists)('createAdministrator', 'userCreate', userCreate);
            const localVarPath = `/admin/v1/administrators`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userCreate, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Create a custom administrator role
         * @summary Create an administrator role
         * @param {AdminRoleCreate} adminRoleCreate
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAdministratorsRole: async (adminRoleCreate, options = {}) => {
            // verify required parameter 'adminRoleCreate' is not null or undefined
            (0, common_1.assertParamExists)('createAdministratorsRole', 'adminRoleCreate', adminRoleCreate);
            const localVarPath = `/admin/v1/administrators/roles`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminRoleCreate, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * delete administrator
         * @summary delete administrator
         * @param {string} administratorID ID of the administrator
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAdministrator: async (administratorID, options = {}) => {
            // verify required parameter 'administratorID' is not null or undefined
            (0, common_1.assertParamExists)('deleteAdministrator', 'administratorID', administratorID);
            const localVarPath = `/admin/v1/administrators/{administratorID}`
                .replace(`{${"administratorID"}}`, encodeURIComponent(String(administratorID)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Delete a custom administrator role
         * @summary Delete an administrator role by name
         * @param {string} roleName
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAdministratorsRoleByName: async (roleName, options = {}) => {
            // verify required parameter 'roleName' is not null or undefined
            (0, common_1.assertParamExists)('deleteAdministratorsRoleByName', 'roleName', roleName);
            const localVarPath = `/admin/v1/administrators/roles/{roleName}`
                .replace(`{${"roleName"}}`, encodeURIComponent(String(roleName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get detailed information about a specific administrator role
         * @summary Get an administrator role by name
         * @param {string} roleName
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAdministratorsRoleByName: async (roleName, options = {}) => {
            // verify required parameter 'roleName' is not null or undefined
            (0, common_1.assertParamExists)('getAdministratorsRoleByName', 'roleName', roleName);
            const localVarPath = `/admin/v1/administrators/roles/{roleName}`
                .replace(`{${"roleName"}}`, encodeURIComponent(String(roleName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List administrators
         * @summary List administrators
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministrators: async (options = {}) => {
            const localVarPath = `/admin/v1/administrators`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List all permissions available for administrator roles
         * @summary List all permissions for administrators
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministratorsPermissions: async (options = {}) => {
            const localVarPath = `/admin/v1/administrators/permissions`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List all permissions assigned to a specific administrator role
         * @summary List permissions of an administrator role
         * @param {string} roleName
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministratorsRolePermissions: async (roleName, options = {}) => {
            // verify required parameter 'roleName' is not null or undefined
            (0, common_1.assertParamExists)('listAdministratorsRolePermissions', 'roleName', roleName);
            const localVarPath = `/admin/v1/administrators/roles/{roleName}/permissions`
                .replace(`{${"roleName"}}`, encodeURIComponent(String(roleName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List all administrator roles including built-in and custom roles
         * @summary List all administrator roles
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministratorsRoles: async (options = {}) => {
            const localVarPath = `/admin/v1/administrators/roles`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List all roles assigned to a specific administrator user
         * @summary List roles of an administrator user
         * @param {string} administratorID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministratorsUserRoles: async (administratorID, options = {}) => {
            // verify required parameter 'administratorID' is not null or undefined
            (0, common_1.assertParamExists)('listAdministratorsUserRoles', 'administratorID', administratorID);
            const localVarPath = `/admin/v1/administrators/{administratorID}/roles`
                .replace(`{${"administratorID"}}`, encodeURIComponent(String(administratorID)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update the information of the specified administrator
         * @summary Update the information of the specified administrator
         * @param {string} administratorID ID of the administrator
         * @param {UserUpdate} userUpdate
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAdministrator: async (administratorID, userUpdate, options = {}) => {
            // verify required parameter 'administratorID' is not null or undefined
            (0, common_1.assertParamExists)('patchAdministrator', 'administratorID', administratorID);
            // verify required parameter 'userUpdate' is not null or undefined
            (0, common_1.assertParamExists)('patchAdministrator', 'userUpdate', userUpdate);
            const localVarPath = `/admin/v1/administrators/{administratorID}`
                .replace(`{${"administratorID"}}`, encodeURIComponent(String(administratorID)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userUpdate, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Remove a specific role from an administrator user
         * @summary Remove a role from an administrator user
         * @param {string} administratorID
         * @param {string} roleName
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        removeAdministratorsUserRole: async (administratorID, roleName, options = {}) => {
            // verify required parameter 'administratorID' is not null or undefined
            (0, common_1.assertParamExists)('removeAdministratorsUserRole', 'administratorID', administratorID);
            // verify required parameter 'roleName' is not null or undefined
            (0, common_1.assertParamExists)('removeAdministratorsUserRole', 'roleName', roleName);
            const localVarPath = `/admin/v1/administrators/{administratorID}/roles/{roleName}`
                .replace(`{${"administratorID"}}`, encodeURIComponent(String(administratorID)))
                .replace(`{${"roleName"}}`, encodeURIComponent(String(roleName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update administrator password
         * @summary Update administrator password
         * @param {string} administratorID ID of the administrator
         * @param {Password} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAdministratorPassword: async (administratorID, body, options = {}) => {
            // verify required parameter 'administratorID' is not null or undefined
            (0, common_1.assertParamExists)('updateAdministratorPassword', 'administratorID', administratorID);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('updateAdministratorPassword', 'body', body);
            const localVarPath = `/admin/v1/administrators/{administratorID}/password`
                .replace(`{${"administratorID"}}`, encodeURIComponent(String(administratorID)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update a custom administrator role
         * @summary Update an administrator role by name
         * @param {string} roleName
         * @param {AdminRoleUpdate} adminRoleUpdate
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAdministratorsRoleByName: async (roleName, adminRoleUpdate, options = {}) => {
            // verify required parameter 'roleName' is not null or undefined
            (0, common_1.assertParamExists)('updateAdministratorsRoleByName', 'roleName', roleName);
            // verify required parameter 'adminRoleUpdate' is not null or undefined
            (0, common_1.assertParamExists)('updateAdministratorsRoleByName', 'adminRoleUpdate', adminRoleUpdate);
            const localVarPath = `/admin/v1/administrators/roles/{roleName}`
                .replace(`{${"roleName"}}`, encodeURIComponent(String(roleName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminRoleUpdate, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
exports.AdministratorApiAxiosParamCreator = AdministratorApiAxiosParamCreator;
/**
 * AdministratorApi - functional programming interface
 * @export
 */
const AdministratorApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.AdministratorApiAxiosParamCreator)(configuration);
    return {
        /**
         * Assign a role to a specific administrator user
         * @summary Add a role to an administrator user
         * @param {string} administratorID
         * @param {AddAdministratorsUserRoleRequest} [addAdministratorsUserRoleRequest]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async addAdministratorsUserRole(administratorID, addAdministratorsUserRoleRequest, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.addAdministratorsUserRole(administratorID, addAdministratorsUserRoleRequest, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.addAdministratorsUserRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Add multiple permissions to a custom administrator role
         * @summary Batch add permissions to an administrator role
         * @param {string} roleName
         * @param {Array<string>} requestBody
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async batchAddAdministratorsRolePermissions(roleName, requestBody, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.batchAddAdministratorsRolePermissions(roleName, requestBody, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.batchAddAdministratorsRolePermissions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Remove multiple permissions from a custom administrator role
         * @summary Batch remove permissions from an administrator role
         * @param {string} roleName
         * @param {Array<string>} requestBody
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async batchRemoveAdministratorsRolePermissions(roleName, requestBody, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.batchRemoveAdministratorsRolePermissions(roleName, requestBody, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.batchRemoveAdministratorsRolePermissions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Create a new administrator
         * @summary Create a new administrator
         * @param {UserCreate} userCreate
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAdministrator(userCreate, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createAdministrator(userCreate, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.createAdministrator']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Create a custom administrator role
         * @summary Create an administrator role
         * @param {AdminRoleCreate} adminRoleCreate
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAdministratorsRole(adminRoleCreate, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createAdministratorsRole(adminRoleCreate, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.createAdministratorsRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * delete administrator
         * @summary delete administrator
         * @param {string} administratorID ID of the administrator
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteAdministrator(administratorID, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAdministrator(administratorID, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.deleteAdministrator']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Delete a custom administrator role
         * @summary Delete an administrator role by name
         * @param {string} roleName
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteAdministratorsRoleByName(roleName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAdministratorsRoleByName(roleName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.deleteAdministratorsRoleByName']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get detailed information about a specific administrator role
         * @summary Get an administrator role by name
         * @param {string} roleName
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getAdministratorsRoleByName(roleName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getAdministratorsRoleByName(roleName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.getAdministratorsRoleByName']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List administrators
         * @summary List administrators
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAdministrators(options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAdministrators(options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.listAdministrators']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List all permissions available for administrator roles
         * @summary List all permissions for administrators
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAdministratorsPermissions(options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAdministratorsPermissions(options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.listAdministratorsPermissions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List all permissions assigned to a specific administrator role
         * @summary List permissions of an administrator role
         * @param {string} roleName
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAdministratorsRolePermissions(roleName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAdministratorsRolePermissions(roleName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.listAdministratorsRolePermissions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List all administrator roles including built-in and custom roles
         * @summary List all administrator roles
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAdministratorsRoles(options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAdministratorsRoles(options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.listAdministratorsRoles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List all roles assigned to a specific administrator user
         * @summary List roles of an administrator user
         * @param {string} administratorID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAdministratorsUserRoles(administratorID, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAdministratorsUserRoles(administratorID, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.listAdministratorsUserRoles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update the information of the specified administrator
         * @summary Update the information of the specified administrator
         * @param {string} administratorID ID of the administrator
         * @param {UserUpdate} userUpdate
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchAdministrator(administratorID, userUpdate, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchAdministrator(administratorID, userUpdate, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.patchAdministrator']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Remove a specific role from an administrator user
         * @summary Remove a role from an administrator user
         * @param {string} administratorID
         * @param {string} roleName
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async removeAdministratorsUserRole(administratorID, roleName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.removeAdministratorsUserRole(administratorID, roleName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.removeAdministratorsUserRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update administrator password
         * @summary Update administrator password
         * @param {string} administratorID ID of the administrator
         * @param {Password} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateAdministratorPassword(administratorID, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateAdministratorPassword(administratorID, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.updateAdministratorPassword']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update a custom administrator role
         * @summary Update an administrator role by name
         * @param {string} roleName
         * @param {AdminRoleUpdate} adminRoleUpdate
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateAdministratorsRoleByName(roleName, adminRoleUpdate, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateAdministratorsRoleByName(roleName, adminRoleUpdate, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdministratorApi.updateAdministratorsRoleByName']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    };
};
exports.AdministratorApiFp = AdministratorApiFp;
/**
 * AdministratorApi - factory interface
 * @export
 */
const AdministratorApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.AdministratorApiFp)(configuration);
    return {
        /**
         * Assign a role to a specific administrator user
         * @summary Add a role to an administrator user
         * @param {AdministratorApiAddAdministratorsUserRoleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        addAdministratorsUserRole(requestParameters, options) {
            return localVarFp.addAdministratorsUserRole(requestParameters.administratorID, requestParameters.addAdministratorsUserRoleRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * Add multiple permissions to a custom administrator role
         * @summary Batch add permissions to an administrator role
         * @param {AdministratorApiBatchAddAdministratorsRolePermissionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        batchAddAdministratorsRolePermissions(requestParameters, options) {
            return localVarFp.batchAddAdministratorsRolePermissions(requestParameters.roleName, requestParameters.requestBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Remove multiple permissions from a custom administrator role
         * @summary Batch remove permissions from an administrator role
         * @param {AdministratorApiBatchRemoveAdministratorsRolePermissionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        batchRemoveAdministratorsRolePermissions(requestParameters, options) {
            return localVarFp.batchRemoveAdministratorsRolePermissions(requestParameters.roleName, requestParameters.requestBody, options).then((request) => request(axios, basePath));
        },
        /**
         * Create a new administrator
         * @summary Create a new administrator
         * @param {AdministratorApiCreateAdministratorRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAdministrator(requestParameters, options) {
            return localVarFp.createAdministrator(requestParameters.userCreate, options).then((request) => request(axios, basePath));
        },
        /**
         * Create a custom administrator role
         * @summary Create an administrator role
         * @param {AdministratorApiCreateAdministratorsRoleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAdministratorsRole(requestParameters, options) {
            return localVarFp.createAdministratorsRole(requestParameters.adminRoleCreate, options).then((request) => request(axios, basePath));
        },
        /**
         * delete administrator
         * @summary delete administrator
         * @param {AdministratorApiDeleteAdministratorRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAdministrator(requestParameters, options) {
            return localVarFp.deleteAdministrator(requestParameters.administratorID, options).then((request) => request(axios, basePath));
        },
        /**
         * Delete a custom administrator role
         * @summary Delete an administrator role by name
         * @param {AdministratorApiDeleteAdministratorsRoleByNameRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAdministratorsRoleByName(requestParameters, options) {
            return localVarFp.deleteAdministratorsRoleByName(requestParameters.roleName, options).then((request) => request(axios, basePath));
        },
        /**
         * Get detailed information about a specific administrator role
         * @summary Get an administrator role by name
         * @param {AdministratorApiGetAdministratorsRoleByNameRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAdministratorsRoleByName(requestParameters, options) {
            return localVarFp.getAdministratorsRoleByName(requestParameters.roleName, options).then((request) => request(axios, basePath));
        },
        /**
         * List administrators
         * @summary List administrators
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministrators(options) {
            return localVarFp.listAdministrators(options).then((request) => request(axios, basePath));
        },
        /**
         * List all permissions available for administrator roles
         * @summary List all permissions for administrators
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministratorsPermissions(options) {
            return localVarFp.listAdministratorsPermissions(options).then((request) => request(axios, basePath));
        },
        /**
         * List all permissions assigned to a specific administrator role
         * @summary List permissions of an administrator role
         * @param {AdministratorApiListAdministratorsRolePermissionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministratorsRolePermissions(requestParameters, options) {
            return localVarFp.listAdministratorsRolePermissions(requestParameters.roleName, options).then((request) => request(axios, basePath));
        },
        /**
         * List all administrator roles including built-in and custom roles
         * @summary List all administrator roles
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministratorsRoles(options) {
            return localVarFp.listAdministratorsRoles(options).then((request) => request(axios, basePath));
        },
        /**
         * List all roles assigned to a specific administrator user
         * @summary List roles of an administrator user
         * @param {AdministratorApiListAdministratorsUserRolesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAdministratorsUserRoles(requestParameters, options) {
            return localVarFp.listAdministratorsUserRoles(requestParameters.administratorID, options).then((request) => request(axios, basePath));
        },
        /**
         * Update the information of the specified administrator
         * @summary Update the information of the specified administrator
         * @param {AdministratorApiPatchAdministratorRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAdministrator(requestParameters, options) {
            return localVarFp.patchAdministrator(requestParameters.administratorID, requestParameters.userUpdate, options).then((request) => request(axios, basePath));
        },
        /**
         * Remove a specific role from an administrator user
         * @summary Remove a role from an administrator user
         * @param {AdministratorApiRemoveAdministratorsUserRoleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        removeAdministratorsUserRole(requestParameters, options) {
            return localVarFp.removeAdministratorsUserRole(requestParameters.administratorID, requestParameters.roleName, options).then((request) => request(axios, basePath));
        },
        /**
         * Update administrator password
         * @summary Update administrator password
         * @param {AdministratorApiUpdateAdministratorPasswordRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAdministratorPassword(requestParameters, options) {
            return localVarFp.updateAdministratorPassword(requestParameters.administratorID, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * Update a custom administrator role
         * @summary Update an administrator role by name
         * @param {AdministratorApiUpdateAdministratorsRoleByNameRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAdministratorsRoleByName(requestParameters, options) {
            return localVarFp.updateAdministratorsRoleByName(requestParameters.roleName, requestParameters.adminRoleUpdate, options).then((request) => request(axios, basePath));
        },
    };
};
exports.AdministratorApiFactory = AdministratorApiFactory;
/**
 * AdministratorApi - object-oriented interface
 * @export
 * @class AdministratorApi
 * @extends {BaseAPI}
 */
class AdministratorApi extends base_1.BaseAPI {
    /**
     * Assign a role to a specific administrator user
     * @summary Add a role to an administrator user
     * @param {AdministratorApiAddAdministratorsUserRoleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    addAdministratorsUserRole(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).addAdministratorsUserRole(requestParameters.administratorID, requestParameters.addAdministratorsUserRoleRequest, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Add multiple permissions to a custom administrator role
     * @summary Batch add permissions to an administrator role
     * @param {AdministratorApiBatchAddAdministratorsRolePermissionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    batchAddAdministratorsRolePermissions(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).batchAddAdministratorsRolePermissions(requestParameters.roleName, requestParameters.requestBody, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Remove multiple permissions from a custom administrator role
     * @summary Batch remove permissions from an administrator role
     * @param {AdministratorApiBatchRemoveAdministratorsRolePermissionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    batchRemoveAdministratorsRolePermissions(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).batchRemoveAdministratorsRolePermissions(requestParameters.roleName, requestParameters.requestBody, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Create a new administrator
     * @summary Create a new administrator
     * @param {AdministratorApiCreateAdministratorRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    createAdministrator(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).createAdministrator(requestParameters.userCreate, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Create a custom administrator role
     * @summary Create an administrator role
     * @param {AdministratorApiCreateAdministratorsRoleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    createAdministratorsRole(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).createAdministratorsRole(requestParameters.adminRoleCreate, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * delete administrator
     * @summary delete administrator
     * @param {AdministratorApiDeleteAdministratorRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    deleteAdministrator(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).deleteAdministrator(requestParameters.administratorID, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Delete a custom administrator role
     * @summary Delete an administrator role by name
     * @param {AdministratorApiDeleteAdministratorsRoleByNameRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    deleteAdministratorsRoleByName(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).deleteAdministratorsRoleByName(requestParameters.roleName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Get detailed information about a specific administrator role
     * @summary Get an administrator role by name
     * @param {AdministratorApiGetAdministratorsRoleByNameRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    getAdministratorsRoleByName(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).getAdministratorsRoleByName(requestParameters.roleName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * List administrators
     * @summary List administrators
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    listAdministrators(options) {
        return (0, exports.AdministratorApiFp)(this.configuration).listAdministrators(options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * List all permissions available for administrator roles
     * @summary List all permissions for administrators
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    listAdministratorsPermissions(options) {
        return (0, exports.AdministratorApiFp)(this.configuration).listAdministratorsPermissions(options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * List all permissions assigned to a specific administrator role
     * @summary List permissions of an administrator role
     * @param {AdministratorApiListAdministratorsRolePermissionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    listAdministratorsRolePermissions(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).listAdministratorsRolePermissions(requestParameters.roleName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * List all administrator roles including built-in and custom roles
     * @summary List all administrator roles
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    listAdministratorsRoles(options) {
        return (0, exports.AdministratorApiFp)(this.configuration).listAdministratorsRoles(options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * List all roles assigned to a specific administrator user
     * @summary List roles of an administrator user
     * @param {AdministratorApiListAdministratorsUserRolesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    listAdministratorsUserRoles(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).listAdministratorsUserRoles(requestParameters.administratorID, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Update the information of the specified administrator
     * @summary Update the information of the specified administrator
     * @param {AdministratorApiPatchAdministratorRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    patchAdministrator(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).patchAdministrator(requestParameters.administratorID, requestParameters.userUpdate, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Remove a specific role from an administrator user
     * @summary Remove a role from an administrator user
     * @param {AdministratorApiRemoveAdministratorsUserRoleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    removeAdministratorsUserRole(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).removeAdministratorsUserRole(requestParameters.administratorID, requestParameters.roleName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Update administrator password
     * @summary Update administrator password
     * @param {AdministratorApiUpdateAdministratorPasswordRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    updateAdministratorPassword(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).updateAdministratorPassword(requestParameters.administratorID, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Update a custom administrator role
     * @summary Update an administrator role by name
     * @param {AdministratorApiUpdateAdministratorsRoleByNameRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AdministratorApi
     */
    updateAdministratorsRoleByName(requestParameters, options) {
        return (0, exports.AdministratorApiFp)(this.configuration).updateAdministratorsRoleByName(requestParameters.roleName, requestParameters.adminRoleUpdate, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.AdministratorApi = AdministratorApi;
//# sourceMappingURL=administrator-api.js.map