/* 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 {
    ClientTypeEnum,
    DigestAlgorithmEnum,
    ForceBindingEnum,
    GoogleWorkspaceProvider,
    GoogleWorkspaceProviderGroup,
    GoogleWorkspaceProviderGroupRequest,
    GoogleWorkspaceProviderRequest,
    GoogleWorkspaceProviderUser,
    GoogleWorkspaceProviderUserRequest,
    IssuerModeEnum,
    LDAPProvider,
    LDAPProviderRequest,
    MicrosoftEntraProvider,
    MicrosoftEntraProviderGroup,
    MicrosoftEntraProviderGroupRequest,
    MicrosoftEntraProviderRequest,
    MicrosoftEntraProviderUser,
    MicrosoftEntraProviderUserRequest,
    OAuth2Provider,
    OAuth2ProviderRequest,
    OAuth2ProviderSetupURLs,
    PaginatedGoogleWorkspaceProviderGroupList,
    PaginatedGoogleWorkspaceProviderList,
    PaginatedGoogleWorkspaceProviderUserList,
    PaginatedLDAPProviderList,
    PaginatedMicrosoftEntraProviderGroupList,
    PaginatedMicrosoftEntraProviderList,
    PaginatedMicrosoftEntraProviderUserList,
    PaginatedOAuth2ProviderList,
    PaginatedProviderList,
    PaginatedProxyProviderList,
    PaginatedRACProviderList,
    PaginatedRadiusProviderList,
    PaginatedSAMLProviderList,
    PaginatedSCIMProviderGroupList,
    PaginatedSCIMProviderList,
    PaginatedSCIMProviderUserList,
    PaginatedSSFProviderList,
    PaginatedWSFederationProviderList,
    PatchedGoogleWorkspaceProviderRequest,
    PatchedLDAPProviderRequest,
    PatchedMicrosoftEntraProviderRequest,
    PatchedOAuth2ProviderRequest,
    PatchedProxyProviderRequest,
    PatchedRACProviderRequest,
    PatchedRadiusProviderRequest,
    PatchedSAMLProviderRequest,
    PatchedSCIMProviderRequest,
    PatchedSSFProviderRequest,
    PatchedWSFederationProviderRequest,
    PropertyMappingPreview,
    Provider,
    ProxyProvider,
    ProxyProviderRequest,
    RACProvider,
    RACProviderRequest,
    RadiusProvider,
    RadiusProviderRequest,
    SAMLBindingsEnum,
    SAMLLogoutMethods,
    SAMLMetadata,
    SAMLNameIDPolicyEnum,
    SAMLProvider,
    SAMLProviderRequest,
    SCIMProvider,
    SCIMProviderGroup,
    SCIMProviderGroupRequest,
    SCIMProviderRequest,
    SCIMProviderUser,
    SCIMProviderUserRequest,
    SignatureAlgorithmEnum,
    SSFProvider,
    SSFProviderRequest,
    SubModeEnum,
    SyncObjectRequest,
    SyncObjectResult,
    SyncStatus,
    TypeCreate,
    UsedBy,
    WSFederationProvider,
    WSFederationProviderRequest,
} from "../models/index";
import {
    GoogleWorkspaceProviderFromJSON,
    GoogleWorkspaceProviderGroupFromJSON,
    GoogleWorkspaceProviderGroupRequestToJSON,
    GoogleWorkspaceProviderRequestToJSON,
    GoogleWorkspaceProviderUserFromJSON,
    GoogleWorkspaceProviderUserRequestToJSON,
    LDAPProviderFromJSON,
    LDAPProviderRequestToJSON,
    MicrosoftEntraProviderFromJSON,
    MicrosoftEntraProviderGroupFromJSON,
    MicrosoftEntraProviderGroupRequestToJSON,
    MicrosoftEntraProviderRequestToJSON,
    MicrosoftEntraProviderUserFromJSON,
    MicrosoftEntraProviderUserRequestToJSON,
    OAuth2ProviderFromJSON,
    OAuth2ProviderRequestToJSON,
    OAuth2ProviderSetupURLsFromJSON,
    PaginatedGoogleWorkspaceProviderGroupListFromJSON,
    PaginatedGoogleWorkspaceProviderListFromJSON,
    PaginatedGoogleWorkspaceProviderUserListFromJSON,
    PaginatedLDAPProviderListFromJSON,
    PaginatedMicrosoftEntraProviderGroupListFromJSON,
    PaginatedMicrosoftEntraProviderListFromJSON,
    PaginatedMicrosoftEntraProviderUserListFromJSON,
    PaginatedOAuth2ProviderListFromJSON,
    PaginatedProviderListFromJSON,
    PaginatedProxyProviderListFromJSON,
    PaginatedRACProviderListFromJSON,
    PaginatedRadiusProviderListFromJSON,
    PaginatedSAMLProviderListFromJSON,
    PaginatedSCIMProviderGroupListFromJSON,
    PaginatedSCIMProviderListFromJSON,
    PaginatedSCIMProviderUserListFromJSON,
    PaginatedSSFProviderListFromJSON,
    PaginatedWSFederationProviderListFromJSON,
    PatchedGoogleWorkspaceProviderRequestToJSON,
    PatchedLDAPProviderRequestToJSON,
    PatchedMicrosoftEntraProviderRequestToJSON,
    PatchedOAuth2ProviderRequestToJSON,
    PatchedProxyProviderRequestToJSON,
    PatchedRACProviderRequestToJSON,
    PatchedRadiusProviderRequestToJSON,
    PatchedSAMLProviderRequestToJSON,
    PatchedSCIMProviderRequestToJSON,
    PatchedSSFProviderRequestToJSON,
    PatchedWSFederationProviderRequestToJSON,
    PropertyMappingPreviewFromJSON,
    ProviderFromJSON,
    ProxyProviderFromJSON,
    ProxyProviderRequestToJSON,
    RACProviderFromJSON,
    RACProviderRequestToJSON,
    RadiusProviderFromJSON,
    RadiusProviderRequestToJSON,
    SAMLMetadataFromJSON,
    SAMLProviderFromJSON,
    SAMLProviderRequestToJSON,
    SCIMProviderFromJSON,
    SCIMProviderGroupFromJSON,
    SCIMProviderGroupRequestToJSON,
    SCIMProviderRequestToJSON,
    SCIMProviderUserFromJSON,
    SCIMProviderUserRequestToJSON,
    SSFProviderFromJSON,
    SSFProviderRequestToJSON,
    SyncObjectRequestToJSON,
    SyncObjectResultFromJSON,
    SyncStatusFromJSON,
    TypeCreateFromJSON,
    UsedByFromJSON,
    WSFederationProviderFromJSON,
    WSFederationProviderRequestToJSON,
} from "../models/index";
import * as runtime from "../runtime";

export interface ProvidersAllDestroyRequest {
    id: number;
}

export interface ProvidersAllListRequest {
    applicationIsnull?: boolean;
    backchannel?: boolean;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface ProvidersAllRetrieveRequest {
    id: number;
}

export interface ProvidersAllUsedByListRequest {
    id: number;
}

export interface ProvidersGoogleWorkspaceCreateRequest {
    googleWorkspaceProviderRequest: GoogleWorkspaceProviderRequest;
}

export interface ProvidersGoogleWorkspaceDestroyRequest {
    id: number;
}

export interface ProvidersGoogleWorkspaceGroupsCreateRequest {
    googleWorkspaceProviderGroupRequest: GoogleWorkspaceProviderGroupRequest;
}

export interface ProvidersGoogleWorkspaceGroupsDestroyRequest {
    id: string;
}

export interface ProvidersGoogleWorkspaceGroupsListRequest {
    groupGroupUuid?: string;
    groupName?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    providerId?: number;
    search?: string;
}

export interface ProvidersGoogleWorkspaceGroupsRetrieveRequest {
    id: string;
}

export interface ProvidersGoogleWorkspaceGroupsUsedByListRequest {
    id: string;
}

export interface ProvidersGoogleWorkspaceListRequest {
    delegatedSubject?: string;
    excludeUsersServiceAccount?: boolean;
    filterGroup?: string;
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface ProvidersGoogleWorkspacePartialUpdateRequest {
    id: number;
    patchedGoogleWorkspaceProviderRequest?: PatchedGoogleWorkspaceProviderRequest;
}

export interface ProvidersGoogleWorkspaceRetrieveRequest {
    id: number;
}

export interface ProvidersGoogleWorkspaceSyncObjectCreateRequest {
    id: number;
    syncObjectRequest: SyncObjectRequest;
}

export interface ProvidersGoogleWorkspaceSyncStatusRetrieveRequest {
    id: number;
}

export interface ProvidersGoogleWorkspaceUpdateRequest {
    id: number;
    googleWorkspaceProviderRequest: GoogleWorkspaceProviderRequest;
}

export interface ProvidersGoogleWorkspaceUsedByListRequest {
    id: number;
}

export interface ProvidersGoogleWorkspaceUsersCreateRequest {
    googleWorkspaceProviderUserRequest: GoogleWorkspaceProviderUserRequest;
}

export interface ProvidersGoogleWorkspaceUsersDestroyRequest {
    id: string;
}

export interface ProvidersGoogleWorkspaceUsersListRequest {
    ordering?: string;
    page?: number;
    pageSize?: number;
    providerId?: number;
    search?: string;
    userId?: number;
    userUsername?: string;
}

export interface ProvidersGoogleWorkspaceUsersRetrieveRequest {
    id: string;
}

export interface ProvidersGoogleWorkspaceUsersUsedByListRequest {
    id: string;
}

export interface ProvidersLdapCreateRequest {
    lDAPProviderRequest: LDAPProviderRequest;
}

export interface ProvidersLdapDestroyRequest {
    id: number;
}

export interface ProvidersLdapListRequest {
    applicationIsnull?: boolean;
    authorizationFlowSlugIexact?: string;
    baseDnIexact?: string;
    certificateKpUuidIexact?: string;
    certificateNameIexact?: string;
    gidStartNumberIexact?: number;
    nameIexact?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
    tlsServerNameIexact?: string;
    uidStartNumberIexact?: number;
}

export interface ProvidersLdapPartialUpdateRequest {
    id: number;
    patchedLDAPProviderRequest?: PatchedLDAPProviderRequest;
}

export interface ProvidersLdapRetrieveRequest {
    id: number;
}

export interface ProvidersLdapUpdateRequest {
    id: number;
    lDAPProviderRequest: LDAPProviderRequest;
}

export interface ProvidersLdapUsedByListRequest {
    id: number;
}

export interface ProvidersMicrosoftEntraCreateRequest {
    microsoftEntraProviderRequest: MicrosoftEntraProviderRequest;
}

export interface ProvidersMicrosoftEntraDestroyRequest {
    id: number;
}

export interface ProvidersMicrosoftEntraGroupsCreateRequest {
    microsoftEntraProviderGroupRequest: MicrosoftEntraProviderGroupRequest;
}

export interface ProvidersMicrosoftEntraGroupsDestroyRequest {
    id: string;
}

export interface ProvidersMicrosoftEntraGroupsListRequest {
    groupGroupUuid?: string;
    groupName?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    providerId?: number;
    search?: string;
}

export interface ProvidersMicrosoftEntraGroupsRetrieveRequest {
    id: string;
}

export interface ProvidersMicrosoftEntraGroupsUsedByListRequest {
    id: string;
}

export interface ProvidersMicrosoftEntraListRequest {
    excludeUsersServiceAccount?: boolean;
    filterGroup?: string;
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface ProvidersMicrosoftEntraPartialUpdateRequest {
    id: number;
    patchedMicrosoftEntraProviderRequest?: PatchedMicrosoftEntraProviderRequest;
}

export interface ProvidersMicrosoftEntraRetrieveRequest {
    id: number;
}

export interface ProvidersMicrosoftEntraSyncObjectCreateRequest {
    id: number;
    syncObjectRequest: SyncObjectRequest;
}

export interface ProvidersMicrosoftEntraSyncStatusRetrieveRequest {
    id: number;
}

export interface ProvidersMicrosoftEntraUpdateRequest {
    id: number;
    microsoftEntraProviderRequest: MicrosoftEntraProviderRequest;
}

export interface ProvidersMicrosoftEntraUsedByListRequest {
    id: number;
}

export interface ProvidersMicrosoftEntraUsersCreateRequest {
    microsoftEntraProviderUserRequest: MicrosoftEntraProviderUserRequest;
}

export interface ProvidersMicrosoftEntraUsersDestroyRequest {
    id: string;
}

export interface ProvidersMicrosoftEntraUsersListRequest {
    ordering?: string;
    page?: number;
    pageSize?: number;
    providerId?: number;
    search?: string;
    userId?: number;
    userUsername?: string;
}

export interface ProvidersMicrosoftEntraUsersRetrieveRequest {
    id: string;
}

export interface ProvidersMicrosoftEntraUsersUsedByListRequest {
    id: string;
}

export interface ProvidersOauth2CreateRequest {
    oAuth2ProviderRequest: OAuth2ProviderRequest;
}

export interface ProvidersOauth2DestroyRequest {
    id: number;
}

export interface ProvidersOauth2ListRequest {
    accessCodeValidity?: string;
    accessTokenValidity?: string;
    application?: string;
    authorizationFlow?: string;
    clientId?: string;
    clientType?: ClientTypeEnum;
    includeClaimsInIdToken?: boolean;
    issuerMode?: IssuerModeEnum;
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    propertyMappings?: Array<string>;
    refreshTokenValidity?: string;
    search?: string;
    signingKey?: string;
    subMode?: SubModeEnum;
}

export interface ProvidersOauth2PartialUpdateRequest {
    id: number;
    patchedOAuth2ProviderRequest?: PatchedOAuth2ProviderRequest;
}

export interface ProvidersOauth2PreviewUserRetrieveRequest {
    id: number;
    forUser?: number;
}

export interface ProvidersOauth2RetrieveRequest {
    id: number;
}

export interface ProvidersOauth2SetupUrlsRetrieveRequest {
    id: number;
}

export interface ProvidersOauth2UpdateRequest {
    id: number;
    oAuth2ProviderRequest: OAuth2ProviderRequest;
}

export interface ProvidersOauth2UsedByListRequest {
    id: number;
}

export interface ProvidersProxyCreateRequest {
    proxyProviderRequest: ProxyProviderRequest;
}

export interface ProvidersProxyDestroyRequest {
    id: number;
}

export interface ProvidersProxyListRequest {
    applicationIsnull?: boolean;
    authorizationFlowSlugIexact?: string;
    basicAuthEnabledIexact?: boolean;
    basicAuthPasswordAttributeIexact?: string;
    basicAuthUserAttributeIexact?: string;
    certificateKpUuidIexact?: string;
    certificateNameIexact?: string;
    cookieDomainIexact?: string;
    externalHostIexact?: string;
    internalHostIexact?: string;
    internalHostSslValidationIexact?: boolean;
    modeIexact?: string;
    nameIexact?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    propertyMappingsIexact?: Array<string>;
    search?: string;
    skipPathRegexIexact?: string;
}

export interface ProvidersProxyPartialUpdateRequest {
    id: number;
    patchedProxyProviderRequest?: PatchedProxyProviderRequest;
}

export interface ProvidersProxyRetrieveRequest {
    id: number;
}

export interface ProvidersProxyUpdateRequest {
    id: number;
    proxyProviderRequest: ProxyProviderRequest;
}

export interface ProvidersProxyUsedByListRequest {
    id: number;
}

export interface ProvidersRacCreateRequest {
    rACProviderRequest: RACProviderRequest;
}

export interface ProvidersRacDestroyRequest {
    id: number;
}

export interface ProvidersRacListRequest {
    applicationIsnull?: boolean;
    nameIexact?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface ProvidersRacPartialUpdateRequest {
    id: number;
    patchedRACProviderRequest?: PatchedRACProviderRequest;
}

export interface ProvidersRacRetrieveRequest {
    id: number;
}

export interface ProvidersRacUpdateRequest {
    id: number;
    rACProviderRequest: RACProviderRequest;
}

export interface ProvidersRacUsedByListRequest {
    id: number;
}

export interface ProvidersRadiusCreateRequest {
    radiusProviderRequest: RadiusProviderRequest;
}

export interface ProvidersRadiusDestroyRequest {
    id: number;
}

export interface ProvidersRadiusListRequest {
    applicationIsnull?: boolean;
    authorizationFlowSlugIexact?: string;
    clientNetworksIexact?: string;
    nameIexact?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface ProvidersRadiusPartialUpdateRequest {
    id: number;
    patchedRadiusProviderRequest?: PatchedRadiusProviderRequest;
}

export interface ProvidersRadiusRetrieveRequest {
    id: number;
}

export interface ProvidersRadiusUpdateRequest {
    id: number;
    radiusProviderRequest: RadiusProviderRequest;
}

export interface ProvidersRadiusUsedByListRequest {
    id: number;
}

export interface ProvidersSamlCreateRequest {
    sAMLProviderRequest: SAMLProviderRequest;
}

export interface ProvidersSamlDestroyRequest {
    id: number;
}

export interface ProvidersSamlImportMetadataCreateRequest {
    name: string;
    authorizationFlow: string;
    invalidationFlow: string;
    file: Blob;
}

export interface ProvidersSamlListRequest {
    acsUrl?: string;
    assertionValidNotBefore?: string;
    assertionValidNotOnOrAfter?: string;
    audience?: string;
    authenticationFlow?: string;
    authnContextClassRefMapping?: string;
    authorizationFlow?: string;
    backchannelApplication?: string;
    defaultNameIdPolicy?: SAMLNameIDPolicyEnum;
    defaultRelayState?: string;
    digestAlgorithm?: DigestAlgorithmEnum;
    encryptionKp?: string;
    invalidationFlow?: string;
    isBackchannel?: boolean;
    issuer?: string;
    logoutMethod?: SAMLLogoutMethods;
    name?: string;
    nameIdMapping?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    propertyMappings?: Array<string>;
    search?: string;
    sessionValidNotOnOrAfter?: string;
    signAssertion?: boolean;
    signLogoutRequest?: boolean;
    signLogoutResponse?: boolean;
    signResponse?: boolean;
    signatureAlgorithm?: SignatureAlgorithmEnum;
    signingKp?: string;
    slsBinding?: SAMLBindingsEnum;
    slsUrl?: string;
    spBinding?: SAMLBindingsEnum;
    verificationKp?: string;
}

export interface ProvidersSamlMetadataRetrieveRequest {
    id: number;
    download?: boolean;
    forceBinding?: ForceBindingEnum;
}

export interface ProvidersSamlPartialUpdateRequest {
    id: number;
    patchedSAMLProviderRequest?: PatchedSAMLProviderRequest;
}

export interface ProvidersSamlPreviewUserRetrieveRequest {
    id: number;
    forUser?: number;
}

export interface ProvidersSamlRetrieveRequest {
    id: number;
}

export interface ProvidersSamlUpdateRequest {
    id: number;
    sAMLProviderRequest: SAMLProviderRequest;
}

export interface ProvidersSamlUsedByListRequest {
    id: number;
}

export interface ProvidersScimCreateRequest {
    sCIMProviderRequest: SCIMProviderRequest;
}

export interface ProvidersScimDestroyRequest {
    id: number;
}

export interface ProvidersScimGroupsCreateRequest {
    sCIMProviderGroupRequest: SCIMProviderGroupRequest;
}

export interface ProvidersScimGroupsDestroyRequest {
    id: string;
}

export interface ProvidersScimGroupsListRequest {
    groupGroupUuid?: string;
    groupName?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    providerId?: number;
    search?: string;
}

export interface ProvidersScimGroupsRetrieveRequest {
    id: string;
}

export interface ProvidersScimGroupsUsedByListRequest {
    id: string;
}

export interface ProvidersScimListRequest {
    excludeUsersServiceAccount?: boolean;
    groupFilters?: Array<string>;
    name?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
    url?: string;
}

export interface ProvidersScimPartialUpdateRequest {
    id: number;
    patchedSCIMProviderRequest?: PatchedSCIMProviderRequest;
}

export interface ProvidersScimRetrieveRequest {
    id: number;
}

export interface ProvidersScimSyncObjectCreateRequest {
    id: number;
    syncObjectRequest: SyncObjectRequest;
}

export interface ProvidersScimSyncStatusRetrieveRequest {
    id: number;
}

export interface ProvidersScimUpdateRequest {
    id: number;
    sCIMProviderRequest: SCIMProviderRequest;
}

export interface ProvidersScimUsedByListRequest {
    id: number;
}

export interface ProvidersScimUsersCreateRequest {
    sCIMProviderUserRequest: SCIMProviderUserRequest;
}

export interface ProvidersScimUsersDestroyRequest {
    id: string;
}

export interface ProvidersScimUsersListRequest {
    ordering?: string;
    page?: number;
    pageSize?: number;
    providerId?: number;
    search?: string;
    userId?: number;
    userUsername?: string;
}

export interface ProvidersScimUsersRetrieveRequest {
    id: string;
}

export interface ProvidersScimUsersUsedByListRequest {
    id: string;
}

export interface ProvidersSsfCreateRequest {
    sSFProviderRequest: SSFProviderRequest;
}

export interface ProvidersSsfDestroyRequest {
    id: number;
}

export interface ProvidersSsfListRequest {
    applicationIsnull?: boolean;
    nameIexact?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    search?: string;
}

export interface ProvidersSsfPartialUpdateRequest {
    id: number;
    patchedSSFProviderRequest?: PatchedSSFProviderRequest;
}

export interface ProvidersSsfRetrieveRequest {
    id: number;
}

export interface ProvidersSsfUpdateRequest {
    id: number;
    sSFProviderRequest: SSFProviderRequest;
}

export interface ProvidersSsfUsedByListRequest {
    id: number;
}

export interface ProvidersWsfedCreateRequest {
    wSFederationProviderRequest: WSFederationProviderRequest;
}

export interface ProvidersWsfedDestroyRequest {
    id: number;
}

export interface ProvidersWsfedListRequest {
    acsUrl?: string;
    assertionValidNotBefore?: string;
    assertionValidNotOnOrAfter?: string;
    audience?: string;
    authenticationFlow?: string;
    authnContextClassRefMapping?: string;
    authorizationFlow?: string;
    backchannelApplication?: string;
    defaultNameIdPolicy?: SAMLNameIDPolicyEnum;
    defaultRelayState?: string;
    digestAlgorithm?: DigestAlgorithmEnum;
    encryptionKp?: string;
    invalidationFlow?: string;
    isBackchannel?: boolean;
    issuer?: string;
    logoutMethod?: SAMLLogoutMethods;
    name?: string;
    nameIdMapping?: string;
    ordering?: string;
    page?: number;
    pageSize?: number;
    propertyMappings?: Array<string>;
    search?: string;
    sessionValidNotOnOrAfter?: string;
    signAssertion?: boolean;
    signLogoutRequest?: boolean;
    signLogoutResponse?: boolean;
    signResponse?: boolean;
    signatureAlgorithm?: SignatureAlgorithmEnum;
    signingKp?: string;
    slsBinding?: SAMLBindingsEnum;
    slsUrl?: string;
    spBinding?: SAMLBindingsEnum;
    verificationKp?: string;
}

export interface ProvidersWsfedMetadataRetrieveRequest {
    id: number;
    download?: boolean;
    forceBinding?: ForceBindingEnum;
}

export interface ProvidersWsfedPartialUpdateRequest {
    id: number;
    patchedWSFederationProviderRequest?: PatchedWSFederationProviderRequest;
}

export interface ProvidersWsfedPreviewUserRetrieveRequest {
    id: number;
    forUser?: number;
}

export interface ProvidersWsfedRetrieveRequest {
    id: number;
}

export interface ProvidersWsfedUpdateRequest {
    id: number;
    wSFederationProviderRequest: WSFederationProviderRequest;
}

export interface ProvidersWsfedUsedByListRequest {
    id: number;
}

/**
 *
 */
export class ProvidersApi extends runtime.BaseAPI {
    /**
     * Creates request options for providersAllDestroy without sending the request
     */
    async providersAllDestroyRequestOpts(
        requestParameters: ProvidersAllDestroyRequest,
    ): Promise<runtime.RequestOpts> {
        if (requestParameters["id"] == null) {
            throw new runtime.RequiredError(
                "id",
                'Required parameter "id" was null or undefined when calling providersAllDestroy().',
            );
        }

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

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

    /**
     * Provider Viewset
     */
    async providersAllDestroyRaw(
        requestParameters: ProvidersAllDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersAllDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Provider Viewset
     */
    async providersAllDestroy(
        requestParameters: ProvidersAllDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersAllDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

        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 = `/providers/all/`;

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

    /**
     * Provider Viewset
     */
    async providersAllListRaw(
        requestParameters: ProvidersAllListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedProviderList>> {
        const requestOptions = await this.providersAllListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Provider Viewset
     */
    async providersAllList(
        requestParameters: ProvidersAllListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedProviderList> {
        const response = await this.providersAllListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * Provider Viewset
     */
    async providersAllRetrieveRaw(
        requestParameters: ProvidersAllRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Provider>> {
        const requestOptions = await this.providersAllRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Provider Viewset
     */
    async providersAllRetrieve(
        requestParameters: ProvidersAllRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Provider> {
        const response = await this.providersAllRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     * Creates request options for providersAllTypesList without sending the request
     */
    async providersAllTypesListRequestOpts(): 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 = `/providers/all/types/`;

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

    /**
     * Get all creatable types
     */
    async providersAllTypesListRaw(
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<TypeCreate>>> {
        const requestOptions = await this.providersAllTypesListRequestOpts();
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Get all creatable types
     */
    async providersAllTypesList(
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<TypeCreate>> {
        const response = await this.providersAllTypesListRaw(initOverrides);
        return await response.value();
    }

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

        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 = `/providers/all/{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 providersAllUsedByListRaw(
        requestParameters: ProvidersAllUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersAllUsedByListRequestOpts(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 providersAllUsedByList(
        requestParameters: ProvidersAllUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersAllUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/google_workspace/`;

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceCreateRaw(
        requestParameters: ProvidersGoogleWorkspaceCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleWorkspaceProvider>> {
        const requestOptions =
            await this.providersGoogleWorkspaceCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceCreate(
        requestParameters: ProvidersGoogleWorkspaceCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleWorkspaceProvider> {
        const response = await this.providersGoogleWorkspaceCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceDestroyRaw(
        requestParameters: ProvidersGoogleWorkspaceDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.providersGoogleWorkspaceDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceDestroy(
        requestParameters: ProvidersGoogleWorkspaceDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersGoogleWorkspaceDestroyRaw(requestParameters, initOverrides);
    }

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

        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 = `/providers/google_workspace_groups/`;

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

    /**
     * GoogleWorkspaceProviderGroup Viewset
     */
    async providersGoogleWorkspaceGroupsCreateRaw(
        requestParameters: ProvidersGoogleWorkspaceGroupsCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleWorkspaceProviderGroup>> {
        const requestOptions =
            await this.providersGoogleWorkspaceGroupsCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProviderGroup Viewset
     */
    async providersGoogleWorkspaceGroupsCreate(
        requestParameters: ProvidersGoogleWorkspaceGroupsCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleWorkspaceProviderGroup> {
        const response = await this.providersGoogleWorkspaceGroupsCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * GoogleWorkspaceProviderGroup Viewset
     */
    async providersGoogleWorkspaceGroupsDestroyRaw(
        requestParameters: ProvidersGoogleWorkspaceGroupsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.providersGoogleWorkspaceGroupsDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * GoogleWorkspaceProviderGroup Viewset
     */
    async providersGoogleWorkspaceGroupsDestroy(
        requestParameters: ProvidersGoogleWorkspaceGroupsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersGoogleWorkspaceGroupsDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

        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["providerId"] != null) {
            queryParameters["provider__id"] = requestParameters["providerId"];
        }

        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 = `/providers/google_workspace_groups/`;

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

    /**
     * GoogleWorkspaceProviderGroup Viewset
     */
    async providersGoogleWorkspaceGroupsListRaw(
        requestParameters: ProvidersGoogleWorkspaceGroupsListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedGoogleWorkspaceProviderGroupList>> {
        const requestOptions =
            await this.providersGoogleWorkspaceGroupsListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProviderGroup Viewset
     */
    async providersGoogleWorkspaceGroupsList(
        requestParameters: ProvidersGoogleWorkspaceGroupsListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedGoogleWorkspaceProviderGroupList> {
        const response = await this.providersGoogleWorkspaceGroupsListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * GoogleWorkspaceProviderGroup Viewset
     */
    async providersGoogleWorkspaceGroupsRetrieveRaw(
        requestParameters: ProvidersGoogleWorkspaceGroupsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleWorkspaceProviderGroup>> {
        const requestOptions =
            await this.providersGoogleWorkspaceGroupsRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProviderGroup Viewset
     */
    async providersGoogleWorkspaceGroupsRetrieve(
        requestParameters: ProvidersGoogleWorkspaceGroupsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleWorkspaceProviderGroup> {
        const response = await this.providersGoogleWorkspaceGroupsRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/google_workspace_groups/{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 providersGoogleWorkspaceGroupsUsedByListRaw(
        requestParameters: ProvidersGoogleWorkspaceGroupsUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.providersGoogleWorkspaceGroupsUsedByListRequestOpts(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 providersGoogleWorkspaceGroupsUsedByList(
        requestParameters: ProvidersGoogleWorkspaceGroupsUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersGoogleWorkspaceGroupsUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

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

        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 = `/providers/google_workspace/`;

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceListRaw(
        requestParameters: ProvidersGoogleWorkspaceListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedGoogleWorkspaceProviderList>> {
        const requestOptions =
            await this.providersGoogleWorkspaceListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceList(
        requestParameters: ProvidersGoogleWorkspaceListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedGoogleWorkspaceProviderList> {
        const response = await this.providersGoogleWorkspaceListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspacePartialUpdateRaw(
        requestParameters: ProvidersGoogleWorkspacePartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleWorkspaceProvider>> {
        const requestOptions =
            await this.providersGoogleWorkspacePartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspacePartialUpdate(
        requestParameters: ProvidersGoogleWorkspacePartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleWorkspaceProvider> {
        const response = await this.providersGoogleWorkspacePartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceRetrieveRaw(
        requestParameters: ProvidersGoogleWorkspaceRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleWorkspaceProvider>> {
        const requestOptions =
            await this.providersGoogleWorkspaceRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceRetrieve(
        requestParameters: ProvidersGoogleWorkspaceRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleWorkspaceProvider> {
        const response = await this.providersGoogleWorkspaceRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

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

    /**
     * Sync/Re-sync a single user/group object
     */
    async providersGoogleWorkspaceSyncObjectCreateRaw(
        requestParameters: ProvidersGoogleWorkspaceSyncObjectCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SyncObjectResult>> {
        const requestOptions =
            await this.providersGoogleWorkspaceSyncObjectCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Sync/Re-sync a single user/group object
     */
    async providersGoogleWorkspaceSyncObjectCreate(
        requestParameters: ProvidersGoogleWorkspaceSyncObjectCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SyncObjectResult> {
        const response = await this.providersGoogleWorkspaceSyncObjectCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * Get provider\'s sync status
     */
    async providersGoogleWorkspaceSyncStatusRetrieveRaw(
        requestParameters: ProvidersGoogleWorkspaceSyncStatusRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SyncStatus>> {
        const requestOptions =
            await this.providersGoogleWorkspaceSyncStatusRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Get provider\'s sync status
     */
    async providersGoogleWorkspaceSyncStatusRetrieve(
        requestParameters: ProvidersGoogleWorkspaceSyncStatusRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SyncStatus> {
        const response = await this.providersGoogleWorkspaceSyncStatusRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceUpdateRaw(
        requestParameters: ProvidersGoogleWorkspaceUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleWorkspaceProvider>> {
        const requestOptions =
            await this.providersGoogleWorkspaceUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProvider Viewset
     */
    async providersGoogleWorkspaceUpdate(
        requestParameters: ProvidersGoogleWorkspaceUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleWorkspaceProvider> {
        const response = await this.providersGoogleWorkspaceUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/google_workspace/{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 providersGoogleWorkspaceUsedByListRaw(
        requestParameters: ProvidersGoogleWorkspaceUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.providersGoogleWorkspaceUsedByListRequestOpts(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 providersGoogleWorkspaceUsedByList(
        requestParameters: ProvidersGoogleWorkspaceUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersGoogleWorkspaceUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/google_workspace_users/`;

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

    /**
     * GoogleWorkspaceProviderUser Viewset
     */
    async providersGoogleWorkspaceUsersCreateRaw(
        requestParameters: ProvidersGoogleWorkspaceUsersCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleWorkspaceProviderUser>> {
        const requestOptions =
            await this.providersGoogleWorkspaceUsersCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProviderUser Viewset
     */
    async providersGoogleWorkspaceUsersCreate(
        requestParameters: ProvidersGoogleWorkspaceUsersCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleWorkspaceProviderUser> {
        const response = await this.providersGoogleWorkspaceUsersCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * GoogleWorkspaceProviderUser Viewset
     */
    async providersGoogleWorkspaceUsersDestroyRaw(
        requestParameters: ProvidersGoogleWorkspaceUsersDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.providersGoogleWorkspaceUsersDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * GoogleWorkspaceProviderUser Viewset
     */
    async providersGoogleWorkspaceUsersDestroy(
        requestParameters: ProvidersGoogleWorkspaceUsersDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersGoogleWorkspaceUsersDestroyRaw(requestParameters, initOverrides);
    }

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

        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["providerId"] != null) {
            queryParameters["provider__id"] = requestParameters["providerId"];
        }

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

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

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

        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 = `/providers/google_workspace_users/`;

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

    /**
     * GoogleWorkspaceProviderUser Viewset
     */
    async providersGoogleWorkspaceUsersListRaw(
        requestParameters: ProvidersGoogleWorkspaceUsersListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedGoogleWorkspaceProviderUserList>> {
        const requestOptions =
            await this.providersGoogleWorkspaceUsersListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProviderUser Viewset
     */
    async providersGoogleWorkspaceUsersList(
        requestParameters: ProvidersGoogleWorkspaceUsersListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedGoogleWorkspaceProviderUserList> {
        const response = await this.providersGoogleWorkspaceUsersListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * GoogleWorkspaceProviderUser Viewset
     */
    async providersGoogleWorkspaceUsersRetrieveRaw(
        requestParameters: ProvidersGoogleWorkspaceUsersRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<GoogleWorkspaceProviderUser>> {
        const requestOptions =
            await this.providersGoogleWorkspaceUsersRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * GoogleWorkspaceProviderUser Viewset
     */
    async providersGoogleWorkspaceUsersRetrieve(
        requestParameters: ProvidersGoogleWorkspaceUsersRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<GoogleWorkspaceProviderUser> {
        const response = await this.providersGoogleWorkspaceUsersRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/google_workspace_users/{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 providersGoogleWorkspaceUsersUsedByListRaw(
        requestParameters: ProvidersGoogleWorkspaceUsersUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.providersGoogleWorkspaceUsersUsedByListRequestOpts(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 providersGoogleWorkspaceUsersUsedByList(
        requestParameters: ProvidersGoogleWorkspaceUsersUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersGoogleWorkspaceUsersUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/ldap/`;

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapCreateRaw(
        requestParameters: ProvidersLdapCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<LDAPProvider>> {
        const requestOptions = await this.providersLdapCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapCreate(
        requestParameters: ProvidersLdapCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<LDAPProvider> {
        const response = await this.providersLdapCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapDestroyRaw(
        requestParameters: ProvidersLdapDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersLdapDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * LDAPProvider Viewset
     */
    async providersLdapDestroy(
        requestParameters: ProvidersLdapDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersLdapDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        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 = `/providers/ldap/`;

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapListRaw(
        requestParameters: ProvidersLdapListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedLDAPProviderList>> {
        const requestOptions = await this.providersLdapListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapList(
        requestParameters: ProvidersLdapListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedLDAPProviderList> {
        const response = await this.providersLdapListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapPartialUpdateRaw(
        requestParameters: ProvidersLdapPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<LDAPProvider>> {
        const requestOptions = await this.providersLdapPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapPartialUpdate(
        requestParameters: ProvidersLdapPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<LDAPProvider> {
        const response = await this.providersLdapPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapRetrieveRaw(
        requestParameters: ProvidersLdapRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<LDAPProvider>> {
        const requestOptions = await this.providersLdapRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapRetrieve(
        requestParameters: ProvidersLdapRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<LDAPProvider> {
        const response = await this.providersLdapRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapUpdateRaw(
        requestParameters: ProvidersLdapUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<LDAPProvider>> {
        const requestOptions = await this.providersLdapUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * LDAPProvider Viewset
     */
    async providersLdapUpdate(
        requestParameters: ProvidersLdapUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<LDAPProvider> {
        const response = await this.providersLdapUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/ldap/{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 providersLdapUsedByListRaw(
        requestParameters: ProvidersLdapUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersLdapUsedByListRequestOpts(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 providersLdapUsedByList(
        requestParameters: ProvidersLdapUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersLdapUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/microsoft_entra/`;

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraCreateRaw(
        requestParameters: ProvidersMicrosoftEntraCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<MicrosoftEntraProvider>> {
        const requestOptions =
            await this.providersMicrosoftEntraCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraCreate(
        requestParameters: ProvidersMicrosoftEntraCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<MicrosoftEntraProvider> {
        const response = await this.providersMicrosoftEntraCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraDestroyRaw(
        requestParameters: ProvidersMicrosoftEntraDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.providersMicrosoftEntraDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraDestroy(
        requestParameters: ProvidersMicrosoftEntraDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersMicrosoftEntraDestroyRaw(requestParameters, initOverrides);
    }

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

        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 = `/providers/microsoft_entra_groups/`;

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

    /**
     * MicrosoftEntraProviderGroup Viewset
     */
    async providersMicrosoftEntraGroupsCreateRaw(
        requestParameters: ProvidersMicrosoftEntraGroupsCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<MicrosoftEntraProviderGroup>> {
        const requestOptions =
            await this.providersMicrosoftEntraGroupsCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProviderGroup Viewset
     */
    async providersMicrosoftEntraGroupsCreate(
        requestParameters: ProvidersMicrosoftEntraGroupsCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<MicrosoftEntraProviderGroup> {
        const response = await this.providersMicrosoftEntraGroupsCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * MicrosoftEntraProviderGroup Viewset
     */
    async providersMicrosoftEntraGroupsDestroyRaw(
        requestParameters: ProvidersMicrosoftEntraGroupsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.providersMicrosoftEntraGroupsDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * MicrosoftEntraProviderGroup Viewset
     */
    async providersMicrosoftEntraGroupsDestroy(
        requestParameters: ProvidersMicrosoftEntraGroupsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersMicrosoftEntraGroupsDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

        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["providerId"] != null) {
            queryParameters["provider__id"] = requestParameters["providerId"];
        }

        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 = `/providers/microsoft_entra_groups/`;

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

    /**
     * MicrosoftEntraProviderGroup Viewset
     */
    async providersMicrosoftEntraGroupsListRaw(
        requestParameters: ProvidersMicrosoftEntraGroupsListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedMicrosoftEntraProviderGroupList>> {
        const requestOptions =
            await this.providersMicrosoftEntraGroupsListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProviderGroup Viewset
     */
    async providersMicrosoftEntraGroupsList(
        requestParameters: ProvidersMicrosoftEntraGroupsListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedMicrosoftEntraProviderGroupList> {
        const response = await this.providersMicrosoftEntraGroupsListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * MicrosoftEntraProviderGroup Viewset
     */
    async providersMicrosoftEntraGroupsRetrieveRaw(
        requestParameters: ProvidersMicrosoftEntraGroupsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<MicrosoftEntraProviderGroup>> {
        const requestOptions =
            await this.providersMicrosoftEntraGroupsRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProviderGroup Viewset
     */
    async providersMicrosoftEntraGroupsRetrieve(
        requestParameters: ProvidersMicrosoftEntraGroupsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<MicrosoftEntraProviderGroup> {
        const response = await this.providersMicrosoftEntraGroupsRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/microsoft_entra_groups/{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 providersMicrosoftEntraGroupsUsedByListRaw(
        requestParameters: ProvidersMicrosoftEntraGroupsUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.providersMicrosoftEntraGroupsUsedByListRequestOpts(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 providersMicrosoftEntraGroupsUsedByList(
        requestParameters: ProvidersMicrosoftEntraGroupsUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersMicrosoftEntraGroupsUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

        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 = `/providers/microsoft_entra/`;

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraListRaw(
        requestParameters: ProvidersMicrosoftEntraListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedMicrosoftEntraProviderList>> {
        const requestOptions = await this.providersMicrosoftEntraListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraList(
        requestParameters: ProvidersMicrosoftEntraListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedMicrosoftEntraProviderList> {
        const response = await this.providersMicrosoftEntraListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraPartialUpdateRaw(
        requestParameters: ProvidersMicrosoftEntraPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<MicrosoftEntraProvider>> {
        const requestOptions =
            await this.providersMicrosoftEntraPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraPartialUpdate(
        requestParameters: ProvidersMicrosoftEntraPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<MicrosoftEntraProvider> {
        const response = await this.providersMicrosoftEntraPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraRetrieveRaw(
        requestParameters: ProvidersMicrosoftEntraRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<MicrosoftEntraProvider>> {
        const requestOptions =
            await this.providersMicrosoftEntraRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraRetrieve(
        requestParameters: ProvidersMicrosoftEntraRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<MicrosoftEntraProvider> {
        const response = await this.providersMicrosoftEntraRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

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

    /**
     * Sync/Re-sync a single user/group object
     */
    async providersMicrosoftEntraSyncObjectCreateRaw(
        requestParameters: ProvidersMicrosoftEntraSyncObjectCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SyncObjectResult>> {
        const requestOptions =
            await this.providersMicrosoftEntraSyncObjectCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Sync/Re-sync a single user/group object
     */
    async providersMicrosoftEntraSyncObjectCreate(
        requestParameters: ProvidersMicrosoftEntraSyncObjectCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SyncObjectResult> {
        const response = await this.providersMicrosoftEntraSyncObjectCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * Get provider\'s sync status
     */
    async providersMicrosoftEntraSyncStatusRetrieveRaw(
        requestParameters: ProvidersMicrosoftEntraSyncStatusRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SyncStatus>> {
        const requestOptions =
            await this.providersMicrosoftEntraSyncStatusRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Get provider\'s sync status
     */
    async providersMicrosoftEntraSyncStatusRetrieve(
        requestParameters: ProvidersMicrosoftEntraSyncStatusRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SyncStatus> {
        const response = await this.providersMicrosoftEntraSyncStatusRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraUpdateRaw(
        requestParameters: ProvidersMicrosoftEntraUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<MicrosoftEntraProvider>> {
        const requestOptions =
            await this.providersMicrosoftEntraUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProvider Viewset
     */
    async providersMicrosoftEntraUpdate(
        requestParameters: ProvidersMicrosoftEntraUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<MicrosoftEntraProvider> {
        const response = await this.providersMicrosoftEntraUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/microsoft_entra/{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 providersMicrosoftEntraUsedByListRaw(
        requestParameters: ProvidersMicrosoftEntraUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.providersMicrosoftEntraUsedByListRequestOpts(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 providersMicrosoftEntraUsedByList(
        requestParameters: ProvidersMicrosoftEntraUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersMicrosoftEntraUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/microsoft_entra_users/`;

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

    /**
     * MicrosoftEntraProviderUser Viewset
     */
    async providersMicrosoftEntraUsersCreateRaw(
        requestParameters: ProvidersMicrosoftEntraUsersCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<MicrosoftEntraProviderUser>> {
        const requestOptions =
            await this.providersMicrosoftEntraUsersCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProviderUser Viewset
     */
    async providersMicrosoftEntraUsersCreate(
        requestParameters: ProvidersMicrosoftEntraUsersCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<MicrosoftEntraProviderUser> {
        const response = await this.providersMicrosoftEntraUsersCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * MicrosoftEntraProviderUser Viewset
     */
    async providersMicrosoftEntraUsersDestroyRaw(
        requestParameters: ProvidersMicrosoftEntraUsersDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions =
            await this.providersMicrosoftEntraUsersDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * MicrosoftEntraProviderUser Viewset
     */
    async providersMicrosoftEntraUsersDestroy(
        requestParameters: ProvidersMicrosoftEntraUsersDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersMicrosoftEntraUsersDestroyRaw(requestParameters, initOverrides);
    }

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

        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["providerId"] != null) {
            queryParameters["provider__id"] = requestParameters["providerId"];
        }

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

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

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

        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 = `/providers/microsoft_entra_users/`;

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

    /**
     * MicrosoftEntraProviderUser Viewset
     */
    async providersMicrosoftEntraUsersListRaw(
        requestParameters: ProvidersMicrosoftEntraUsersListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedMicrosoftEntraProviderUserList>> {
        const requestOptions =
            await this.providersMicrosoftEntraUsersListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProviderUser Viewset
     */
    async providersMicrosoftEntraUsersList(
        requestParameters: ProvidersMicrosoftEntraUsersListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedMicrosoftEntraProviderUserList> {
        const response = await this.providersMicrosoftEntraUsersListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * MicrosoftEntraProviderUser Viewset
     */
    async providersMicrosoftEntraUsersRetrieveRaw(
        requestParameters: ProvidersMicrosoftEntraUsersRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<MicrosoftEntraProviderUser>> {
        const requestOptions =
            await this.providersMicrosoftEntraUsersRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * MicrosoftEntraProviderUser Viewset
     */
    async providersMicrosoftEntraUsersRetrieve(
        requestParameters: ProvidersMicrosoftEntraUsersRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<MicrosoftEntraProviderUser> {
        const response = await this.providersMicrosoftEntraUsersRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/microsoft_entra_users/{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 providersMicrosoftEntraUsersUsedByListRaw(
        requestParameters: ProvidersMicrosoftEntraUsersUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.providersMicrosoftEntraUsersUsedByListRequestOpts(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 providersMicrosoftEntraUsersUsedByList(
        requestParameters: ProvidersMicrosoftEntraUsersUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersMicrosoftEntraUsersUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/oauth2/`;

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2CreateRaw(
        requestParameters: ProvidersOauth2CreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<OAuth2Provider>> {
        const requestOptions = await this.providersOauth2CreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2Create(
        requestParameters: ProvidersOauth2CreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<OAuth2Provider> {
        const response = await this.providersOauth2CreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2DestroyRaw(
        requestParameters: ProvidersOauth2DestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersOauth2DestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2Destroy(
        requestParameters: ProvidersOauth2DestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersOauth2DestroyRaw(requestParameters, initOverrides);
    }

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

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

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

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

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

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

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

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

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

        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["propertyMappings"] != null) {
            queryParameters["property_mappings"] = requestParameters["propertyMappings"];
        }

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

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

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

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

        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 = `/providers/oauth2/`;

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2ListRaw(
        requestParameters: ProvidersOauth2ListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedOAuth2ProviderList>> {
        const requestOptions = await this.providersOauth2ListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2List(
        requestParameters: ProvidersOauth2ListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedOAuth2ProviderList> {
        const response = await this.providersOauth2ListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2PartialUpdateRaw(
        requestParameters: ProvidersOauth2PartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<OAuth2Provider>> {
        const requestOptions =
            await this.providersOauth2PartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2PartialUpdate(
        requestParameters: ProvidersOauth2PartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<OAuth2Provider> {
        const response = await this.providersOauth2PartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        const queryParameters: any = {};

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

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

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

    /**
     * Preview user data for provider
     */
    async providersOauth2PreviewUserRetrieveRaw(
        requestParameters: ProvidersOauth2PreviewUserRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PropertyMappingPreview>> {
        const requestOptions =
            await this.providersOauth2PreviewUserRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Preview user data for provider
     */
    async providersOauth2PreviewUserRetrieve(
        requestParameters: ProvidersOauth2PreviewUserRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PropertyMappingPreview> {
        const response = await this.providersOauth2PreviewUserRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2RetrieveRaw(
        requestParameters: ProvidersOauth2RetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<OAuth2Provider>> {
        const requestOptions = await this.providersOauth2RetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2Retrieve(
        requestParameters: ProvidersOauth2RetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<OAuth2Provider> {
        const response = await this.providersOauth2RetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * Get Providers setup URLs
     */
    async providersOauth2SetupUrlsRetrieveRaw(
        requestParameters: ProvidersOauth2SetupUrlsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<OAuth2ProviderSetupURLs>> {
        const requestOptions =
            await this.providersOauth2SetupUrlsRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Get Providers setup URLs
     */
    async providersOauth2SetupUrlsRetrieve(
        requestParameters: ProvidersOauth2SetupUrlsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<OAuth2ProviderSetupURLs> {
        const response = await this.providersOauth2SetupUrlsRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2UpdateRaw(
        requestParameters: ProvidersOauth2UpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<OAuth2Provider>> {
        const requestOptions = await this.providersOauth2UpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * OAuth2Provider Viewset
     */
    async providersOauth2Update(
        requestParameters: ProvidersOauth2UpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<OAuth2Provider> {
        const response = await this.providersOauth2UpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/oauth2/{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 providersOauth2UsedByListRaw(
        requestParameters: ProvidersOauth2UsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersOauth2UsedByListRequestOpts(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 providersOauth2UsedByList(
        requestParameters: ProvidersOauth2UsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersOauth2UsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/proxy/`;

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyCreateRaw(
        requestParameters: ProvidersProxyCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<ProxyProvider>> {
        const requestOptions = await this.providersProxyCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyCreate(
        requestParameters: ProvidersProxyCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<ProxyProvider> {
        const response = await this.providersProxyCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyDestroyRaw(
        requestParameters: ProvidersProxyDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersProxyDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * ProxyProvider Viewset
     */
    async providersProxyDestroy(
        requestParameters: ProvidersProxyDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersProxyDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        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["propertyMappingsIexact"] != null) {
            queryParameters["property_mappings__iexact"] =
                requestParameters["propertyMappingsIexact"];
        }

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

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

        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 = `/providers/proxy/`;

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyListRaw(
        requestParameters: ProvidersProxyListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedProxyProviderList>> {
        const requestOptions = await this.providersProxyListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyList(
        requestParameters: ProvidersProxyListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedProxyProviderList> {
        const response = await this.providersProxyListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyPartialUpdateRaw(
        requestParameters: ProvidersProxyPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<ProxyProvider>> {
        const requestOptions = await this.providersProxyPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyPartialUpdate(
        requestParameters: ProvidersProxyPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<ProxyProvider> {
        const response = await this.providersProxyPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyRetrieveRaw(
        requestParameters: ProvidersProxyRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<ProxyProvider>> {
        const requestOptions = await this.providersProxyRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyRetrieve(
        requestParameters: ProvidersProxyRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<ProxyProvider> {
        const response = await this.providersProxyRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyUpdateRaw(
        requestParameters: ProvidersProxyUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<ProxyProvider>> {
        const requestOptions = await this.providersProxyUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * ProxyProvider Viewset
     */
    async providersProxyUpdate(
        requestParameters: ProvidersProxyUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<ProxyProvider> {
        const response = await this.providersProxyUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/proxy/{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 providersProxyUsedByListRaw(
        requestParameters: ProvidersProxyUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersProxyUsedByListRequestOpts(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 providersProxyUsedByList(
        requestParameters: ProvidersProxyUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersProxyUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/rac/`;

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

    /**
     * RACProvider Viewset
     */
    async providersRacCreateRaw(
        requestParameters: ProvidersRacCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<RACProvider>> {
        const requestOptions = await this.providersRacCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RACProvider Viewset
     */
    async providersRacCreate(
        requestParameters: ProvidersRacCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<RACProvider> {
        const response = await this.providersRacCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * RACProvider Viewset
     */
    async providersRacDestroyRaw(
        requestParameters: ProvidersRacDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersRacDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * RACProvider Viewset
     */
    async providersRacDestroy(
        requestParameters: ProvidersRacDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersRacDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

        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 = `/providers/rac/`;

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

    /**
     * RACProvider Viewset
     */
    async providersRacListRaw(
        requestParameters: ProvidersRacListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedRACProviderList>> {
        const requestOptions = await this.providersRacListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RACProvider Viewset
     */
    async providersRacList(
        requestParameters: ProvidersRacListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedRACProviderList> {
        const response = await this.providersRacListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * RACProvider Viewset
     */
    async providersRacPartialUpdateRaw(
        requestParameters: ProvidersRacPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<RACProvider>> {
        const requestOptions = await this.providersRacPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RACProvider Viewset
     */
    async providersRacPartialUpdate(
        requestParameters: ProvidersRacPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<RACProvider> {
        const response = await this.providersRacPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * RACProvider Viewset
     */
    async providersRacRetrieveRaw(
        requestParameters: ProvidersRacRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<RACProvider>> {
        const requestOptions = await this.providersRacRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RACProvider Viewset
     */
    async providersRacRetrieve(
        requestParameters: ProvidersRacRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<RACProvider> {
        const response = await this.providersRacRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

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

    /**
     * RACProvider Viewset
     */
    async providersRacUpdateRaw(
        requestParameters: ProvidersRacUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<RACProvider>> {
        const requestOptions = await this.providersRacUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RACProvider Viewset
     */
    async providersRacUpdate(
        requestParameters: ProvidersRacUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<RACProvider> {
        const response = await this.providersRacUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/rac/{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 providersRacUsedByListRaw(
        requestParameters: ProvidersRacUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersRacUsedByListRequestOpts(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 providersRacUsedByList(
        requestParameters: ProvidersRacUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersRacUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/radius/`;

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusCreateRaw(
        requestParameters: ProvidersRadiusCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<RadiusProvider>> {
        const requestOptions = await this.providersRadiusCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusCreate(
        requestParameters: ProvidersRadiusCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<RadiusProvider> {
        const response = await this.providersRadiusCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusDestroyRaw(
        requestParameters: ProvidersRadiusDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersRadiusDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusDestroy(
        requestParameters: ProvidersRadiusDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersRadiusDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

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

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

        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 = `/providers/radius/`;

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusListRaw(
        requestParameters: ProvidersRadiusListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedRadiusProviderList>> {
        const requestOptions = await this.providersRadiusListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusList(
        requestParameters: ProvidersRadiusListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedRadiusProviderList> {
        const response = await this.providersRadiusListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusPartialUpdateRaw(
        requestParameters: ProvidersRadiusPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<RadiusProvider>> {
        const requestOptions =
            await this.providersRadiusPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusPartialUpdate(
        requestParameters: ProvidersRadiusPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<RadiusProvider> {
        const response = await this.providersRadiusPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusRetrieveRaw(
        requestParameters: ProvidersRadiusRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<RadiusProvider>> {
        const requestOptions = await this.providersRadiusRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusRetrieve(
        requestParameters: ProvidersRadiusRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<RadiusProvider> {
        const response = await this.providersRadiusRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusUpdateRaw(
        requestParameters: ProvidersRadiusUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<RadiusProvider>> {
        const requestOptions = await this.providersRadiusUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * RadiusProvider Viewset
     */
    async providersRadiusUpdate(
        requestParameters: ProvidersRadiusUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<RadiusProvider> {
        const response = await this.providersRadiusUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/radius/{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 providersRadiusUsedByListRaw(
        requestParameters: ProvidersRadiusUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersRadiusUsedByListRequestOpts(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 providersRadiusUsedByList(
        requestParameters: ProvidersRadiusUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersRadiusUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/saml/`;

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlCreateRaw(
        requestParameters: ProvidersSamlCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SAMLProvider>> {
        const requestOptions = await this.providersSamlCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlCreate(
        requestParameters: ProvidersSamlCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SAMLProvider> {
        const response = await this.providersSamlCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlDestroyRaw(
        requestParameters: ProvidersSamlDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersSamlDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * SAMLProvider Viewset
     */
    async providersSamlDestroy(
        requestParameters: ProvidersSamlDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersSamlDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

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

        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}`;
            }
        }
        const consumes: runtime.Consume[] = [{ contentType: "multipart/form-data" }];
        // @ts-ignore: canConsumeForm may be unused
        const canConsumeForm = runtime.canConsumeForm(consumes);

        let formParams: { append(param: string, value: any): any };
        let useForm = false;
        // use FormData to transmit files using content-type "multipart/form-data"
        useForm = canConsumeForm;
        if (useForm) {
            formParams = new FormData();
        } else {
            formParams = new URLSearchParams();
        }

        if (requestParameters["name"] != null) {
            formParams.append("name", requestParameters["name"] as any);
        }

        if (requestParameters["authorizationFlow"] != null) {
            formParams.append("authorization_flow", requestParameters["authorizationFlow"] as any);
        }

        if (requestParameters["invalidationFlow"] != null) {
            formParams.append("invalidation_flow", requestParameters["invalidationFlow"] as any);
        }

        if (requestParameters["file"] != null) {
            formParams.append("file", requestParameters["file"] as any);
        }

        let urlPath = `/providers/saml/import_metadata/`;

        return {
            path: urlPath,
            method: "POST",
            headers: headerParameters,
            query: queryParameters,
            body: formParams,
        };
    }

    /**
     * Create provider from SAML Metadata
     */
    async providersSamlImportMetadataCreateRaw(
        requestParameters: ProvidersSamlImportMetadataCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SAMLProvider>> {
        const requestOptions =
            await this.providersSamlImportMetadataCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Create provider from SAML Metadata
     */
    async providersSamlImportMetadataCreate(
        requestParameters: ProvidersSamlImportMetadataCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SAMLProvider> {
        const response = await this.providersSamlImportMetadataCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        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["propertyMappings"] != null) {
            queryParameters["property_mappings"] = requestParameters["propertyMappings"];
        }

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

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

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

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

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

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

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

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

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

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

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

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

        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 = `/providers/saml/`;

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlListRaw(
        requestParameters: ProvidersSamlListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedSAMLProviderList>> {
        const requestOptions = await this.providersSamlListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlList(
        requestParameters: ProvidersSamlListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedSAMLProviderList> {
        const response = await this.providersSamlListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        const queryParameters: any = {};

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

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

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

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

    /**
     * Return metadata as XML string
     */
    async providersSamlMetadataRetrieveRaw(
        requestParameters: ProvidersSamlMetadataRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SAMLMetadata>> {
        const requestOptions =
            await this.providersSamlMetadataRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Return metadata as XML string
     */
    async providersSamlMetadataRetrieve(
        requestParameters: ProvidersSamlMetadataRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SAMLMetadata> {
        const response = await this.providersSamlMetadataRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlPartialUpdateRaw(
        requestParameters: ProvidersSamlPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SAMLProvider>> {
        const requestOptions = await this.providersSamlPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlPartialUpdate(
        requestParameters: ProvidersSamlPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SAMLProvider> {
        const response = await this.providersSamlPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        const queryParameters: any = {};

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

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

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

    /**
     * Preview user data for provider
     */
    async providersSamlPreviewUserRetrieveRaw(
        requestParameters: ProvidersSamlPreviewUserRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PropertyMappingPreview>> {
        const requestOptions =
            await this.providersSamlPreviewUserRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Preview user data for provider
     */
    async providersSamlPreviewUserRetrieve(
        requestParameters: ProvidersSamlPreviewUserRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PropertyMappingPreview> {
        const response = await this.providersSamlPreviewUserRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlRetrieveRaw(
        requestParameters: ProvidersSamlRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SAMLProvider>> {
        const requestOptions = await this.providersSamlRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlRetrieve(
        requestParameters: ProvidersSamlRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SAMLProvider> {
        const response = await this.providersSamlRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlUpdateRaw(
        requestParameters: ProvidersSamlUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SAMLProvider>> {
        const requestOptions = await this.providersSamlUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SAMLProvider Viewset
     */
    async providersSamlUpdate(
        requestParameters: ProvidersSamlUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SAMLProvider> {
        const response = await this.providersSamlUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/saml/{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 providersSamlUsedByListRaw(
        requestParameters: ProvidersSamlUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersSamlUsedByListRequestOpts(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 providersSamlUsedByList(
        requestParameters: ProvidersSamlUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersSamlUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/scim/`;

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimCreateRaw(
        requestParameters: ProvidersScimCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SCIMProvider>> {
        const requestOptions = await this.providersScimCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimCreate(
        requestParameters: ProvidersScimCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SCIMProvider> {
        const response = await this.providersScimCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimDestroyRaw(
        requestParameters: ProvidersScimDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersScimDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * SCIMProvider Viewset
     */
    async providersScimDestroy(
        requestParameters: ProvidersScimDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersScimDestroyRaw(requestParameters, initOverrides);
    }

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

        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 = `/providers/scim_groups/`;

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

    /**
     * SCIMProviderGroup Viewset
     */
    async providersScimGroupsCreateRaw(
        requestParameters: ProvidersScimGroupsCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SCIMProviderGroup>> {
        const requestOptions = await this.providersScimGroupsCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProviderGroup Viewset
     */
    async providersScimGroupsCreate(
        requestParameters: ProvidersScimGroupsCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SCIMProviderGroup> {
        const response = await this.providersScimGroupsCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SCIMProviderGroup Viewset
     */
    async providersScimGroupsDestroyRaw(
        requestParameters: ProvidersScimGroupsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersScimGroupsDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * SCIMProviderGroup Viewset
     */
    async providersScimGroupsDestroy(
        requestParameters: ProvidersScimGroupsDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersScimGroupsDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

        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["providerId"] != null) {
            queryParameters["provider__id"] = requestParameters["providerId"];
        }

        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 = `/providers/scim_groups/`;

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

    /**
     * SCIMProviderGroup Viewset
     */
    async providersScimGroupsListRaw(
        requestParameters: ProvidersScimGroupsListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedSCIMProviderGroupList>> {
        const requestOptions = await this.providersScimGroupsListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProviderGroup Viewset
     */
    async providersScimGroupsList(
        requestParameters: ProvidersScimGroupsListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedSCIMProviderGroupList> {
        const response = await this.providersScimGroupsListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SCIMProviderGroup Viewset
     */
    async providersScimGroupsRetrieveRaw(
        requestParameters: ProvidersScimGroupsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SCIMProviderGroup>> {
        const requestOptions = await this.providersScimGroupsRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProviderGroup Viewset
     */
    async providersScimGroupsRetrieve(
        requestParameters: ProvidersScimGroupsRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SCIMProviderGroup> {
        const response = await this.providersScimGroupsRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/scim_groups/{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 providersScimGroupsUsedByListRaw(
        requestParameters: ProvidersScimGroupsUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.providersScimGroupsUsedByListRequestOpts(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 providersScimGroupsUsedByList(
        requestParameters: ProvidersScimGroupsUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersScimGroupsUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

        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"];
        }

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

        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 = `/providers/scim/`;

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimListRaw(
        requestParameters: ProvidersScimListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedSCIMProviderList>> {
        const requestOptions = await this.providersScimListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimList(
        requestParameters: ProvidersScimListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedSCIMProviderList> {
        const response = await this.providersScimListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimPartialUpdateRaw(
        requestParameters: ProvidersScimPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SCIMProvider>> {
        const requestOptions = await this.providersScimPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimPartialUpdate(
        requestParameters: ProvidersScimPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SCIMProvider> {
        const response = await this.providersScimPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimRetrieveRaw(
        requestParameters: ProvidersScimRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SCIMProvider>> {
        const requestOptions = await this.providersScimRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimRetrieve(
        requestParameters: ProvidersScimRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SCIMProvider> {
        const response = await this.providersScimRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

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

    /**
     * Sync/Re-sync a single user/group object
     */
    async providersScimSyncObjectCreateRaw(
        requestParameters: ProvidersScimSyncObjectCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SyncObjectResult>> {
        const requestOptions =
            await this.providersScimSyncObjectCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Sync/Re-sync a single user/group object
     */
    async providersScimSyncObjectCreate(
        requestParameters: ProvidersScimSyncObjectCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SyncObjectResult> {
        const response = await this.providersScimSyncObjectCreateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * Get provider\'s sync status
     */
    async providersScimSyncStatusRetrieveRaw(
        requestParameters: ProvidersScimSyncStatusRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SyncStatus>> {
        const requestOptions =
            await this.providersScimSyncStatusRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Get provider\'s sync status
     */
    async providersScimSyncStatusRetrieve(
        requestParameters: ProvidersScimSyncStatusRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SyncStatus> {
        const response = await this.providersScimSyncStatusRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimUpdateRaw(
        requestParameters: ProvidersScimUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SCIMProvider>> {
        const requestOptions = await this.providersScimUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProvider Viewset
     */
    async providersScimUpdate(
        requestParameters: ProvidersScimUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SCIMProvider> {
        const response = await this.providersScimUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/scim/{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 providersScimUsedByListRaw(
        requestParameters: ProvidersScimUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersScimUsedByListRequestOpts(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 providersScimUsedByList(
        requestParameters: ProvidersScimUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersScimUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/scim_users/`;

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

    /**
     * SCIMProviderUser Viewset
     */
    async providersScimUsersCreateRaw(
        requestParameters: ProvidersScimUsersCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SCIMProviderUser>> {
        const requestOptions = await this.providersScimUsersCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProviderUser Viewset
     */
    async providersScimUsersCreate(
        requestParameters: ProvidersScimUsersCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SCIMProviderUser> {
        const response = await this.providersScimUsersCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SCIMProviderUser Viewset
     */
    async providersScimUsersDestroyRaw(
        requestParameters: ProvidersScimUsersDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersScimUsersDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * SCIMProviderUser Viewset
     */
    async providersScimUsersDestroy(
        requestParameters: ProvidersScimUsersDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersScimUsersDestroyRaw(requestParameters, initOverrides);
    }

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

        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["providerId"] != null) {
            queryParameters["provider__id"] = requestParameters["providerId"];
        }

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

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

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

        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 = `/providers/scim_users/`;

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

    /**
     * SCIMProviderUser Viewset
     */
    async providersScimUsersListRaw(
        requestParameters: ProvidersScimUsersListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedSCIMProviderUserList>> {
        const requestOptions = await this.providersScimUsersListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProviderUser Viewset
     */
    async providersScimUsersList(
        requestParameters: ProvidersScimUsersListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedSCIMProviderUserList> {
        const response = await this.providersScimUsersListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SCIMProviderUser Viewset
     */
    async providersScimUsersRetrieveRaw(
        requestParameters: ProvidersScimUsersRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SCIMProviderUser>> {
        const requestOptions = await this.providersScimUsersRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SCIMProviderUser Viewset
     */
    async providersScimUsersRetrieve(
        requestParameters: ProvidersScimUsersRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SCIMProviderUser> {
        const response = await this.providersScimUsersRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/scim_users/{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 providersScimUsersUsedByListRaw(
        requestParameters: ProvidersScimUsersUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions =
            await this.providersScimUsersUsedByListRequestOpts(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 providersScimUsersUsedByList(
        requestParameters: ProvidersScimUsersUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersScimUsersUsedByListRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        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 = `/providers/ssf/`;

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfCreateRaw(
        requestParameters: ProvidersSsfCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SSFProvider>> {
        const requestOptions = await this.providersSsfCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfCreate(
        requestParameters: ProvidersSsfCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SSFProvider> {
        const response = await this.providersSsfCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfDestroyRaw(
        requestParameters: ProvidersSsfDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersSsfDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * SSFProvider Viewset
     */
    async providersSsfDestroy(
        requestParameters: ProvidersSsfDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersSsfDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

        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 = `/providers/ssf/`;

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfListRaw(
        requestParameters: ProvidersSsfListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedSSFProviderList>> {
        const requestOptions = await this.providersSsfListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfList(
        requestParameters: ProvidersSsfListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedSSFProviderList> {
        const response = await this.providersSsfListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfPartialUpdateRaw(
        requestParameters: ProvidersSsfPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SSFProvider>> {
        const requestOptions = await this.providersSsfPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfPartialUpdate(
        requestParameters: ProvidersSsfPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SSFProvider> {
        const response = await this.providersSsfPartialUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfRetrieveRaw(
        requestParameters: ProvidersSsfRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SSFProvider>> {
        const requestOptions = await this.providersSsfRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfRetrieve(
        requestParameters: ProvidersSsfRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SSFProvider> {
        const response = await this.providersSsfRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfUpdateRaw(
        requestParameters: ProvidersSsfUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SSFProvider>> {
        const requestOptions = await this.providersSsfUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * SSFProvider Viewset
     */
    async providersSsfUpdate(
        requestParameters: ProvidersSsfUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SSFProvider> {
        const response = await this.providersSsfUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/ssf/{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 providersSsfUsedByListRaw(
        requestParameters: ProvidersSsfUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersSsfUsedByListRequestOpts(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 providersSsfUsedByList(
        requestParameters: ProvidersSsfUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersSsfUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/wsfed/`;

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedCreateRaw(
        requestParameters: ProvidersWsfedCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WSFederationProvider>> {
        const requestOptions = await this.providersWsfedCreateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedCreate(
        requestParameters: ProvidersWsfedCreateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WSFederationProvider> {
        const response = await this.providersWsfedCreateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedDestroyRaw(
        requestParameters: ProvidersWsfedDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<void>> {
        const requestOptions = await this.providersWsfedDestroyRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedDestroy(
        requestParameters: ProvidersWsfedDestroyRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<void> {
        await this.providersWsfedDestroyRaw(requestParameters, initOverrides);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        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["propertyMappings"] != null) {
            queryParameters["property_mappings"] = requestParameters["propertyMappings"];
        }

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

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

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

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

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

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

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

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

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

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

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

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

        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 = `/providers/wsfed/`;

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedListRaw(
        requestParameters: ProvidersWsfedListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PaginatedWSFederationProviderList>> {
        const requestOptions = await this.providersWsfedListRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedList(
        requestParameters: ProvidersWsfedListRequest = {},
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PaginatedWSFederationProviderList> {
        const response = await this.providersWsfedListRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        const queryParameters: any = {};

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

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

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

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

    /**
     * Return metadata as XML string
     */
    async providersWsfedMetadataRetrieveRaw(
        requestParameters: ProvidersWsfedMetadataRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<SAMLMetadata>> {
        const requestOptions =
            await this.providersWsfedMetadataRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Return metadata as XML string
     */
    async providersWsfedMetadataRetrieve(
        requestParameters: ProvidersWsfedMetadataRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<SAMLMetadata> {
        const response = await this.providersWsfedMetadataRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedPartialUpdateRaw(
        requestParameters: ProvidersWsfedPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WSFederationProvider>> {
        const requestOptions = await this.providersWsfedPartialUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedPartialUpdate(
        requestParameters: ProvidersWsfedPartialUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WSFederationProvider> {
        const response = await this.providersWsfedPartialUpdateRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

        const queryParameters: any = {};

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

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

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

    /**
     * Preview user data for provider
     */
    async providersWsfedPreviewUserRetrieveRaw(
        requestParameters: ProvidersWsfedPreviewUserRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<PropertyMappingPreview>> {
        const requestOptions =
            await this.providersWsfedPreviewUserRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * Preview user data for provider
     */
    async providersWsfedPreviewUserRetrieve(
        requestParameters: ProvidersWsfedPreviewUserRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<PropertyMappingPreview> {
        const response = await this.providersWsfedPreviewUserRetrieveRaw(
            requestParameters,
            initOverrides,
        );
        return await response.value();
    }

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

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

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedRetrieveRaw(
        requestParameters: ProvidersWsfedRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WSFederationProvider>> {
        const requestOptions = await this.providersWsfedRetrieveRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedRetrieve(
        requestParameters: ProvidersWsfedRetrieveRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WSFederationProvider> {
        const response = await this.providersWsfedRetrieveRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

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

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

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedUpdateRaw(
        requestParameters: ProvidersWsfedUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<WSFederationProvider>> {
        const requestOptions = await this.providersWsfedUpdateRequestOpts(requestParameters);
        const response = await this.request(requestOptions, initOverrides);

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

    /**
     * WSFederationProvider Viewset
     */
    async providersWsfedUpdate(
        requestParameters: ProvidersWsfedUpdateRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<WSFederationProvider> {
        const response = await this.providersWsfedUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }

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

        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 = `/providers/wsfed/{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 providersWsfedUsedByListRaw(
        requestParameters: ProvidersWsfedUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<runtime.ApiResponse<Array<UsedBy>>> {
        const requestOptions = await this.providersWsfedUsedByListRequestOpts(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 providersWsfedUsedByList(
        requestParameters: ProvidersWsfedUsedByListRequest,
        initOverrides?: RequestInit | runtime.InitOverrideFunction,
    ): Promise<Array<UsedBy>> {
        const response = await this.providersWsfedUsedByListRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
