/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.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.
 */

import type {
    Device,
    DuoDevice,
    DuoDeviceRequest,
    EmailDevice,
    EmailDeviceRequest,
    GoogleEndpointDevice,
    GoogleEndpointDeviceRequest,
    PaginatedDuoDeviceList,
    PaginatedEmailDeviceList,
    PaginatedGoogleEndpointDeviceList,
    PaginatedSMSDeviceList,
    PaginatedStaticDeviceList,
    PaginatedTOTPDeviceList,
    PaginatedWebAuthnDeviceList,
    PatchedDuoDeviceRequest,
    PatchedEmailDeviceRequest,
    PatchedGoogleEndpointDeviceRequest,
    PatchedSMSDeviceRequest,
    PatchedStaticDeviceRequest,
    PatchedTOTPDeviceRequest,
    PatchedWebAuthnDeviceRequest,
    SMSDevice,
    SMSDeviceRequest,
    StaticDevice,
    StaticDeviceRequest,
    TOTPDevice,
    TOTPDeviceRequest,
    UsedBy,
    WebAuthnDevice,
    WebAuthnDeviceRequest,
} from "../models/index";
import {
    DeviceFromJSON,
    DuoDeviceFromJSON,
    DuoDeviceRequestToJSON,
    EmailDeviceFromJSON,
    EmailDeviceRequestToJSON,
    GoogleEndpointDeviceFromJSON,
    GoogleEndpointDeviceRequestToJSON,
    PaginatedDuoDeviceListFromJSON,
    PaginatedEmailDeviceListFromJSON,
    PaginatedGoogleEndpointDeviceListFromJSON,
    PaginatedSMSDeviceListFromJSON,
    PaginatedStaticDeviceListFromJSON,
    PaginatedTOTPDeviceListFromJSON,
    PaginatedWebAuthnDeviceListFromJSON,
    PatchedDuoDeviceRequestToJSON,
    PatchedEmailDeviceRequestToJSON,
    PatchedGoogleEndpointDeviceRequestToJSON,
    PatchedSMSDeviceRequestToJSON,
    PatchedStaticDeviceRequestToJSON,
    PatchedTOTPDeviceRequestToJSON,
    PatchedWebAuthnDeviceRequestToJSON,
    SMSDeviceFromJSON,
    SMSDeviceRequestToJSON,
    StaticDeviceFromJSON,
    StaticDeviceRequestToJSON,
    TOTPDeviceFromJSON,
    TOTPDeviceRequestToJSON,
    UsedByFromJSON,
    WebAuthnDeviceFromJSON,
    WebAuthnDeviceRequestToJSON,
} from "../models/index";
import * as runtime from "../runtime";

export interface AuthenticatorsAdminAllListRequest {
    user?: number;
}

export interface AuthenticatorsAdminDuoCreateRequest {
    duoDeviceRequest: DuoDeviceRequest;
}

export interface AuthenticatorsAdminDuoDestroyRequest {
    id: number;
}

export interface AuthenticatorsAdminDuoListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsAdminDuoPartialUpdateRequest {
    id: number;
    patchedDuoDeviceRequest?: PatchedDuoDeviceRequest;
}

export interface AuthenticatorsAdminDuoRetrieveRequest {
    id: number;
}

export interface AuthenticatorsAdminDuoUpdateRequest {
    id: number;
    duoDeviceRequest: DuoDeviceRequest;
}

export interface AuthenticatorsAdminEmailCreateRequest {
    emailDeviceRequest: EmailDeviceRequest;
}

export interface AuthenticatorsAdminEmailDestroyRequest {
    id: number;
}

export interface AuthenticatorsAdminEmailListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsAdminEmailPartialUpdateRequest {
    id: number;
    patchedEmailDeviceRequest?: PatchedEmailDeviceRequest;
}

export interface AuthenticatorsAdminEmailRetrieveRequest {
    id: number;
}

export interface AuthenticatorsAdminEmailUpdateRequest {
    id: number;
    emailDeviceRequest: EmailDeviceRequest;
}

export interface AuthenticatorsAdminEndpointCreateRequest {
    googleEndpointDeviceRequest: GoogleEndpointDeviceRequest;
}

export interface AuthenticatorsAdminEndpointDestroyRequest {
    uuid: string;
}

export interface AuthenticatorsAdminEndpointListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsAdminEndpointPartialUpdateRequest {
    uuid: string;
    patchedGoogleEndpointDeviceRequest?: PatchedGoogleEndpointDeviceRequest;
}

export interface AuthenticatorsAdminEndpointRetrieveRequest {
    uuid: string;
}

export interface AuthenticatorsAdminEndpointUpdateRequest {
    uuid: string;
    googleEndpointDeviceRequest: GoogleEndpointDeviceRequest;
}

export interface AuthenticatorsAdminSmsCreateRequest {
    sMSDeviceRequest: SMSDeviceRequest;
}

export interface AuthenticatorsAdminSmsDestroyRequest {
    id: number;
}

export interface AuthenticatorsAdminSmsListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsAdminSmsPartialUpdateRequest {
    id: number;
    patchedSMSDeviceRequest?: PatchedSMSDeviceRequest;
}

export interface AuthenticatorsAdminSmsRetrieveRequest {
    id: number;
}

export interface AuthenticatorsAdminSmsUpdateRequest {
    id: number;
    sMSDeviceRequest: SMSDeviceRequest;
}

export interface AuthenticatorsAdminStaticCreateRequest {
    staticDeviceRequest: StaticDeviceRequest;
}

export interface AuthenticatorsAdminStaticDestroyRequest {
    id: number;
}

export interface AuthenticatorsAdminStaticListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsAdminStaticPartialUpdateRequest {
    id: number;
    patchedStaticDeviceRequest?: PatchedStaticDeviceRequest;
}

export interface AuthenticatorsAdminStaticRetrieveRequest {
    id: number;
}

export interface AuthenticatorsAdminStaticUpdateRequest {
    id: number;
    staticDeviceRequest: StaticDeviceRequest;
}

export interface AuthenticatorsAdminTotpCreateRequest {
    tOTPDeviceRequest: TOTPDeviceRequest;
}

export interface AuthenticatorsAdminTotpDestroyRequest {
    id: number;
}

export interface AuthenticatorsAdminTotpListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsAdminTotpPartialUpdateRequest {
    id: number;
    patchedTOTPDeviceRequest?: PatchedTOTPDeviceRequest;
}

export interface AuthenticatorsAdminTotpRetrieveRequest {
    id: number;
}

export interface AuthenticatorsAdminTotpUpdateRequest {
    id: number;
    tOTPDeviceRequest: TOTPDeviceRequest;
}

export interface AuthenticatorsAdminWebauthnCreateRequest {
    webAuthnDeviceRequest: WebAuthnDeviceRequest;
}

export interface AuthenticatorsAdminWebauthnDestroyRequest {
    id: number;
}

export interface AuthenticatorsAdminWebauthnListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsAdminWebauthnPartialUpdateRequest {
    id: number;
    patchedWebAuthnDeviceRequest?: PatchedWebAuthnDeviceRequest;
}

export interface AuthenticatorsAdminWebauthnRetrieveRequest {
    id: number;
}

export interface AuthenticatorsAdminWebauthnUpdateRequest {
    id: number;
    webAuthnDeviceRequest: WebAuthnDeviceRequest;
}

export interface AuthenticatorsDuoDestroyRequest {
    id: number;
}

export interface AuthenticatorsDuoListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsDuoPartialUpdateRequest {
    id: number;
    patchedDuoDeviceRequest?: PatchedDuoDeviceRequest;
}

export interface AuthenticatorsDuoRetrieveRequest {
    id: number;
}

export interface AuthenticatorsDuoUpdateRequest {
    id: number;
    duoDeviceRequest: DuoDeviceRequest;
}

export interface AuthenticatorsDuoUsedByListRequest {
    id: number;
}

export interface AuthenticatorsEmailDestroyRequest {
    id: number;
}

export interface AuthenticatorsEmailListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsEmailPartialUpdateRequest {
    id: number;
    patchedEmailDeviceRequest?: PatchedEmailDeviceRequest;
}

export interface AuthenticatorsEmailRetrieveRequest {
    id: number;
}

export interface AuthenticatorsEmailUpdateRequest {
    id: number;
    emailDeviceRequest: EmailDeviceRequest;
}

export interface AuthenticatorsEmailUsedByListRequest {
    id: number;
}

export interface AuthenticatorsEndpointListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsEndpointRetrieveRequest {
    uuid: string;
}

export interface AuthenticatorsEndpointUsedByListRequest {
    uuid: string;
}

export interface AuthenticatorsSmsDestroyRequest {
    id: number;
}

export interface AuthenticatorsSmsListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsSmsPartialUpdateRequest {
    id: number;
    patchedSMSDeviceRequest?: PatchedSMSDeviceRequest;
}

export interface AuthenticatorsSmsRetrieveRequest {
    id: number;
}

export interface AuthenticatorsSmsUpdateRequest {
    id: number;
    sMSDeviceRequest: SMSDeviceRequest;
}

export interface AuthenticatorsSmsUsedByListRequest {
    id: number;
}

export interface AuthenticatorsStaticDestroyRequest {
    id: number;
}

export interface AuthenticatorsStaticListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsStaticPartialUpdateRequest {
    id: number;
    patchedStaticDeviceRequest?: PatchedStaticDeviceRequest;
}

export interface AuthenticatorsStaticRetrieveRequest {
    id: number;
}

export interface AuthenticatorsStaticUpdateRequest {
    id: number;
    staticDeviceRequest: StaticDeviceRequest;
}

export interface AuthenticatorsStaticUsedByListRequest {
    id: number;
}

export interface AuthenticatorsTotpDestroyRequest {
    id: number;
}

export interface AuthenticatorsTotpListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsTotpPartialUpdateRequest {
    id: number;
    patchedTOTPDeviceRequest?: PatchedTOTPDeviceRequest;
}

export interface AuthenticatorsTotpRetrieveRequest {
    id: number;
}

export interface AuthenticatorsTotpUpdateRequest {
    id: number;
    tOTPDeviceRequest: TOTPDeviceRequest;
}

export interface AuthenticatorsTotpUsedByListRequest {
    id: number;
}

export interface AuthenticatorsWebauthnDestroyRequest {
    id: number;
}

export interface AuthenticatorsWebauthnListRequest {
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface AuthenticatorsWebauthnPartialUpdateRequest {
    id: number;
    patchedWebAuthnDeviceRequest?: PatchedWebAuthnDeviceRequest;
}

export interface AuthenticatorsWebauthnRetrieveRequest {
    id: number;
}

export interface AuthenticatorsWebauthnUpdateRequest {
    id: number;
    webAuthnDeviceRequest: WebAuthnDeviceRequest;
}

export interface AuthenticatorsWebauthnUsedByListRequest {
    id: number;
}

/**
 *
 */
export class AuthenticatorsApi extends runtime.BaseAPI {
    /**
     * Creates request options for authenticatorsAdminAllList without sending the request
     */
    async authenticatorsAdminAllListRequestOpts(
        requestParameters: AuthenticatorsAdminAllListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        if (requestParameters["user"] != null) {
            queryParameters["user"] = requestParameters["user"];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/all/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Get all devices for current user
     */
    async authenticatorsAdminAllListRaw(
        requestParameters: AuthenticatorsAdminAllListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<Device>>> {
        const requestOptions = await this.authenticatorsAdminAllListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DeviceFromJSON));
    }

    /**
     * Get all devices for current user
     */
    async authenticatorsAdminAllList(
        requestParameters: AuthenticatorsAdminAllListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<Device>> {
        const response = await this.authenticatorsAdminAllListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminDuoCreate without sending the request
     */
    async authenticatorsAdminDuoCreateRequestOpts(
        requestParameters: AuthenticatorsAdminDuoCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["duoDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "duoDeviceRequest",
                'Required parameter "duoDeviceRequest" was null or undefined when calling authenticatorsAdminDuoCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/duo/`;

        return {
            path: urlPath,
            method: "POST",
            headers: headerParameters,
            query: queryParameters,
            body: DuoDeviceRequestToJSON(requestParameters["duoDeviceRequest"]),
        };
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoCreateRaw(
        requestParameters: AuthenticatorsAdminDuoCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DuoDevice>> {
        const requestOptions =
            await this.authenticatorsAdminDuoCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoCreate(
        requestParameters: AuthenticatorsAdminDuoCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DuoDevice> {
        const response = await this.authenticatorsAdminDuoCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminDuoDestroy without sending the request
     */
    async authenticatorsAdminDuoDestroyRequestOpts(
        requestParameters: AuthenticatorsAdminDuoDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminDuoDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/duo/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoDestroyRaw(
        requestParameters: AuthenticatorsAdminDuoDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.authenticatorsAdminDuoDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoDestroy(
        requestParameters: AuthenticatorsAdminDuoDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsAdminDuoDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsAdminDuoList without sending the request
     */
    async authenticatorsAdminDuoListRequestOpts(
        requestParameters: AuthenticatorsAdminDuoListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/duo/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoListRaw(
        requestParameters: AuthenticatorsAdminDuoListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedDuoDeviceList>> {
        const requestOptions = await this.authenticatorsAdminDuoListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedDuoDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoList(
        requestParameters: AuthenticatorsAdminDuoListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedDuoDeviceList> {
        const response = await this.authenticatorsAdminDuoListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminDuoPartialUpdate without sending the request
     */
    async authenticatorsAdminDuoPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminDuoPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminDuoPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/duo/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedDuoDeviceRequestToJSON(requestParameters["patchedDuoDeviceRequest"]),
        };
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoPartialUpdateRaw(
        requestParameters: AuthenticatorsAdminDuoPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DuoDevice>> {
        const requestOptions =
            await this.authenticatorsAdminDuoPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoPartialUpdate(
        requestParameters: AuthenticatorsAdminDuoPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DuoDevice> {
        const response = await this.authenticatorsAdminDuoPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminDuoRetrieve without sending the request
     */
    async authenticatorsAdminDuoRetrieveRequestOpts(
        requestParameters: AuthenticatorsAdminDuoRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminDuoRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/duo/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoRetrieveRaw(
        requestParameters: AuthenticatorsAdminDuoRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DuoDevice>> {
        const requestOptions =
            await this.authenticatorsAdminDuoRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoRetrieve(
        requestParameters: AuthenticatorsAdminDuoRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DuoDevice> {
        const response = await this.authenticatorsAdminDuoRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminDuoUpdate without sending the request
     */
    async authenticatorsAdminDuoUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminDuoUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminDuoUpdate().',
            );
        }

        if (requestParameters["duoDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "duoDeviceRequest",
                'Required parameter "duoDeviceRequest" was null or undefined when calling authenticatorsAdminDuoUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/duo/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: DuoDeviceRequestToJSON(requestParameters["duoDeviceRequest"]),
        };
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoUpdateRaw(
        requestParameters: AuthenticatorsAdminDuoUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DuoDevice>> {
        const requestOptions =
            await this.authenticatorsAdminDuoUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for Duo authenticator devices (for admins)
     */
    async authenticatorsAdminDuoUpdate(
        requestParameters: AuthenticatorsAdminDuoUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DuoDevice> {
        const response = await this.authenticatorsAdminDuoUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEmailCreate without sending the request
     */
    async authenticatorsAdminEmailCreateRequestOpts(
        requestParameters: AuthenticatorsAdminEmailCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["emailDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "emailDeviceRequest",
                'Required parameter "emailDeviceRequest" was null or undefined when calling authenticatorsAdminEmailCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/email/`;

        return {
            path: urlPath,
            method: "POST",
            headers: headerParameters,
            query: queryParameters,
            body: EmailDeviceRequestToJSON(requestParameters["emailDeviceRequest"]),
        };
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailCreateRaw(
        requestParameters: AuthenticatorsAdminEmailCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<EmailDevice>> {
        const requestOptions =
            await this.authenticatorsAdminEmailCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailCreate(
        requestParameters: AuthenticatorsAdminEmailCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<EmailDevice> {
        const response = await this.authenticatorsAdminEmailCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEmailDestroy without sending the request
     */
    async authenticatorsAdminEmailDestroyRequestOpts(
        requestParameters: AuthenticatorsAdminEmailDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminEmailDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/email/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailDestroyRaw(
        requestParameters: AuthenticatorsAdminEmailDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.authenticatorsAdminEmailDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailDestroy(
        requestParameters: AuthenticatorsAdminEmailDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsAdminEmailDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsAdminEmailList without sending the request
     */
    async authenticatorsAdminEmailListRequestOpts(
        requestParameters: AuthenticatorsAdminEmailListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/email/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailListRaw(
        requestParameters: AuthenticatorsAdminEmailListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedEmailDeviceList>> {
        const requestOptions =
            await this.authenticatorsAdminEmailListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedEmailDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailList(
        requestParameters: AuthenticatorsAdminEmailListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedEmailDeviceList> {
        const response = await this.authenticatorsAdminEmailListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEmailPartialUpdate without sending the request
     */
    async authenticatorsAdminEmailPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminEmailPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminEmailPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/email/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedEmailDeviceRequestToJSON(requestParameters["patchedEmailDeviceRequest"]),
        };
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailPartialUpdateRaw(
        requestParameters: AuthenticatorsAdminEmailPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<EmailDevice>> {
        const requestOptions =
            await this.authenticatorsAdminEmailPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailPartialUpdate(
        requestParameters: AuthenticatorsAdminEmailPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<EmailDevice> {
        const response = await this.authenticatorsAdminEmailPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEmailRetrieve without sending the request
     */
    async authenticatorsAdminEmailRetrieveRequestOpts(
        requestParameters: AuthenticatorsAdminEmailRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminEmailRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/email/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailRetrieveRaw(
        requestParameters: AuthenticatorsAdminEmailRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<EmailDevice>> {
        const requestOptions =
            await this.authenticatorsAdminEmailRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailRetrieve(
        requestParameters: AuthenticatorsAdminEmailRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<EmailDevice> {
        const response = await this.authenticatorsAdminEmailRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEmailUpdate without sending the request
     */
    async authenticatorsAdminEmailUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminEmailUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminEmailUpdate().',
            );
        }

        if (requestParameters["emailDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "emailDeviceRequest",
                'Required parameter "emailDeviceRequest" was null or undefined when calling authenticatorsAdminEmailUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/email/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: EmailDeviceRequestToJSON(requestParameters["emailDeviceRequest"]),
        };
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailUpdateRaw(
        requestParameters: AuthenticatorsAdminEmailUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<EmailDevice>> {
        const requestOptions =
            await this.authenticatorsAdminEmailUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for email authenticator devices (for admins)
     */
    async authenticatorsAdminEmailUpdate(
        requestParameters: AuthenticatorsAdminEmailUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<EmailDevice> {
        const response = await this.authenticatorsAdminEmailUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEndpointCreate without sending the request
     */
    async authenticatorsAdminEndpointCreateRequestOpts(
        requestParameters: AuthenticatorsAdminEndpointCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["googleEndpointDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "googleEndpointDeviceRequest",
                'Required parameter "googleEndpointDeviceRequest" was null or undefined when calling authenticatorsAdminEndpointCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/endpoint/`;

        return {
            path: urlPath,
            method: "POST",
            headers: headerParameters,
            query: queryParameters,
            body: GoogleEndpointDeviceRequestToJSON(
                requestParameters["googleEndpointDeviceRequest"],
            ),
        };
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointCreateRaw(
        requestParameters: AuthenticatorsAdminEndpointCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleEndpointDevice>> {
        const requestOptions =
            await this.authenticatorsAdminEndpointCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            GoogleEndpointDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointCreate(
        requestParameters: AuthenticatorsAdminEndpointCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleEndpointDevice> {
        const response = await this.authenticatorsAdminEndpointCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEndpointDestroy without sending the request
     */
    async authenticatorsAdminEndpointDestroyRequestOpts(
        requestParameters: AuthenticatorsAdminEndpointDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling authenticatorsAdminEndpointDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/endpoint/{uuid}/`;
        urlPath = urlPath.replace(
            `{${"uuid"}}`,
            encodeURIComponent(String(requestParameters["uuid"])),
        );

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointDestroyRaw(
        requestParameters: AuthenticatorsAdminEndpointDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.authenticatorsAdminEndpointDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointDestroy(
        requestParameters: AuthenticatorsAdminEndpointDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsAdminEndpointDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsAdminEndpointList without sending the request
     */
    async authenticatorsAdminEndpointListRequestOpts(
        requestParameters: AuthenticatorsAdminEndpointListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/endpoint/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointListRaw(
        requestParameters: AuthenticatorsAdminEndpointListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedGoogleEndpointDeviceList>> {
        const requestOptions =
            await this.authenticatorsAdminEndpointListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedGoogleEndpointDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointList(
        requestParameters: AuthenticatorsAdminEndpointListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedGoogleEndpointDeviceList> {
        const response = await this.authenticatorsAdminEndpointListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEndpointPartialUpdate without sending the request
     */
    async authenticatorsAdminEndpointPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminEndpointPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling authenticatorsAdminEndpointPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/endpoint/{uuid}/`;
        urlPath = urlPath.replace(
            `{${"uuid"}}`,
            encodeURIComponent(String(requestParameters["uuid"])),
        );

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedGoogleEndpointDeviceRequestToJSON(
                requestParameters["patchedGoogleEndpointDeviceRequest"],
            ),
        };
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointPartialUpdateRaw(
        requestParameters: AuthenticatorsAdminEndpointPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleEndpointDevice>> {
        const requestOptions =
            await this.authenticatorsAdminEndpointPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            GoogleEndpointDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointPartialUpdate(
        requestParameters: AuthenticatorsAdminEndpointPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleEndpointDevice> {
        const response = await this.authenticatorsAdminEndpointPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEndpointRetrieve without sending the request
     */
    async authenticatorsAdminEndpointRetrieveRequestOpts(
        requestParameters: AuthenticatorsAdminEndpointRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling authenticatorsAdminEndpointRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/endpoint/{uuid}/`;
        urlPath = urlPath.replace(
            `{${"uuid"}}`,
            encodeURIComponent(String(requestParameters["uuid"])),
        );

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointRetrieveRaw(
        requestParameters: AuthenticatorsAdminEndpointRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleEndpointDevice>> {
        const requestOptions =
            await this.authenticatorsAdminEndpointRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            GoogleEndpointDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointRetrieve(
        requestParameters: AuthenticatorsAdminEndpointRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleEndpointDevice> {
        const response = await this.authenticatorsAdminEndpointRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminEndpointUpdate without sending the request
     */
    async authenticatorsAdminEndpointUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminEndpointUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling authenticatorsAdminEndpointUpdate().',
            );
        }

        if (requestParameters["googleEndpointDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "googleEndpointDeviceRequest",
                'Required parameter "googleEndpointDeviceRequest" was null or undefined when calling authenticatorsAdminEndpointUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/endpoint/{uuid}/`;
        urlPath = urlPath.replace(
            `{${"uuid"}}`,
            encodeURIComponent(String(requestParameters["uuid"])),
        );

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: GoogleEndpointDeviceRequestToJSON(
                requestParameters["googleEndpointDeviceRequest"],
            ),
        };
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointUpdateRaw(
        requestParameters: AuthenticatorsAdminEndpointUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleEndpointDevice>> {
        const requestOptions =
            await this.authenticatorsAdminEndpointUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            GoogleEndpointDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for Endpoint authenticator devices (for admins)
     */
    async authenticatorsAdminEndpointUpdate(
        requestParameters: AuthenticatorsAdminEndpointUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleEndpointDevice> {
        const response = await this.authenticatorsAdminEndpointUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminSmsCreate without sending the request
     */
    async authenticatorsAdminSmsCreateRequestOpts(
        requestParameters: AuthenticatorsAdminSmsCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["sMSDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "sMSDeviceRequest",
                'Required parameter "sMSDeviceRequest" was null or undefined when calling authenticatorsAdminSmsCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/sms/`;

        return {
            path: urlPath,
            method: "POST",
            headers: headerParameters,
            query: queryParameters,
            body: SMSDeviceRequestToJSON(requestParameters["sMSDeviceRequest"]),
        };
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsCreateRaw(
        requestParameters: AuthenticatorsAdminSmsCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SMSDevice>> {
        const requestOptions =
            await this.authenticatorsAdminSmsCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsCreate(
        requestParameters: AuthenticatorsAdminSmsCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SMSDevice> {
        const response = await this.authenticatorsAdminSmsCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminSmsDestroy without sending the request
     */
    async authenticatorsAdminSmsDestroyRequestOpts(
        requestParameters: AuthenticatorsAdminSmsDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminSmsDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/sms/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsDestroyRaw(
        requestParameters: AuthenticatorsAdminSmsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.authenticatorsAdminSmsDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsDestroy(
        requestParameters: AuthenticatorsAdminSmsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsAdminSmsDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsAdminSmsList without sending the request
     */
    async authenticatorsAdminSmsListRequestOpts(
        requestParameters: AuthenticatorsAdminSmsListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/sms/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsListRaw(
        requestParameters: AuthenticatorsAdminSmsListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedSMSDeviceList>> {
        const requestOptions = await this.authenticatorsAdminSmsListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedSMSDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsList(
        requestParameters: AuthenticatorsAdminSmsListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedSMSDeviceList> {
        const response = await this.authenticatorsAdminSmsListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminSmsPartialUpdate without sending the request
     */
    async authenticatorsAdminSmsPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminSmsPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminSmsPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/sms/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedSMSDeviceRequestToJSON(requestParameters["patchedSMSDeviceRequest"]),
        };
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsPartialUpdateRaw(
        requestParameters: AuthenticatorsAdminSmsPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SMSDevice>> {
        const requestOptions =
            await this.authenticatorsAdminSmsPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsPartialUpdate(
        requestParameters: AuthenticatorsAdminSmsPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SMSDevice> {
        const response = await this.authenticatorsAdminSmsPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminSmsRetrieve without sending the request
     */
    async authenticatorsAdminSmsRetrieveRequestOpts(
        requestParameters: AuthenticatorsAdminSmsRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminSmsRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/sms/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsRetrieveRaw(
        requestParameters: AuthenticatorsAdminSmsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SMSDevice>> {
        const requestOptions =
            await this.authenticatorsAdminSmsRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsRetrieve(
        requestParameters: AuthenticatorsAdminSmsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SMSDevice> {
        const response = await this.authenticatorsAdminSmsRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminSmsUpdate without sending the request
     */
    async authenticatorsAdminSmsUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminSmsUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminSmsUpdate().',
            );
        }

        if (requestParameters["sMSDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "sMSDeviceRequest",
                'Required parameter "sMSDeviceRequest" was null or undefined when calling authenticatorsAdminSmsUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/sms/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: SMSDeviceRequestToJSON(requestParameters["sMSDeviceRequest"]),
        };
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsUpdateRaw(
        requestParameters: AuthenticatorsAdminSmsUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SMSDevice>> {
        const requestOptions =
            await this.authenticatorsAdminSmsUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for sms authenticator devices (for admins)
     */
    async authenticatorsAdminSmsUpdate(
        requestParameters: AuthenticatorsAdminSmsUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SMSDevice> {
        const response = await this.authenticatorsAdminSmsUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminStaticCreate without sending the request
     */
    async authenticatorsAdminStaticCreateRequestOpts(
        requestParameters: AuthenticatorsAdminStaticCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["staticDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "staticDeviceRequest",
                'Required parameter "staticDeviceRequest" was null or undefined when calling authenticatorsAdminStaticCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/static/`;

        return {
            path: urlPath,
            method: "POST",
            headers: headerParameters,
            query: queryParameters,
            body: StaticDeviceRequestToJSON(requestParameters["staticDeviceRequest"]),
        };
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticCreateRaw(
        requestParameters: AuthenticatorsAdminStaticCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<StaticDevice>> {
        const requestOptions =
            await this.authenticatorsAdminStaticCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            StaticDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticCreate(
        requestParameters: AuthenticatorsAdminStaticCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<StaticDevice> {
        const response = await this.authenticatorsAdminStaticCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminStaticDestroy without sending the request
     */
    async authenticatorsAdminStaticDestroyRequestOpts(
        requestParameters: AuthenticatorsAdminStaticDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminStaticDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/static/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticDestroyRaw(
        requestParameters: AuthenticatorsAdminStaticDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.authenticatorsAdminStaticDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticDestroy(
        requestParameters: AuthenticatorsAdminStaticDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsAdminStaticDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsAdminStaticList without sending the request
     */
    async authenticatorsAdminStaticListRequestOpts(
        requestParameters: AuthenticatorsAdminStaticListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/static/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticListRaw(
        requestParameters: AuthenticatorsAdminStaticListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedStaticDeviceList>> {
        const requestOptions =
            await this.authenticatorsAdminStaticListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedStaticDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticList(
        requestParameters: AuthenticatorsAdminStaticListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedStaticDeviceList> {
        const response = await this.authenticatorsAdminStaticListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminStaticPartialUpdate without sending the request
     */
    async authenticatorsAdminStaticPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminStaticPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminStaticPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/static/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedStaticDeviceRequestToJSON(requestParameters["patchedStaticDeviceRequest"]),
        };
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticPartialUpdateRaw(
        requestParameters: AuthenticatorsAdminStaticPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<StaticDevice>> {
        const requestOptions =
            await this.authenticatorsAdminStaticPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            StaticDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticPartialUpdate(
        requestParameters: AuthenticatorsAdminStaticPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<StaticDevice> {
        const response = await this.authenticatorsAdminStaticPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminStaticRetrieve without sending the request
     */
    async authenticatorsAdminStaticRetrieveRequestOpts(
        requestParameters: AuthenticatorsAdminStaticRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminStaticRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/static/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticRetrieveRaw(
        requestParameters: AuthenticatorsAdminStaticRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<StaticDevice>> {
        const requestOptions =
            await this.authenticatorsAdminStaticRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            StaticDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticRetrieve(
        requestParameters: AuthenticatorsAdminStaticRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<StaticDevice> {
        const response = await this.authenticatorsAdminStaticRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminStaticUpdate without sending the request
     */
    async authenticatorsAdminStaticUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminStaticUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminStaticUpdate().',
            );
        }

        if (requestParameters["staticDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "staticDeviceRequest",
                'Required parameter "staticDeviceRequest" was null or undefined when calling authenticatorsAdminStaticUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/static/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: StaticDeviceRequestToJSON(requestParameters["staticDeviceRequest"]),
        };
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticUpdateRaw(
        requestParameters: AuthenticatorsAdminStaticUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<StaticDevice>> {
        const requestOptions =
            await this.authenticatorsAdminStaticUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            StaticDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for static authenticator devices (for admins)
     */
    async authenticatorsAdminStaticUpdate(
        requestParameters: AuthenticatorsAdminStaticUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<StaticDevice> {
        const response = await this.authenticatorsAdminStaticUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminTotpCreate without sending the request
     */
    async authenticatorsAdminTotpCreateRequestOpts(
        requestParameters: AuthenticatorsAdminTotpCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["tOTPDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "tOTPDeviceRequest",
                'Required parameter "tOTPDeviceRequest" was null or undefined when calling authenticatorsAdminTotpCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/totp/`;

        return {
            path: urlPath,
            method: "POST",
            headers: headerParameters,
            query: queryParameters,
            body: TOTPDeviceRequestToJSON(requestParameters["tOTPDeviceRequest"]),
        };
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpCreateRaw(
        requestParameters: AuthenticatorsAdminTotpCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<TOTPDevice>> {
        const requestOptions =
            await this.authenticatorsAdminTotpCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpCreate(
        requestParameters: AuthenticatorsAdminTotpCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<TOTPDevice> {
        const response = await this.authenticatorsAdminTotpCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminTotpDestroy without sending the request
     */
    async authenticatorsAdminTotpDestroyRequestOpts(
        requestParameters: AuthenticatorsAdminTotpDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminTotpDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/totp/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpDestroyRaw(
        requestParameters: AuthenticatorsAdminTotpDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.authenticatorsAdminTotpDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpDestroy(
        requestParameters: AuthenticatorsAdminTotpDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsAdminTotpDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsAdminTotpList without sending the request
     */
    async authenticatorsAdminTotpListRequestOpts(
        requestParameters: AuthenticatorsAdminTotpListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/totp/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpListRaw(
        requestParameters: AuthenticatorsAdminTotpListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedTOTPDeviceList>> {
        const requestOptions = await this.authenticatorsAdminTotpListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedTOTPDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpList(
        requestParameters: AuthenticatorsAdminTotpListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedTOTPDeviceList> {
        const response = await this.authenticatorsAdminTotpListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminTotpPartialUpdate without sending the request
     */
    async authenticatorsAdminTotpPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminTotpPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminTotpPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/totp/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedTOTPDeviceRequestToJSON(requestParameters["patchedTOTPDeviceRequest"]),
        };
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpPartialUpdateRaw(
        requestParameters: AuthenticatorsAdminTotpPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<TOTPDevice>> {
        const requestOptions =
            await this.authenticatorsAdminTotpPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpPartialUpdate(
        requestParameters: AuthenticatorsAdminTotpPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<TOTPDevice> {
        const response = await this.authenticatorsAdminTotpPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminTotpRetrieve without sending the request
     */
    async authenticatorsAdminTotpRetrieveRequestOpts(
        requestParameters: AuthenticatorsAdminTotpRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminTotpRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/totp/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpRetrieveRaw(
        requestParameters: AuthenticatorsAdminTotpRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<TOTPDevice>> {
        const requestOptions =
            await this.authenticatorsAdminTotpRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpRetrieve(
        requestParameters: AuthenticatorsAdminTotpRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<TOTPDevice> {
        const response = await this.authenticatorsAdminTotpRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminTotpUpdate without sending the request
     */
    async authenticatorsAdminTotpUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminTotpUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminTotpUpdate().',
            );
        }

        if (requestParameters["tOTPDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "tOTPDeviceRequest",
                'Required parameter "tOTPDeviceRequest" was null or undefined when calling authenticatorsAdminTotpUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/totp/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: TOTPDeviceRequestToJSON(requestParameters["tOTPDeviceRequest"]),
        };
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpUpdateRaw(
        requestParameters: AuthenticatorsAdminTotpUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<TOTPDevice>> {
        const requestOptions =
            await this.authenticatorsAdminTotpUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for totp authenticator devices (for admins)
     */
    async authenticatorsAdminTotpUpdate(
        requestParameters: AuthenticatorsAdminTotpUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<TOTPDevice> {
        const response = await this.authenticatorsAdminTotpUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminWebauthnCreate without sending the request
     */
    async authenticatorsAdminWebauthnCreateRequestOpts(
        requestParameters: AuthenticatorsAdminWebauthnCreateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["webAuthnDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "webAuthnDeviceRequest",
                'Required parameter "webAuthnDeviceRequest" was null or undefined when calling authenticatorsAdminWebauthnCreate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/webauthn/`;

        return {
            path: urlPath,
            method: "POST",
            headers: headerParameters,
            query: queryParameters,
            body: WebAuthnDeviceRequestToJSON(requestParameters["webAuthnDeviceRequest"]),
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnCreateRaw(
        requestParameters: AuthenticatorsAdminWebauthnCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WebAuthnDevice>> {
        const requestOptions =
            await this.authenticatorsAdminWebauthnCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            WebAuthnDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnCreate(
        requestParameters: AuthenticatorsAdminWebauthnCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WebAuthnDevice> {
        const response = await this.authenticatorsAdminWebauthnCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminWebauthnDestroy without sending the request
     */
    async authenticatorsAdminWebauthnDestroyRequestOpts(
        requestParameters: AuthenticatorsAdminWebauthnDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminWebauthnDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/webauthn/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnDestroyRaw(
        requestParameters: AuthenticatorsAdminWebauthnDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.authenticatorsAdminWebauthnDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnDestroy(
        requestParameters: AuthenticatorsAdminWebauthnDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsAdminWebauthnDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsAdminWebauthnList without sending the request
     */
    async authenticatorsAdminWebauthnListRequestOpts(
        requestParameters: AuthenticatorsAdminWebauthnListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/webauthn/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnListRaw(
        requestParameters: AuthenticatorsAdminWebauthnListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedWebAuthnDeviceList>> {
        const requestOptions =
            await this.authenticatorsAdminWebauthnListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedWebAuthnDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnList(
        requestParameters: AuthenticatorsAdminWebauthnListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedWebAuthnDeviceList> {
        const response = await this.authenticatorsAdminWebauthnListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminWebauthnPartialUpdate without sending the request
     */
    async authenticatorsAdminWebauthnPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminWebauthnPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminWebauthnPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/webauthn/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedWebAuthnDeviceRequestToJSON(
                requestParameters["patchedWebAuthnDeviceRequest"],
            ),
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnPartialUpdateRaw(
        requestParameters: AuthenticatorsAdminWebauthnPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WebAuthnDevice>> {
        const requestOptions =
            await this.authenticatorsAdminWebauthnPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            WebAuthnDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnPartialUpdate(
        requestParameters: AuthenticatorsAdminWebauthnPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WebAuthnDevice> {
        const response = await this.authenticatorsAdminWebauthnPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminWebauthnRetrieve without sending the request
     */
    async authenticatorsAdminWebauthnRetrieveRequestOpts(
        requestParameters: AuthenticatorsAdminWebauthnRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminWebauthnRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/admin/webauthn/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnRetrieveRaw(
        requestParameters: AuthenticatorsAdminWebauthnRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WebAuthnDevice>> {
        const requestOptions =
            await this.authenticatorsAdminWebauthnRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            WebAuthnDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnRetrieve(
        requestParameters: AuthenticatorsAdminWebauthnRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WebAuthnDevice> {
        const response = await this.authenticatorsAdminWebauthnRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAdminWebauthnUpdate without sending the request
     */
    async authenticatorsAdminWebauthnUpdateRequestOpts(
        requestParameters: AuthenticatorsAdminWebauthnUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsAdminWebauthnUpdate().',
            );
        }

        if (requestParameters["webAuthnDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "webAuthnDeviceRequest",
                'Required parameter "webAuthnDeviceRequest" was null or undefined when calling authenticatorsAdminWebauthnUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/admin/webauthn/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: WebAuthnDeviceRequestToJSON(requestParameters["webAuthnDeviceRequest"]),
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnUpdateRaw(
        requestParameters: AuthenticatorsAdminWebauthnUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WebAuthnDevice>> {
        const requestOptions =
            await this.authenticatorsAdminWebauthnUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            WebAuthnDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for WebAuthn authenticator devices (for admins)
     */
    async authenticatorsAdminWebauthnUpdate(
        requestParameters: AuthenticatorsAdminWebauthnUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WebAuthnDevice> {
        const response = await this.authenticatorsAdminWebauthnUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsAllList without sending the request
     */
    async authenticatorsAllListRequestOpts(): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/all/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Get all devices for current user
     */
    async authenticatorsAllListRaw(
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<Device>>> {
        const requestOptions = await this.authenticatorsAllListRequestOpts();
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DeviceFromJSON));
    }

    /**
     * Get all devices for current user
     */
    async authenticatorsAllList(
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<Device>> {
        const response = await this.authenticatorsAllListRaw(initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsDuoDestroy without sending the request
     */
    async authenticatorsDuoDestroyRequestOpts(
        requestParameters: AuthenticatorsDuoDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsDuoDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/duo/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoDestroyRaw(
        requestParameters: AuthenticatorsDuoDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.authenticatorsDuoDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoDestroy(
        requestParameters: AuthenticatorsDuoDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsDuoDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsDuoList without sending the request
     */
    async authenticatorsDuoListRequestOpts(
        requestParameters: AuthenticatorsDuoListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/duo/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoListRaw(
        requestParameters: AuthenticatorsDuoListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedDuoDeviceList>> {
        const requestOptions = await this.authenticatorsDuoListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedDuoDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoList(
        requestParameters: AuthenticatorsDuoListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedDuoDeviceList> {
        const response = await this.authenticatorsDuoListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsDuoPartialUpdate without sending the request
     */
    async authenticatorsDuoPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsDuoPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsDuoPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/duo/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedDuoDeviceRequestToJSON(requestParameters["patchedDuoDeviceRequest"]),
        };
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoPartialUpdateRaw(
        requestParameters: AuthenticatorsDuoPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DuoDevice>> {
        const requestOptions =
            await this.authenticatorsDuoPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoPartialUpdate(
        requestParameters: AuthenticatorsDuoPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DuoDevice> {
        const response = await this.authenticatorsDuoPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsDuoRetrieve without sending the request
     */
    async authenticatorsDuoRetrieveRequestOpts(
        requestParameters: AuthenticatorsDuoRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsDuoRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/duo/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoRetrieveRaw(
        requestParameters: AuthenticatorsDuoRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DuoDevice>> {
        const requestOptions = await this.authenticatorsDuoRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoRetrieve(
        requestParameters: AuthenticatorsDuoRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DuoDevice> {
        const response = await this.authenticatorsDuoRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsDuoUpdate without sending the request
     */
    async authenticatorsDuoUpdateRequestOpts(
        requestParameters: AuthenticatorsDuoUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsDuoUpdate().',
            );
        }

        if (requestParameters["duoDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "duoDeviceRequest",
                'Required parameter "duoDeviceRequest" was null or undefined when calling authenticatorsDuoUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/duo/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: DuoDeviceRequestToJSON(requestParameters["duoDeviceRequest"]),
        };
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoUpdateRaw(
        requestParameters: AuthenticatorsDuoUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<DuoDevice>> {
        const requestOptions = await this.authenticatorsDuoUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for Duo authenticator devices
     */
    async authenticatorsDuoUpdate(
        requestParameters: AuthenticatorsDuoUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<DuoDevice> {
        const response = await this.authenticatorsDuoUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsDuoUsedByList without sending the request
     */
    async authenticatorsDuoUsedByListRequestOpts(
        requestParameters: AuthenticatorsDuoUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsDuoUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/duo/{id}/used_by/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsDuoUsedByListRaw(
        requestParameters: AuthenticatorsDuoUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.authenticatorsDuoUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsDuoUsedByList(
        requestParameters: AuthenticatorsDuoUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.authenticatorsDuoUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsEmailDestroy without sending the request
     */
    async authenticatorsEmailDestroyRequestOpts(
        requestParameters: AuthenticatorsEmailDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsEmailDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/email/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailDestroyRaw(
        requestParameters: AuthenticatorsEmailDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.authenticatorsEmailDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailDestroy(
        requestParameters: AuthenticatorsEmailDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsEmailDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsEmailList without sending the request
     */
    async authenticatorsEmailListRequestOpts(
        requestParameters: AuthenticatorsEmailListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/email/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailListRaw(
        requestParameters: AuthenticatorsEmailListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedEmailDeviceList>> {
        const requestOptions = await this.authenticatorsEmailListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedEmailDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailList(
        requestParameters: AuthenticatorsEmailListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedEmailDeviceList> {
        const response = await this.authenticatorsEmailListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsEmailPartialUpdate without sending the request
     */
    async authenticatorsEmailPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsEmailPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsEmailPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/email/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedEmailDeviceRequestToJSON(requestParameters["patchedEmailDeviceRequest"]),
        };
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailPartialUpdateRaw(
        requestParameters: AuthenticatorsEmailPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<EmailDevice>> {
        const requestOptions =
            await this.authenticatorsEmailPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailPartialUpdate(
        requestParameters: AuthenticatorsEmailPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<EmailDevice> {
        const response = await this.authenticatorsEmailPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsEmailRetrieve without sending the request
     */
    async authenticatorsEmailRetrieveRequestOpts(
        requestParameters: AuthenticatorsEmailRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsEmailRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/email/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailRetrieveRaw(
        requestParameters: AuthenticatorsEmailRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<EmailDevice>> {
        const requestOptions = await this.authenticatorsEmailRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailRetrieve(
        requestParameters: AuthenticatorsEmailRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<EmailDevice> {
        const response = await this.authenticatorsEmailRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsEmailUpdate without sending the request
     */
    async authenticatorsEmailUpdateRequestOpts(
        requestParameters: AuthenticatorsEmailUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsEmailUpdate().',
            );
        }

        if (requestParameters["emailDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "emailDeviceRequest",
                'Required parameter "emailDeviceRequest" was null or undefined when calling authenticatorsEmailUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/email/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: EmailDeviceRequestToJSON(requestParameters["emailDeviceRequest"]),
        };
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailUpdateRaw(
        requestParameters: AuthenticatorsEmailUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<EmailDevice>> {
        const requestOptions = await this.authenticatorsEmailUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for email authenticator devices
     */
    async authenticatorsEmailUpdate(
        requestParameters: AuthenticatorsEmailUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<EmailDevice> {
        const response = await this.authenticatorsEmailUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsEmailUsedByList without sending the request
     */
    async authenticatorsEmailUsedByListRequestOpts(
        requestParameters: AuthenticatorsEmailUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsEmailUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/email/{id}/used_by/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsEmailUsedByListRaw(
        requestParameters: AuthenticatorsEmailUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.authenticatorsEmailUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsEmailUsedByList(
        requestParameters: AuthenticatorsEmailUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.authenticatorsEmailUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsEndpointList without sending the request
     */
    async authenticatorsEndpointListRequestOpts(
        requestParameters: AuthenticatorsEndpointListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/endpoint/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Endpoint authenticator devices
     */
    async authenticatorsEndpointListRaw(
        requestParameters: AuthenticatorsEndpointListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedGoogleEndpointDeviceList>> {
        const requestOptions = await this.authenticatorsEndpointListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedGoogleEndpointDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for Endpoint authenticator devices
     */
    async authenticatorsEndpointList(
        requestParameters: AuthenticatorsEndpointListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedGoogleEndpointDeviceList> {
        const response = await this.authenticatorsEndpointListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsEndpointRetrieve without sending the request
     */
    async authenticatorsEndpointRetrieveRequestOpts(
        requestParameters: AuthenticatorsEndpointRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling authenticatorsEndpointRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/endpoint/{uuid}/`;
        urlPath = urlPath.replace(
            `{${"uuid"}}`,
            encodeURIComponent(String(requestParameters["uuid"])),
        );

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for Endpoint authenticator devices
     */
    async authenticatorsEndpointRetrieveRaw(
        requestParameters: AuthenticatorsEndpointRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleEndpointDevice>> {
        const requestOptions =
            await this.authenticatorsEndpointRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            GoogleEndpointDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for Endpoint authenticator devices
     */
    async authenticatorsEndpointRetrieve(
        requestParameters: AuthenticatorsEndpointRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleEndpointDevice> {
        const response = await this.authenticatorsEndpointRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsEndpointUsedByList without sending the request
     */
    async authenticatorsEndpointUsedByListRequestOpts(
        requestParameters: AuthenticatorsEndpointUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["uuid"] == null) {
            throw new runtime.RequiredError(
                "uuid",
                'Required parameter "uuid" was null or undefined when calling authenticatorsEndpointUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/endpoint/{uuid}/used_by/`;
        urlPath = urlPath.replace(
            `{${"uuid"}}`,
            encodeURIComponent(String(requestParameters["uuid"])),
        );

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsEndpointUsedByListRaw(
        requestParameters: AuthenticatorsEndpointUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.authenticatorsEndpointUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsEndpointUsedByList(
        requestParameters: AuthenticatorsEndpointUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.authenticatorsEndpointUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsSmsDestroy without sending the request
     */
    async authenticatorsSmsDestroyRequestOpts(
        requestParameters: AuthenticatorsSmsDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsSmsDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/sms/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsDestroyRaw(
        requestParameters: AuthenticatorsSmsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.authenticatorsSmsDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsDestroy(
        requestParameters: AuthenticatorsSmsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsSmsDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsSmsList without sending the request
     */
    async authenticatorsSmsListRequestOpts(
        requestParameters: AuthenticatorsSmsListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/sms/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsListRaw(
        requestParameters: AuthenticatorsSmsListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedSMSDeviceList>> {
        const requestOptions = await this.authenticatorsSmsListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedSMSDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsList(
        requestParameters: AuthenticatorsSmsListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedSMSDeviceList> {
        const response = await this.authenticatorsSmsListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsSmsPartialUpdate without sending the request
     */
    async authenticatorsSmsPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsSmsPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsSmsPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/sms/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedSMSDeviceRequestToJSON(requestParameters["patchedSMSDeviceRequest"]),
        };
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsPartialUpdateRaw(
        requestParameters: AuthenticatorsSmsPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SMSDevice>> {
        const requestOptions =
            await this.authenticatorsSmsPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsPartialUpdate(
        requestParameters: AuthenticatorsSmsPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SMSDevice> {
        const response = await this.authenticatorsSmsPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsSmsRetrieve without sending the request
     */
    async authenticatorsSmsRetrieveRequestOpts(
        requestParameters: AuthenticatorsSmsRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsSmsRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/sms/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsRetrieveRaw(
        requestParameters: AuthenticatorsSmsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SMSDevice>> {
        const requestOptions = await this.authenticatorsSmsRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsRetrieve(
        requestParameters: AuthenticatorsSmsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SMSDevice> {
        const response = await this.authenticatorsSmsRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsSmsUpdate without sending the request
     */
    async authenticatorsSmsUpdateRequestOpts(
        requestParameters: AuthenticatorsSmsUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsSmsUpdate().',
            );
        }

        if (requestParameters["sMSDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "sMSDeviceRequest",
                'Required parameter "sMSDeviceRequest" was null or undefined when calling authenticatorsSmsUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/sms/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: SMSDeviceRequestToJSON(requestParameters["sMSDeviceRequest"]),
        };
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsUpdateRaw(
        requestParameters: AuthenticatorsSmsUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SMSDevice>> {
        const requestOptions = await this.authenticatorsSmsUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for sms authenticator devices
     */
    async authenticatorsSmsUpdate(
        requestParameters: AuthenticatorsSmsUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SMSDevice> {
        const response = await this.authenticatorsSmsUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsSmsUsedByList without sending the request
     */
    async authenticatorsSmsUsedByListRequestOpts(
        requestParameters: AuthenticatorsSmsUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsSmsUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/sms/{id}/used_by/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsSmsUsedByListRaw(
        requestParameters: AuthenticatorsSmsUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.authenticatorsSmsUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsSmsUsedByList(
        requestParameters: AuthenticatorsSmsUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.authenticatorsSmsUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsStaticDestroy without sending the request
     */
    async authenticatorsStaticDestroyRequestOpts(
        requestParameters: AuthenticatorsStaticDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsStaticDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/static/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticDestroyRaw(
        requestParameters: AuthenticatorsStaticDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.authenticatorsStaticDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticDestroy(
        requestParameters: AuthenticatorsStaticDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsStaticDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsStaticList without sending the request
     */
    async authenticatorsStaticListRequestOpts(
        requestParameters: AuthenticatorsStaticListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/static/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticListRaw(
        requestParameters: AuthenticatorsStaticListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedStaticDeviceList>> {
        const requestOptions = await this.authenticatorsStaticListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedStaticDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticList(
        requestParameters: AuthenticatorsStaticListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedStaticDeviceList> {
        const response = await this.authenticatorsStaticListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsStaticPartialUpdate without sending the request
     */
    async authenticatorsStaticPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsStaticPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsStaticPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/static/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedStaticDeviceRequestToJSON(requestParameters["patchedStaticDeviceRequest"]),
        };
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticPartialUpdateRaw(
        requestParameters: AuthenticatorsStaticPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<StaticDevice>> {
        const requestOptions =
            await this.authenticatorsStaticPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            StaticDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticPartialUpdate(
        requestParameters: AuthenticatorsStaticPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<StaticDevice> {
        const response = await this.authenticatorsStaticPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsStaticRetrieve without sending the request
     */
    async authenticatorsStaticRetrieveRequestOpts(
        requestParameters: AuthenticatorsStaticRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsStaticRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/static/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticRetrieveRaw(
        requestParameters: AuthenticatorsStaticRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<StaticDevice>> {
        const requestOptions =
            await this.authenticatorsStaticRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            StaticDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticRetrieve(
        requestParameters: AuthenticatorsStaticRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<StaticDevice> {
        const response = await this.authenticatorsStaticRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsStaticUpdate without sending the request
     */
    async authenticatorsStaticUpdateRequestOpts(
        requestParameters: AuthenticatorsStaticUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsStaticUpdate().',
            );
        }

        if (requestParameters["staticDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "staticDeviceRequest",
                'Required parameter "staticDeviceRequest" was null or undefined when calling authenticatorsStaticUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/static/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: StaticDeviceRequestToJSON(requestParameters["staticDeviceRequest"]),
        };
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticUpdateRaw(
        requestParameters: AuthenticatorsStaticUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<StaticDevice>> {
        const requestOptions = await this.authenticatorsStaticUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            StaticDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for static authenticator devices
     */
    async authenticatorsStaticUpdate(
        requestParameters: AuthenticatorsStaticUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<StaticDevice> {
        const response = await this.authenticatorsStaticUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsStaticUsedByList without sending the request
     */
    async authenticatorsStaticUsedByListRequestOpts(
        requestParameters: AuthenticatorsStaticUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsStaticUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/static/{id}/used_by/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsStaticUsedByListRaw(
        requestParameters: AuthenticatorsStaticUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.authenticatorsStaticUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsStaticUsedByList(
        requestParameters: AuthenticatorsStaticUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.authenticatorsStaticUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsTotpDestroy without sending the request
     */
    async authenticatorsTotpDestroyRequestOpts(
        requestParameters: AuthenticatorsTotpDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsTotpDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/totp/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpDestroyRaw(
        requestParameters: AuthenticatorsTotpDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.authenticatorsTotpDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpDestroy(
        requestParameters: AuthenticatorsTotpDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsTotpDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsTotpList without sending the request
     */
    async authenticatorsTotpListRequestOpts(
        requestParameters: AuthenticatorsTotpListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/totp/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpListRaw(
        requestParameters: AuthenticatorsTotpListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedTOTPDeviceList>> {
        const requestOptions = await this.authenticatorsTotpListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedTOTPDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpList(
        requestParameters: AuthenticatorsTotpListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedTOTPDeviceList> {
        const response = await this.authenticatorsTotpListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsTotpPartialUpdate without sending the request
     */
    async authenticatorsTotpPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsTotpPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsTotpPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/totp/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedTOTPDeviceRequestToJSON(requestParameters["patchedTOTPDeviceRequest"]),
        };
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpPartialUpdateRaw(
        requestParameters: AuthenticatorsTotpPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<TOTPDevice>> {
        const requestOptions =
            await this.authenticatorsTotpPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpPartialUpdate(
        requestParameters: AuthenticatorsTotpPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<TOTPDevice> {
        const response = await this.authenticatorsTotpPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsTotpRetrieve without sending the request
     */
    async authenticatorsTotpRetrieveRequestOpts(
        requestParameters: AuthenticatorsTotpRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsTotpRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/totp/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpRetrieveRaw(
        requestParameters: AuthenticatorsTotpRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<TOTPDevice>> {
        const requestOptions = await this.authenticatorsTotpRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpRetrieve(
        requestParameters: AuthenticatorsTotpRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<TOTPDevice> {
        const response = await this.authenticatorsTotpRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsTotpUpdate without sending the request
     */
    async authenticatorsTotpUpdateRequestOpts(
        requestParameters: AuthenticatorsTotpUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsTotpUpdate().',
            );
        }

        if (requestParameters["tOTPDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "tOTPDeviceRequest",
                'Required parameter "tOTPDeviceRequest" was null or undefined when calling authenticatorsTotpUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/totp/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: TOTPDeviceRequestToJSON(requestParameters["tOTPDeviceRequest"]),
        };
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpUpdateRaw(
        requestParameters: AuthenticatorsTotpUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<TOTPDevice>> {
        const requestOptions = await this.authenticatorsTotpUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue));
    }

    /**
     * Viewset for totp authenticator devices
     */
    async authenticatorsTotpUpdate(
        requestParameters: AuthenticatorsTotpUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<TOTPDevice> {
        const response = await this.authenticatorsTotpUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsTotpUsedByList without sending the request
     */
    async authenticatorsTotpUsedByListRequestOpts(
        requestParameters: AuthenticatorsTotpUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsTotpUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/totp/{id}/used_by/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsTotpUsedByListRaw(
        requestParameters: AuthenticatorsTotpUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.authenticatorsTotpUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsTotpUsedByList(
        requestParameters: AuthenticatorsTotpUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.authenticatorsTotpUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsWebauthnDestroy without sending the request
     */
    async authenticatorsWebauthnDestroyRequestOpts(
        requestParameters: AuthenticatorsWebauthnDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsWebauthnDestroy().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/webauthn/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "DELETE",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnDestroyRaw(
        requestParameters: AuthenticatorsWebauthnDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.authenticatorsWebauthnDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnDestroy(
        requestParameters: AuthenticatorsWebauthnDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.authenticatorsWebauthnDestroyRaw(requestParameters, initOverrides);
    }

    /**
     * Creates request options for authenticatorsWebauthnList without sending the request
     */
    async authenticatorsWebauthnListRequestOpts(
        requestParameters: AuthenticatorsWebauthnListRequest,
    ): Promise<runtime.RequestOpts> {
        const queryParameters: any = {};

        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: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/webauthn/`;

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnListRaw(
        requestParameters: AuthenticatorsWebauthnListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedWebAuthnDeviceList>> {
        const requestOptions = await this.authenticatorsWebauthnListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            PaginatedWebAuthnDeviceListFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnList(
        requestParameters: AuthenticatorsWebauthnListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedWebAuthnDeviceList> {
        const response = await this.authenticatorsWebauthnListRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsWebauthnPartialUpdate without sending the request
     */
    async authenticatorsWebauthnPartialUpdateRequestOpts(
        requestParameters: AuthenticatorsWebauthnPartialUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsWebauthnPartialUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/webauthn/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PATCH",
            headers: headerParameters,
            query: queryParameters,
            body: PatchedWebAuthnDeviceRequestToJSON(
                requestParameters["patchedWebAuthnDeviceRequest"],
            ),
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnPartialUpdateRaw(
        requestParameters: AuthenticatorsWebauthnPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WebAuthnDevice>> {
        const requestOptions =
            await this.authenticatorsWebauthnPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            WebAuthnDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnPartialUpdate(
        requestParameters: AuthenticatorsWebauthnPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WebAuthnDevice> {
        const response = await this.authenticatorsWebauthnPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsWebauthnRetrieve without sending the request
     */
    async authenticatorsWebauthnRetrieveRequestOpts(
        requestParameters: AuthenticatorsWebauthnRetrieveRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsWebauthnRetrieve().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/webauthn/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnRetrieveRaw(
        requestParameters: AuthenticatorsWebauthnRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WebAuthnDevice>> {
        const requestOptions =
            await this.authenticatorsWebauthnRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            WebAuthnDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnRetrieve(
        requestParameters: AuthenticatorsWebauthnRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WebAuthnDevice> {
        const response = await this.authenticatorsWebauthnRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsWebauthnUpdate without sending the request
     */
    async authenticatorsWebauthnUpdateRequestOpts(
        requestParameters: AuthenticatorsWebauthnUpdateRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsWebauthnUpdate().',
            );
        }

        if (requestParameters["webAuthnDeviceRequest"] == null) {
            throw new runtime.RequiredError(
                "webAuthnDeviceRequest",
                'Required parameter "webAuthnDeviceRequest" was null or undefined when calling authenticatorsWebauthnUpdate().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        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 = `/authenticators/webauthn/{id}/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "PUT",
            headers: headerParameters,
            query: queryParameters,
            body: WebAuthnDeviceRequestToJSON(requestParameters["webAuthnDeviceRequest"]),
        };
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnUpdateRaw(
        requestParameters: AuthenticatorsWebauthnUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WebAuthnDevice>> {
        const requestOptions =
            await this.authenticatorsWebauthnUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) =>
            WebAuthnDeviceFromJSON(jsonValue),
        );
    }

    /**
     * Viewset for WebAuthn authenticator devices
     */
    async authenticatorsWebauthnUpdate(
        requestParameters: AuthenticatorsWebauthnUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WebAuthnDevice> {
        const response = await this.authenticatorsWebauthnUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

    /**
     * Creates request options for authenticatorsWebauthnUsedByList without sending the request
     */
    async authenticatorsWebauthnUsedByListRequestOpts(
        requestParameters: AuthenticatorsWebauthnUsedByListRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling authenticatorsWebauthnUsedByList().',
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("authentik", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/authenticators/webauthn/{id}/used_by/`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));

        return {
            path: urlPath,
            method: "GET",
            headers: headerParameters,
            query: queryParameters,
        };
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsWebauthnUsedByListRaw(
        requestParameters: AuthenticatorsWebauthnUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.authenticatorsWebauthnUsedByListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
    }

    /**
     * Get a list of all objects that use this object
     */
    async authenticatorsWebauthnUsedByList(
        requestParameters: AuthenticatorsWebauthnUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.authenticatorsWebauthnUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }
}
