"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.12.0-rc1
 * Contact: hello@goauthentik.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.EndpointsApi = void 0;
const runtime = __importStar(require("../runtime"));
const index_1 = require("../models/index");
/**
 *
 */
class EndpointsApi extends runtime.BaseAPI {
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsAgentConfigRetrieveRaw(initOverrides) {
        const queryParameters = {};
        const headerParameters = {};
        let urlPath = `/endpoints/agents/connectors/agent_config/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentConfigFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsAgentConfigRetrieve(initOverrides) {
        const response = await this.endpointsAgentsConnectorsAgentConfigRetrieveRaw(initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsAuthFedCreateRaw(requestParameters, initOverrides) {
        if (requestParameters['device'] == null) {
            throw new runtime.RequiredError('device', 'Required parameter "device" was null or undefined when calling endpointsAgentsConnectorsAuthFedCreate().');
        }
        const queryParameters = {};
        if (requestParameters['device'] != null) {
            queryParameters['device'] = requestParameters['device'];
        }
        const headerParameters = {};
        let urlPath = `/endpoints/agents/connectors/auth_fed/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentTokenResponseFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsAuthFedCreate(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsConnectorsAuthFedCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsAuthIaCreateRaw(initOverrides) {
        const queryParameters = {};
        const headerParameters = {};
        let urlPath = `/endpoints/agents/connectors/auth_ia/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentAuthenticationResponseFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsAuthIaCreate(initOverrides) {
        const response = await this.endpointsAgentsConnectorsAuthIaCreateRaw(initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsCheckInCreateRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        let urlPath = `/endpoints/agents/connectors/check_in/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.DeviceFactsRequestToJSON)(requestParameters['deviceFactsRequest']),
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsCheckInCreate(requestParameters = {}, initOverrides) {
        await this.endpointsAgentsConnectorsCheckInCreateRaw(requestParameters, initOverrides);
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsCreateRaw(requestParameters, initOverrides) {
        if (requestParameters['agentConnectorRequest'] == null) {
            throw new runtime.RequiredError('agentConnectorRequest', 'Required parameter "agentConnectorRequest" was null or undefined when calling endpointsAgentsConnectorsCreate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/connectors/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.AgentConnectorRequestToJSON)(requestParameters['agentConnectorRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentConnectorFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsCreate(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsConnectorsCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsDestroyRaw(requestParameters, initOverrides) {
        if (requestParameters['connectorUuid'] == null) {
            throw new runtime.RequiredError('connectorUuid', 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/connectors/{connector_uuid}/`;
        urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsDestroy(requestParameters, initOverrides) {
        await this.endpointsAgentsConnectorsDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsEnrollCreateRaw(requestParameters, initOverrides) {
        if (requestParameters['enrollRequest'] == null) {
            throw new runtime.RequiredError('enrollRequest', 'Required parameter "enrollRequest" was null or undefined when calling endpointsAgentsConnectorsEnrollCreate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        let urlPath = `/endpoints/agents/connectors/enroll/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.EnrollRequestToJSON)(requestParameters['enrollRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentTokenResponseFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsEnrollCreate(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsConnectorsEnrollCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsListRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['enabled'] != null) {
            queryParameters['enabled'] = requestParameters['enabled'];
        }
        if (requestParameters['name'] != null) {
            queryParameters['name'] = requestParameters['name'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/connectors/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedAgentConnectorListFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsList(requestParameters = {}, initOverrides) {
        const response = await this.endpointsAgentsConnectorsListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Generate configuration for MDM systems to deploy authentik Agent
     */
    async endpointsAgentsConnectorsMdmConfigCreateRaw(requestParameters, initOverrides) {
        if (requestParameters['connectorUuid'] == null) {
            throw new runtime.RequiredError('connectorUuid', 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsMdmConfigCreate().');
        }
        if (requestParameters['mDMConfigRequest'] == null) {
            throw new runtime.RequiredError('mDMConfigRequest', 'Required parameter "mDMConfigRequest" was null or undefined when calling endpointsAgentsConnectorsMdmConfigCreate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/connectors/{connector_uuid}/mdm_config/`;
        urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.MDMConfigRequestToJSON)(requestParameters['mDMConfigRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MDMConfigResponseFromJSON)(jsonValue));
    }
    /**
     * Generate configuration for MDM systems to deploy authentik Agent
     */
    async endpointsAgentsConnectorsMdmConfigCreate(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsConnectorsMdmConfigCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsPartialUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['connectorUuid'] == null) {
            throw new runtime.RequiredError('connectorUuid', 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsPartialUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/connectors/{connector_uuid}/`;
        urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedAgentConnectorRequestToJSON)(requestParameters['patchedAgentConnectorRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentConnectorFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsPartialUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsConnectorsPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsRetrieveRaw(requestParameters, initOverrides) {
        if (requestParameters['connectorUuid'] == null) {
            throw new runtime.RequiredError('connectorUuid', 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/connectors/{connector_uuid}/`;
        urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentConnectorFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsRetrieve(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsConnectorsRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['connectorUuid'] == null) {
            throw new runtime.RequiredError('connectorUuid', 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsUpdate().');
        }
        if (requestParameters['agentConnectorRequest'] == null) {
            throw new runtime.RequiredError('agentConnectorRequest', 'Required parameter "agentConnectorRequest" was null or undefined when calling endpointsAgentsConnectorsUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/connectors/{connector_uuid}/`;
        urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.AgentConnectorRequestToJSON)(requestParameters['agentConnectorRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentConnectorFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsConnectorsUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsConnectorsUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsAgentsConnectorsUsedByListRaw(requestParameters, initOverrides) {
        if (requestParameters['connectorUuid'] == null) {
            throw new runtime.RequiredError('connectorUuid', 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/connectors/{connector_uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsAgentsConnectorsUsedByList(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsConnectorsUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensCreateRaw(requestParameters, initOverrides) {
        if (requestParameters['enrollmentTokenRequest'] == null) {
            throw new runtime.RequiredError('enrollmentTokenRequest', 'Required parameter "enrollmentTokenRequest" was null or undefined when calling endpointsAgentsEnrollmentTokensCreate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/enrollment_tokens/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.EnrollmentTokenRequestToJSON)(requestParameters['enrollmentTokenRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EnrollmentTokenFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensCreate(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsEnrollmentTokensCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensDestroyRaw(requestParameters, initOverrides) {
        if (requestParameters['tokenUuid'] == null) {
            throw new runtime.RequiredError('tokenUuid', 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/`;
        urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensDestroy(requestParameters, initOverrides) {
        await this.endpointsAgentsEnrollmentTokensDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensListRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['connector'] != null) {
            queryParameters['connector'] = requestParameters['connector'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        if (requestParameters['tokenUuid'] != null) {
            queryParameters['token_uuid'] = requestParameters['tokenUuid'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/enrollment_tokens/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedEnrollmentTokenListFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensList(requestParameters = {}, initOverrides) {
        const response = await this.endpointsAgentsEnrollmentTokensListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensPartialUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['tokenUuid'] == null) {
            throw new runtime.RequiredError('tokenUuid', 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensPartialUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/`;
        urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedEnrollmentTokenRequestToJSON)(requestParameters['patchedEnrollmentTokenRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EnrollmentTokenFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensPartialUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsEnrollmentTokensPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensRetrieveRaw(requestParameters, initOverrides) {
        if (requestParameters['tokenUuid'] == null) {
            throw new runtime.RequiredError('tokenUuid', 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/`;
        urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EnrollmentTokenFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensRetrieve(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsEnrollmentTokensRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['tokenUuid'] == null) {
            throw new runtime.RequiredError('tokenUuid', 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensUpdate().');
        }
        if (requestParameters['enrollmentTokenRequest'] == null) {
            throw new runtime.RequiredError('enrollmentTokenRequest', 'Required parameter "enrollmentTokenRequest" was null or undefined when calling endpointsAgentsEnrollmentTokensUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/`;
        urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.EnrollmentTokenRequestToJSON)(requestParameters['enrollmentTokenRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EnrollmentTokenFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsAgentsEnrollmentTokensUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsEnrollmentTokensUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsAgentsEnrollmentTokensUsedByListRaw(requestParameters, initOverrides) {
        if (requestParameters['tokenUuid'] == null) {
            throw new runtime.RequiredError('tokenUuid', 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsAgentsEnrollmentTokensUsedByList(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsEnrollmentTokensUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Return token key and log access
     */
    async endpointsAgentsEnrollmentTokensViewKeyRetrieveRaw(requestParameters, initOverrides) {
        if (requestParameters['tokenUuid'] == null) {
            throw new runtime.RequiredError('tokenUuid', 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensViewKeyRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/view_key/`;
        urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TokenViewFromJSON)(jsonValue));
    }
    /**
     * Return token key and log access
     */
    async endpointsAgentsEnrollmentTokensViewKeyRetrieve(requestParameters, initOverrides) {
        const response = await this.endpointsAgentsEnrollmentTokensViewKeyRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Connector Viewset
     */
    async endpointsConnectorsDestroyRaw(requestParameters, initOverrides) {
        if (requestParameters['connectorUuid'] == null) {
            throw new runtime.RequiredError('connectorUuid', 'Required parameter "connectorUuid" was null or undefined when calling endpointsConnectorsDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/connectors/{connector_uuid}/`;
        urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * Connector Viewset
     */
    async endpointsConnectorsDestroy(requestParameters, initOverrides) {
        await this.endpointsConnectorsDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * Connector Viewset
     */
    async endpointsConnectorsListRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/connectors/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedConnectorListFromJSON)(jsonValue));
    }
    /**
     * Connector Viewset
     */
    async endpointsConnectorsList(requestParameters = {}, initOverrides) {
        const response = await this.endpointsConnectorsListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Connector Viewset
     */
    async endpointsConnectorsRetrieveRaw(requestParameters, initOverrides) {
        if (requestParameters['connectorUuid'] == null) {
            throw new runtime.RequiredError('connectorUuid', 'Required parameter "connectorUuid" was null or undefined when calling endpointsConnectorsRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/connectors/{connector_uuid}/`;
        urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConnectorFromJSON)(jsonValue));
    }
    /**
     * Connector Viewset
     */
    async endpointsConnectorsRetrieve(requestParameters, initOverrides) {
        const response = await this.endpointsConnectorsRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Get all creatable types
     */
    async endpointsConnectorsTypesListRaw(initOverrides) {
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/connectors/types/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.TypeCreateFromJSON));
    }
    /**
     * Get all creatable types
     */
    async endpointsConnectorsTypesList(initOverrides) {
        const response = await this.endpointsConnectorsTypesListRaw(initOverrides);
        return await response.value();
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsConnectorsUsedByListRaw(requestParameters, initOverrides) {
        if (requestParameters['connectorUuid'] == null) {
            throw new runtime.RequiredError('connectorUuid', 'Required parameter "connectorUuid" was null or undefined when calling endpointsConnectorsUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/connectors/{connector_uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsConnectorsUsedByList(requestParameters, initOverrides) {
        const response = await this.endpointsConnectorsUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsCreateRaw(requestParameters, initOverrides) {
        if (requestParameters['deviceAccessGroupRequest'] == null) {
            throw new runtime.RequiredError('deviceAccessGroupRequest', 'Required parameter "deviceAccessGroupRequest" was null or undefined when calling endpointsDeviceAccessGroupsCreate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_access_groups/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.DeviceAccessGroupRequestToJSON)(requestParameters['deviceAccessGroupRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeviceAccessGroupFromJSON)(jsonValue));
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsCreate(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceAccessGroupsCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsDestroyRaw(requestParameters, initOverrides) {
        if (requestParameters['pbmUuid'] == null) {
            throw new runtime.RequiredError('pbmUuid', 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/`;
        urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsDestroy(requestParameters, initOverrides) {
        await this.endpointsDeviceAccessGroupsDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsListRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['name'] != null) {
            queryParameters['name'] = requestParameters['name'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['pbmUuid'] != null) {
            queryParameters['pbm_uuid'] = requestParameters['pbmUuid'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_access_groups/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedDeviceAccessGroupListFromJSON)(jsonValue));
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsList(requestParameters = {}, initOverrides) {
        const response = await this.endpointsDeviceAccessGroupsListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsPartialUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['pbmUuid'] == null) {
            throw new runtime.RequiredError('pbmUuid', 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsPartialUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/`;
        urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedDeviceAccessGroupRequestToJSON)(requestParameters['patchedDeviceAccessGroupRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeviceAccessGroupFromJSON)(jsonValue));
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsPartialUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceAccessGroupsPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsRetrieveRaw(requestParameters, initOverrides) {
        if (requestParameters['pbmUuid'] == null) {
            throw new runtime.RequiredError('pbmUuid', 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/`;
        urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeviceAccessGroupFromJSON)(jsonValue));
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsRetrieve(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceAccessGroupsRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['pbmUuid'] == null) {
            throw new runtime.RequiredError('pbmUuid', 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsUpdate().');
        }
        if (requestParameters['deviceAccessGroupRequest'] == null) {
            throw new runtime.RequiredError('deviceAccessGroupRequest', 'Required parameter "deviceAccessGroupRequest" was null or undefined when calling endpointsDeviceAccessGroupsUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/`;
        urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.DeviceAccessGroupRequestToJSON)(requestParameters['deviceAccessGroupRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeviceAccessGroupFromJSON)(jsonValue));
    }
    /**
     * DeviceAccessGroup Viewset
     */
    async endpointsDeviceAccessGroupsUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceAccessGroupsUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsDeviceAccessGroupsUsedByListRaw(requestParameters, initOverrides) {
        if (requestParameters['pbmUuid'] == null) {
            throw new runtime.RequiredError('pbmUuid', 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsDeviceAccessGroupsUsedByList(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceAccessGroupsUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsCreateRaw(requestParameters, initOverrides) {
        if (requestParameters['policyBindingRequest'] == null) {
            throw new runtime.RequiredError('policyBindingRequest', 'Required parameter "policyBindingRequest" was null or undefined when calling endpointsDeviceBindingsCreate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_bindings/`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PolicyBindingRequestToJSON)(requestParameters['policyBindingRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PolicyBindingFromJSON)(jsonValue));
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsCreate(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceBindingsCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsDestroyRaw(requestParameters, initOverrides) {
        if (requestParameters['policyBindingUuid'] == null) {
            throw new runtime.RequiredError('policyBindingUuid', 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/`;
        urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsDestroy(requestParameters, initOverrides) {
        await this.endpointsDeviceBindingsDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsListRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['enabled'] != null) {
            queryParameters['enabled'] = requestParameters['enabled'];
        }
        if (requestParameters['order'] != null) {
            queryParameters['order'] = requestParameters['order'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['policy'] != null) {
            queryParameters['policy'] = requestParameters['policy'];
        }
        if (requestParameters['policyIsnull'] != null) {
            queryParameters['policy__isnull'] = requestParameters['policyIsnull'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        if (requestParameters['target'] != null) {
            queryParameters['target'] = requestParameters['target'];
        }
        if (requestParameters['targetIn'] != null) {
            queryParameters['target_in'] = requestParameters['targetIn'];
        }
        if (requestParameters['timeout'] != null) {
            queryParameters['timeout'] = requestParameters['timeout'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_bindings/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedPolicyBindingListFromJSON)(jsonValue));
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsList(requestParameters = {}, initOverrides) {
        const response = await this.endpointsDeviceBindingsListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsPartialUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['policyBindingUuid'] == null) {
            throw new runtime.RequiredError('policyBindingUuid', 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsPartialUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/`;
        urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedPolicyBindingRequestToJSON)(requestParameters['patchedPolicyBindingRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PolicyBindingFromJSON)(jsonValue));
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsPartialUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceBindingsPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsRetrieveRaw(requestParameters, initOverrides) {
        if (requestParameters['policyBindingUuid'] == null) {
            throw new runtime.RequiredError('policyBindingUuid', 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/`;
        urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PolicyBindingFromJSON)(jsonValue));
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsRetrieve(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceBindingsRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['policyBindingUuid'] == null) {
            throw new runtime.RequiredError('policyBindingUuid', 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsUpdate().');
        }
        if (requestParameters['policyBindingRequest'] == null) {
            throw new runtime.RequiredError('policyBindingRequest', 'Required parameter "policyBindingRequest" was null or undefined when calling endpointsDeviceBindingsUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/`;
        urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PolicyBindingRequestToJSON)(requestParameters['policyBindingRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PolicyBindingFromJSON)(jsonValue));
    }
    /**
     * PolicyBinding Viewset
     */
    async endpointsDeviceBindingsUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceBindingsUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsDeviceBindingsUsedByListRaw(requestParameters, initOverrides) {
        if (requestParameters['policyBindingUuid'] == null) {
            throw new runtime.RequiredError('policyBindingUuid', 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsDeviceBindingsUsedByList(requestParameters, initOverrides) {
        const response = await this.endpointsDeviceBindingsUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesDestroyRaw(requestParameters, initOverrides) {
        if (requestParameters['deviceUuid'] == null) {
            throw new runtime.RequiredError('deviceUuid', 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesDestroy().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/devices/{device_uuid}/`;
        urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesDestroy(requestParameters, initOverrides) {
        await this.endpointsDevicesDestroyRaw(requestParameters, initOverrides);
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesListRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['identifier'] != null) {
            queryParameters['identifier'] = requestParameters['identifier'];
        }
        if (requestParameters['name'] != null) {
            queryParameters['name'] = requestParameters['name'];
        }
        if (requestParameters['ordering'] != null) {
            queryParameters['ordering'] = requestParameters['ordering'];
        }
        if (requestParameters['page'] != null) {
            queryParameters['page'] = requestParameters['page'];
        }
        if (requestParameters['pageSize'] != null) {
            queryParameters['page_size'] = requestParameters['pageSize'];
        }
        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/devices/`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedEndpointDeviceListFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesList(requestParameters = {}, initOverrides) {
        const response = await this.endpointsDevicesListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesPartialUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['deviceUuid'] == null) {
            throw new runtime.RequiredError('deviceUuid', 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesPartialUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/devices/{device_uuid}/`;
        urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PATCH',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.PatchedEndpointDeviceRequestToJSON)(requestParameters['patchedEndpointDeviceRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointDeviceFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesPartialUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsDevicesPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesRetrieveRaw(requestParameters, initOverrides) {
        if (requestParameters['deviceUuid'] == null) {
            throw new runtime.RequiredError('deviceUuid', 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesRetrieve().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/devices/{device_uuid}/`;
        urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointDeviceDetailsFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesRetrieve(requestParameters, initOverrides) {
        const response = await this.endpointsDevicesRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['deviceUuid'] == null) {
            throw new runtime.RequiredError('deviceUuid', 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesUpdate().');
        }
        if (requestParameters['endpointDeviceRequest'] == null) {
            throw new runtime.RequiredError('endpointDeviceRequest', 'Required parameter "endpointDeviceRequest" was null or undefined when calling endpointsDevicesUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/devices/{device_uuid}/`;
        urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, index_1.EndpointDeviceRequestToJSON)(requestParameters['endpointDeviceRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EndpointDeviceFromJSON)(jsonValue));
    }
    /**
     * Mixin to add a used_by endpoint to return a list of all objects using this object
     */
    async endpointsDevicesUpdate(requestParameters, initOverrides) {
        const response = await this.endpointsDevicesUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsDevicesUsedByListRaw(requestParameters, initOverrides) {
        if (requestParameters['deviceUuid'] == null) {
            throw new runtime.RequiredError('deviceUuid', 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesUsedByList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/endpoints/devices/{device_uuid}/used_by/`;
        urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UsedByFromJSON));
    }
    /**
     * Get a list of all objects that use this object
     */
    async endpointsDevicesUsedByList(requestParameters, initOverrides) {
        const response = await this.endpointsDevicesUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
exports.EndpointsApi = EndpointsApi;
//# sourceMappingURL=EndpointsApi.js.map