"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.12.0-rc1
 * Contact: hello@goauthentik.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlowChallengeResponseRequestFromJSON = FlowChallengeResponseRequestFromJSON;
exports.FlowChallengeResponseRequestFromJSONTyped = FlowChallengeResponseRequestFromJSONTyped;
exports.FlowChallengeResponseRequestToJSON = FlowChallengeResponseRequestToJSON;
exports.FlowChallengeResponseRequestToJSONTyped = FlowChallengeResponseRequestToJSONTyped;
const AppleChallengeResponseRequest_1 = require("./AppleChallengeResponseRequest");
const AuthenticatorDuoChallengeResponseRequest_1 = require("./AuthenticatorDuoChallengeResponseRequest");
const AuthenticatorEmailChallengeResponseRequest_1 = require("./AuthenticatorEmailChallengeResponseRequest");
const AuthenticatorSMSChallengeResponseRequest_1 = require("./AuthenticatorSMSChallengeResponseRequest");
const AuthenticatorStaticChallengeResponseRequest_1 = require("./AuthenticatorStaticChallengeResponseRequest");
const AuthenticatorTOTPChallengeResponseRequest_1 = require("./AuthenticatorTOTPChallengeResponseRequest");
const AuthenticatorValidationChallengeResponseRequest_1 = require("./AuthenticatorValidationChallengeResponseRequest");
const AuthenticatorWebAuthnChallengeResponseRequest_1 = require("./AuthenticatorWebAuthnChallengeResponseRequest");
const AutoSubmitChallengeResponseRequest_1 = require("./AutoSubmitChallengeResponseRequest");
const CaptchaChallengeResponseRequest_1 = require("./CaptchaChallengeResponseRequest");
const ConsentChallengeResponseRequest_1 = require("./ConsentChallengeResponseRequest");
const DummyChallengeResponseRequest_1 = require("./DummyChallengeResponseRequest");
const EmailChallengeResponseRequest_1 = require("./EmailChallengeResponseRequest");
const FrameChallengeResponseRequest_1 = require("./FrameChallengeResponseRequest");
const IdentificationChallengeResponseRequest_1 = require("./IdentificationChallengeResponseRequest");
const IframeLogoutChallengeResponseRequest_1 = require("./IframeLogoutChallengeResponseRequest");
const NativeLogoutChallengeResponseRequest_1 = require("./NativeLogoutChallengeResponseRequest");
const OAuthDeviceCodeChallengeResponseRequest_1 = require("./OAuthDeviceCodeChallengeResponseRequest");
const OAuthDeviceCodeFinishChallengeResponseRequest_1 = require("./OAuthDeviceCodeFinishChallengeResponseRequest");
const PasswordChallengeResponseRequest_1 = require("./PasswordChallengeResponseRequest");
const PlexAuthenticationChallengeResponseRequest_1 = require("./PlexAuthenticationChallengeResponseRequest");
const PromptChallengeResponseRequest_1 = require("./PromptChallengeResponseRequest");
const RedirectChallengeResponseRequest_1 = require("./RedirectChallengeResponseRequest");
const TelegramChallengeResponseRequest_1 = require("./TelegramChallengeResponseRequest");
const UserLoginChallengeResponseRequest_1 = require("./UserLoginChallengeResponseRequest");
function FlowChallengeResponseRequestFromJSON(json) {
    return FlowChallengeResponseRequestFromJSONTyped(json, false);
}
function FlowChallengeResponseRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['component']) {
        case 'ak-provider-iframe-logout':
            return Object.assign({}, (0, IframeLogoutChallengeResponseRequest_1.IframeLogoutChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-provider-iframe-logout' });
        case 'ak-provider-oauth2-device-code':
            return Object.assign({}, (0, OAuthDeviceCodeChallengeResponseRequest_1.OAuthDeviceCodeChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-provider-oauth2-device-code' });
        case 'ak-provider-oauth2-device-code-finish':
            return Object.assign({}, (0, OAuthDeviceCodeFinishChallengeResponseRequest_1.OAuthDeviceCodeFinishChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-provider-oauth2-device-code-finish' });
        case 'ak-provider-saml-native-logout':
            return Object.assign({}, (0, NativeLogoutChallengeResponseRequest_1.NativeLogoutChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-provider-saml-native-logout' });
        case 'ak-source-oauth-apple':
            return Object.assign({}, (0, AppleChallengeResponseRequest_1.AppleChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-source-oauth-apple' });
        case 'ak-source-plex':
            return Object.assign({}, (0, PlexAuthenticationChallengeResponseRequest_1.PlexAuthenticationChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-source-plex' });
        case 'ak-source-telegram':
            return Object.assign({}, (0, TelegramChallengeResponseRequest_1.TelegramChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-source-telegram' });
        case 'ak-stage-authenticator-duo':
            return Object.assign({}, (0, AuthenticatorDuoChallengeResponseRequest_1.AuthenticatorDuoChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-duo' });
        case 'ak-stage-authenticator-email':
            return Object.assign({}, (0, AuthenticatorEmailChallengeResponseRequest_1.AuthenticatorEmailChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-email' });
        case 'ak-stage-authenticator-sms':
            return Object.assign({}, (0, AuthenticatorSMSChallengeResponseRequest_1.AuthenticatorSMSChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-sms' });
        case 'ak-stage-authenticator-static':
            return Object.assign({}, (0, AuthenticatorStaticChallengeResponseRequest_1.AuthenticatorStaticChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-static' });
        case 'ak-stage-authenticator-totp':
            return Object.assign({}, (0, AuthenticatorTOTPChallengeResponseRequest_1.AuthenticatorTOTPChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-totp' });
        case 'ak-stage-authenticator-validate':
            return Object.assign({}, (0, AuthenticatorValidationChallengeResponseRequest_1.AuthenticatorValidationChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-validate' });
        case 'ak-stage-authenticator-webauthn':
            return Object.assign({}, (0, AuthenticatorWebAuthnChallengeResponseRequest_1.AuthenticatorWebAuthnChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-authenticator-webauthn' });
        case 'ak-stage-autosubmit':
            return Object.assign({}, (0, AutoSubmitChallengeResponseRequest_1.AutoSubmitChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-autosubmit' });
        case 'ak-stage-captcha':
            return Object.assign({}, (0, CaptchaChallengeResponseRequest_1.CaptchaChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-captcha' });
        case 'ak-stage-consent':
            return Object.assign({}, (0, ConsentChallengeResponseRequest_1.ConsentChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-consent' });
        case 'ak-stage-dummy':
            return Object.assign({}, (0, DummyChallengeResponseRequest_1.DummyChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-dummy' });
        case 'ak-stage-email':
            return Object.assign({}, (0, EmailChallengeResponseRequest_1.EmailChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-email' });
        case 'ak-stage-identification':
            return Object.assign({}, (0, IdentificationChallengeResponseRequest_1.IdentificationChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-identification' });
        case 'ak-stage-password':
            return Object.assign({}, (0, PasswordChallengeResponseRequest_1.PasswordChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-password' });
        case 'ak-stage-prompt':
            return Object.assign({}, (0, PromptChallengeResponseRequest_1.PromptChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-prompt' });
        case 'ak-stage-user-login':
            return Object.assign({}, (0, UserLoginChallengeResponseRequest_1.UserLoginChallengeResponseRequestFromJSONTyped)(json, true), { component: 'ak-stage-user-login' });
        case 'xak-flow-frame':
            return Object.assign({}, (0, FrameChallengeResponseRequest_1.FrameChallengeResponseRequestFromJSONTyped)(json, true), { component: 'xak-flow-frame' });
        case 'xak-flow-redirect':
            return Object.assign({}, (0, RedirectChallengeResponseRequest_1.RedirectChallengeResponseRequestFromJSONTyped)(json, true), { component: 'xak-flow-redirect' });
        default:
            return json;
    }
}
function FlowChallengeResponseRequestToJSON(json) {
    return FlowChallengeResponseRequestToJSONTyped(json, false);
}
function FlowChallengeResponseRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['component']) {
        case 'ak-provider-iframe-logout':
            return Object.assign({}, (0, IframeLogoutChallengeResponseRequest_1.IframeLogoutChallengeResponseRequestToJSON)(value), { component: 'ak-provider-iframe-logout' });
        case 'ak-provider-oauth2-device-code':
            return Object.assign({}, (0, OAuthDeviceCodeChallengeResponseRequest_1.OAuthDeviceCodeChallengeResponseRequestToJSON)(value), { component: 'ak-provider-oauth2-device-code' });
        case 'ak-provider-oauth2-device-code-finish':
            return Object.assign({}, (0, OAuthDeviceCodeFinishChallengeResponseRequest_1.OAuthDeviceCodeFinishChallengeResponseRequestToJSON)(value), { component: 'ak-provider-oauth2-device-code-finish' });
        case 'ak-provider-saml-native-logout':
            return Object.assign({}, (0, NativeLogoutChallengeResponseRequest_1.NativeLogoutChallengeResponseRequestToJSON)(value), { component: 'ak-provider-saml-native-logout' });
        case 'ak-source-oauth-apple':
            return Object.assign({}, (0, AppleChallengeResponseRequest_1.AppleChallengeResponseRequestToJSON)(value), { component: 'ak-source-oauth-apple' });
        case 'ak-source-plex':
            return Object.assign({}, (0, PlexAuthenticationChallengeResponseRequest_1.PlexAuthenticationChallengeResponseRequestToJSON)(value), { component: 'ak-source-plex' });
        case 'ak-source-telegram':
            return Object.assign({}, (0, TelegramChallengeResponseRequest_1.TelegramChallengeResponseRequestToJSON)(value), { component: 'ak-source-telegram' });
        case 'ak-stage-authenticator-duo':
            return Object.assign({}, (0, AuthenticatorDuoChallengeResponseRequest_1.AuthenticatorDuoChallengeResponseRequestToJSON)(value), { component: 'ak-stage-authenticator-duo' });
        case 'ak-stage-authenticator-email':
            return Object.assign({}, (0, AuthenticatorEmailChallengeResponseRequest_1.AuthenticatorEmailChallengeResponseRequestToJSON)(value), { component: 'ak-stage-authenticator-email' });
        case 'ak-stage-authenticator-sms':
            return Object.assign({}, (0, AuthenticatorSMSChallengeResponseRequest_1.AuthenticatorSMSChallengeResponseRequestToJSON)(value), { component: 'ak-stage-authenticator-sms' });
        case 'ak-stage-authenticator-static':
            return Object.assign({}, (0, AuthenticatorStaticChallengeResponseRequest_1.AuthenticatorStaticChallengeResponseRequestToJSON)(value), { component: 'ak-stage-authenticator-static' });
        case 'ak-stage-authenticator-totp':
            return Object.assign({}, (0, AuthenticatorTOTPChallengeResponseRequest_1.AuthenticatorTOTPChallengeResponseRequestToJSON)(value), { component: 'ak-stage-authenticator-totp' });
        case 'ak-stage-authenticator-validate':
            return Object.assign({}, (0, AuthenticatorValidationChallengeResponseRequest_1.AuthenticatorValidationChallengeResponseRequestToJSON)(value), { component: 'ak-stage-authenticator-validate' });
        case 'ak-stage-authenticator-webauthn':
            return Object.assign({}, (0, AuthenticatorWebAuthnChallengeResponseRequest_1.AuthenticatorWebAuthnChallengeResponseRequestToJSON)(value), { component: 'ak-stage-authenticator-webauthn' });
        case 'ak-stage-autosubmit':
            return Object.assign({}, (0, AutoSubmitChallengeResponseRequest_1.AutoSubmitChallengeResponseRequestToJSON)(value), { component: 'ak-stage-autosubmit' });
        case 'ak-stage-captcha':
            return Object.assign({}, (0, CaptchaChallengeResponseRequest_1.CaptchaChallengeResponseRequestToJSON)(value), { component: 'ak-stage-captcha' });
        case 'ak-stage-consent':
            return Object.assign({}, (0, ConsentChallengeResponseRequest_1.ConsentChallengeResponseRequestToJSON)(value), { component: 'ak-stage-consent' });
        case 'ak-stage-dummy':
            return Object.assign({}, (0, DummyChallengeResponseRequest_1.DummyChallengeResponseRequestToJSON)(value), { component: 'ak-stage-dummy' });
        case 'ak-stage-email':
            return Object.assign({}, (0, EmailChallengeResponseRequest_1.EmailChallengeResponseRequestToJSON)(value), { component: 'ak-stage-email' });
        case 'ak-stage-identification':
            return Object.assign({}, (0, IdentificationChallengeResponseRequest_1.IdentificationChallengeResponseRequestToJSON)(value), { component: 'ak-stage-identification' });
        case 'ak-stage-password':
            return Object.assign({}, (0, PasswordChallengeResponseRequest_1.PasswordChallengeResponseRequestToJSON)(value), { component: 'ak-stage-password' });
        case 'ak-stage-prompt':
            return Object.assign({}, (0, PromptChallengeResponseRequest_1.PromptChallengeResponseRequestToJSON)(value), { component: 'ak-stage-prompt' });
        case 'ak-stage-user-login':
            return Object.assign({}, (0, UserLoginChallengeResponseRequest_1.UserLoginChallengeResponseRequestToJSON)(value), { component: 'ak-stage-user-login' });
        case 'xak-flow-frame':
            return Object.assign({}, (0, FrameChallengeResponseRequest_1.FrameChallengeResponseRequestToJSON)(value), { component: 'xak-flow-frame' });
        case 'xak-flow-redirect':
            return Object.assign({}, (0, RedirectChallengeResponseRequest_1.RedirectChallengeResponseRequestToJSON)(value), { component: 'xak-flow-redirect' });
        default:
            return value;
    }
}
//# sourceMappingURL=FlowChallengeResponseRequest.js.map