"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChallengeTypesFromJSON = ChallengeTypesFromJSON;
exports.ChallengeTypesFromJSONTyped = ChallengeTypesFromJSONTyped;
exports.ChallengeTypesToJSON = ChallengeTypesToJSON;
exports.ChallengeTypesToJSONTyped = ChallengeTypesToJSONTyped;
const AccessDeniedChallenge_1 = require("./AccessDeniedChallenge");
const AppleLoginChallenge_1 = require("./AppleLoginChallenge");
const AuthenticatorDuoChallenge_1 = require("./AuthenticatorDuoChallenge");
const AuthenticatorEmailChallenge_1 = require("./AuthenticatorEmailChallenge");
const AuthenticatorSMSChallenge_1 = require("./AuthenticatorSMSChallenge");
const AuthenticatorStaticChallenge_1 = require("./AuthenticatorStaticChallenge");
const AuthenticatorTOTPChallenge_1 = require("./AuthenticatorTOTPChallenge");
const AuthenticatorValidationChallenge_1 = require("./AuthenticatorValidationChallenge");
const AuthenticatorWebAuthnChallenge_1 = require("./AuthenticatorWebAuthnChallenge");
const AutosubmitChallenge_1 = require("./AutosubmitChallenge");
const CaptchaChallenge_1 = require("./CaptchaChallenge");
const ConsentChallenge_1 = require("./ConsentChallenge");
const DummyChallenge_1 = require("./DummyChallenge");
const EmailChallenge_1 = require("./EmailChallenge");
const FlowErrorChallenge_1 = require("./FlowErrorChallenge");
const FrameChallenge_1 = require("./FrameChallenge");
const IdentificationChallenge_1 = require("./IdentificationChallenge");
const OAuthDeviceCodeChallenge_1 = require("./OAuthDeviceCodeChallenge");
const OAuthDeviceCodeFinishChallenge_1 = require("./OAuthDeviceCodeFinishChallenge");
const PasswordChallenge_1 = require("./PasswordChallenge");
const PlexAuthenticationChallenge_1 = require("./PlexAuthenticationChallenge");
const PromptChallenge_1 = require("./PromptChallenge");
const RedirectChallenge_1 = require("./RedirectChallenge");
const SessionEndChallenge_1 = require("./SessionEndChallenge");
const ShellChallenge_1 = require("./ShellChallenge");
const UserLoginChallenge_1 = require("./UserLoginChallenge");
function ChallengeTypesFromJSON(json) {
    return ChallengeTypesFromJSONTyped(json, false);
}
function ChallengeTypesFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['component']) {
        case 'ak-provider-oauth2-device-code':
            return Object.assign({}, (0, OAuthDeviceCodeChallenge_1.OAuthDeviceCodeChallengeFromJSONTyped)(json, true), { component: 'ak-provider-oauth2-device-code' });
        case 'ak-provider-oauth2-device-code-finish':
            return Object.assign({}, (0, OAuthDeviceCodeFinishChallenge_1.OAuthDeviceCodeFinishChallengeFromJSONTyped)(json, true), { component: 'ak-provider-oauth2-device-code-finish' });
        case 'ak-source-oauth-apple':
            return Object.assign({}, (0, AppleLoginChallenge_1.AppleLoginChallengeFromJSONTyped)(json, true), { component: 'ak-source-oauth-apple' });
        case 'ak-source-plex':
            return Object.assign({}, (0, PlexAuthenticationChallenge_1.PlexAuthenticationChallengeFromJSONTyped)(json, true), { component: 'ak-source-plex' });
        case 'ak-stage-access-denied':
            return Object.assign({}, (0, AccessDeniedChallenge_1.AccessDeniedChallengeFromJSONTyped)(json, true), { component: 'ak-stage-access-denied' });
        case 'ak-stage-authenticator-duo':
            return Object.assign({}, (0, AuthenticatorDuoChallenge_1.AuthenticatorDuoChallengeFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-duo' });
        case 'ak-stage-authenticator-email':
            return Object.assign({}, (0, AuthenticatorEmailChallenge_1.AuthenticatorEmailChallengeFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-email' });
        case 'ak-stage-authenticator-sms':
            return Object.assign({}, (0, AuthenticatorSMSChallenge_1.AuthenticatorSMSChallengeFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-sms' });
        case 'ak-stage-authenticator-static':
            return Object.assign({}, (0, AuthenticatorStaticChallenge_1.AuthenticatorStaticChallengeFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-static' });
        case 'ak-stage-authenticator-totp':
            return Object.assign({}, (0, AuthenticatorTOTPChallenge_1.AuthenticatorTOTPChallengeFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-totp' });
        case 'ak-stage-authenticator-validate':
            return Object.assign({}, (0, AuthenticatorValidationChallenge_1.AuthenticatorValidationChallengeFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-validate' });
        case 'ak-stage-authenticator-webauthn':
            return Object.assign({}, (0, AuthenticatorWebAuthnChallenge_1.AuthenticatorWebAuthnChallengeFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-webauthn' });
        case 'ak-stage-autosubmit':
            return Object.assign({}, (0, AutosubmitChallenge_1.AutosubmitChallengeFromJSONTyped)(json, true), { component: 'ak-stage-autosubmit' });
        case 'ak-stage-captcha':
            return Object.assign({}, (0, CaptchaChallenge_1.CaptchaChallengeFromJSONTyped)(json, true), { component: 'ak-stage-captcha' });
        case 'ak-stage-consent':
            return Object.assign({}, (0, ConsentChallenge_1.ConsentChallengeFromJSONTyped)(json, true), { component: 'ak-stage-consent' });
        case 'ak-stage-dummy':
            return Object.assign({}, (0, DummyChallenge_1.DummyChallengeFromJSONTyped)(json, true), { component: 'ak-stage-dummy' });
        case 'ak-stage-email':
            return Object.assign({}, (0, EmailChallenge_1.EmailChallengeFromJSONTyped)(json, true), { component: 'ak-stage-email' });
        case 'ak-stage-flow-error':
            return Object.assign({}, (0, FlowErrorChallenge_1.FlowErrorChallengeFromJSONTyped)(json, true), { component: 'ak-stage-flow-error' });
        case 'ak-stage-identification':
            return Object.assign({}, (0, IdentificationChallenge_1.IdentificationChallengeFromJSONTyped)(json, true), { component: 'ak-stage-identification' });
        case 'ak-stage-password':
            return Object.assign({}, (0, PasswordChallenge_1.PasswordChallengeFromJSONTyped)(json, true), { component: 'ak-stage-password' });
        case 'ak-stage-prompt':
            return Object.assign({}, (0, PromptChallenge_1.PromptChallengeFromJSONTyped)(json, true), { component: 'ak-stage-prompt' });
        case 'ak-stage-session-end':
            return Object.assign({}, (0, SessionEndChallenge_1.SessionEndChallengeFromJSONTyped)(json, true), { component: 'ak-stage-session-end' });
        case 'ak-stage-user-login':
            return Object.assign({}, (0, UserLoginChallenge_1.UserLoginChallengeFromJSONTyped)(json, true), { component: 'ak-stage-user-login' });
        case 'xak-flow-frame':
            return Object.assign({}, (0, FrameChallenge_1.FrameChallengeFromJSONTyped)(json, true), { component: 'xak-flow-frame' });
        case 'xak-flow-redirect':
            return Object.assign({}, (0, RedirectChallenge_1.RedirectChallengeFromJSONTyped)(json, true), { component: 'xak-flow-redirect' });
        case 'xak-flow-shell':
            return Object.assign({}, (0, ShellChallenge_1.ShellChallengeFromJSONTyped)(json, true), { component: 'xak-flow-shell' });
        default:
            return json;
    }
}
function ChallengeTypesToJSON(json) {
    return ChallengeTypesToJSONTyped(json, false);
}
function ChallengeTypesToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['component']) {
        case 'ak-provider-oauth2-device-code':
            return Object.assign({}, (0, OAuthDeviceCodeChallenge_1.OAuthDeviceCodeChallengeToJSON)(value), { component: 'ak-provider-oauth2-device-code' });
        case 'ak-provider-oauth2-device-code-finish':
            return Object.assign({}, (0, OAuthDeviceCodeFinishChallenge_1.OAuthDeviceCodeFinishChallengeToJSON)(value), { component: 'ak-provider-oauth2-device-code-finish' });
        case 'ak-source-oauth-apple':
            return Object.assign({}, (0, AppleLoginChallenge_1.AppleLoginChallengeToJSON)(value), { component: 'ak-source-oauth-apple' });
        case 'ak-source-plex':
            return Object.assign({}, (0, PlexAuthenticationChallenge_1.PlexAuthenticationChallengeToJSON)(value), { component: 'ak-source-plex' });
        case 'ak-stage-access-denied':
            return Object.assign({}, (0, AccessDeniedChallenge_1.AccessDeniedChallengeToJSON)(value), { component: 'ak-stage-access-denied' });
        case 'ak-stage-authenticator-duo':
            return Object.assign({}, (0, AuthenticatorDuoChallenge_1.AuthenticatorDuoChallengeToJSON)(value), { component: 'ak-stage-authenticator-duo' });
        case 'ak-stage-authenticator-email':
            return Object.assign({}, (0, AuthenticatorEmailChallenge_1.AuthenticatorEmailChallengeToJSON)(value), { component: 'ak-stage-authenticator-email' });
        case 'ak-stage-authenticator-sms':
            return Object.assign({}, (0, AuthenticatorSMSChallenge_1.AuthenticatorSMSChallengeToJSON)(value), { component: 'ak-stage-authenticator-sms' });
        case 'ak-stage-authenticator-static':
            return Object.assign({}, (0, AuthenticatorStaticChallenge_1.AuthenticatorStaticChallengeToJSON)(value), { component: 'ak-stage-authenticator-static' });
        case 'ak-stage-authenticator-totp':
            return Object.assign({}, (0, AuthenticatorTOTPChallenge_1.AuthenticatorTOTPChallengeToJSON)(value), { component: 'ak-stage-authenticator-totp' });
        case 'ak-stage-authenticator-validate':
            return Object.assign({}, (0, AuthenticatorValidationChallenge_1.AuthenticatorValidationChallengeToJSON)(value), { component: 'ak-stage-authenticator-validate' });
        case 'ak-stage-authenticator-webauthn':
            return Object.assign({}, (0, AuthenticatorWebAuthnChallenge_1.AuthenticatorWebAuthnChallengeToJSON)(value), { component: 'ak-stage-authenticator-webauthn' });
        case 'ak-stage-autosubmit':
            return Object.assign({}, (0, AutosubmitChallenge_1.AutosubmitChallengeToJSON)(value), { component: 'ak-stage-autosubmit' });
        case 'ak-stage-captcha':
            return Object.assign({}, (0, CaptchaChallenge_1.CaptchaChallengeToJSON)(value), { component: 'ak-stage-captcha' });
        case 'ak-stage-consent':
            return Object.assign({}, (0, ConsentChallenge_1.ConsentChallengeToJSON)(value), { component: 'ak-stage-consent' });
        case 'ak-stage-dummy':
            return Object.assign({}, (0, DummyChallenge_1.DummyChallengeToJSON)(value), { component: 'ak-stage-dummy' });
        case 'ak-stage-email':
            return Object.assign({}, (0, EmailChallenge_1.EmailChallengeToJSON)(value), { component: 'ak-stage-email' });
        case 'ak-stage-flow-error':
            return Object.assign({}, (0, FlowErrorChallenge_1.FlowErrorChallengeToJSON)(value), { component: 'ak-stage-flow-error' });
        case 'ak-stage-identification':
            return Object.assign({}, (0, IdentificationChallenge_1.IdentificationChallengeToJSON)(value), { component: 'ak-stage-identification' });
        case 'ak-stage-password':
            return Object.assign({}, (0, PasswordChallenge_1.PasswordChallengeToJSON)(value), { component: 'ak-stage-password' });
        case 'ak-stage-prompt':
            return Object.assign({}, (0, PromptChallenge_1.PromptChallengeToJSON)(value), { component: 'ak-stage-prompt' });
        case 'ak-stage-session-end':
            return Object.assign({}, (0, SessionEndChallenge_1.SessionEndChallengeToJSON)(value), { component: 'ak-stage-session-end' });
        case 'ak-stage-user-login':
            return Object.assign({}, (0, UserLoginChallenge_1.UserLoginChallengeToJSON)(value), { component: 'ak-stage-user-login' });
        case 'xak-flow-frame':
            return Object.assign({}, (0, FrameChallenge_1.FrameChallengeToJSON)(value), { component: 'xak-flow-frame' });
        case 'xak-flow-redirect':
            return Object.assign({}, (0, RedirectChallenge_1.RedirectChallengeToJSON)(value), { component: 'xak-flow-redirect' });
        case 'xak-flow-shell':
            return Object.assign({}, (0, ShellChallenge_1.ShellChallengeToJSON)(value), { component: 'xak-flow-shell' });
        default:
            return value;
    }
}
//# sourceMappingURL=ChallengeTypes.js.map