"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc5
 * 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.instanceOfIdentificationChallenge = instanceOfIdentificationChallenge;
exports.IdentificationChallengeFromJSON = IdentificationChallengeFromJSON;
exports.IdentificationChallengeFromJSONTyped = IdentificationChallengeFromJSONTyped;
exports.IdentificationChallengeToJSON = IdentificationChallengeToJSON;
exports.IdentificationChallengeToJSONTyped = IdentificationChallengeToJSONTyped;
const ContextualFlowInfo_1 = require("./ContextualFlowInfo");
const FlowDesignationEnum_1 = require("./FlowDesignationEnum");
const LoginSource_1 = require("./LoginSource");
const CaptchaChallenge_1 = require("./CaptchaChallenge");
/**
 * Check if a given object implements the IdentificationChallenge interface.
 */
function instanceOfIdentificationChallenge(value) {
    if (!('userFields' in value) || value['userFields'] === undefined)
        return false;
    if (!('passwordFields' in value) || value['passwordFields'] === undefined)
        return false;
    if (!('flowDesignation' in value) || value['flowDesignation'] === undefined)
        return false;
    if (!('primaryAction' in value) || value['primaryAction'] === undefined)
        return false;
    if (!('showSourceLabels' in value) || value['showSourceLabels'] === undefined)
        return false;
    return true;
}
function IdentificationChallengeFromJSON(json) {
    return IdentificationChallengeFromJSONTyped(json, false);
}
function IdentificationChallengeFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'flowInfo': json['flow_info'] == null ? undefined : (0, ContextualFlowInfo_1.ContextualFlowInfoFromJSON)(json['flow_info']),
        'component': json['component'] == null ? undefined : json['component'],
        'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'],
        'userFields': json['user_fields'] == null ? null : json['user_fields'],
        'pendingUserIdentifier': json['pending_user_identifier'] == null ? undefined : json['pending_user_identifier'],
        'passwordFields': json['password_fields'],
        'allowShowPassword': json['allow_show_password'] == null ? undefined : json['allow_show_password'],
        'applicationPre': json['application_pre'] == null ? undefined : json['application_pre'],
        'flowDesignation': (0, FlowDesignationEnum_1.FlowDesignationEnumFromJSON)(json['flow_designation']),
        'captchaStage': json['captcha_stage'] == null ? undefined : (0, CaptchaChallenge_1.CaptchaChallengeFromJSON)(json['captcha_stage']),
        'enrollUrl': json['enroll_url'] == null ? undefined : json['enroll_url'],
        'recoveryUrl': json['recovery_url'] == null ? undefined : json['recovery_url'],
        'passwordlessUrl': json['passwordless_url'] == null ? undefined : json['passwordless_url'],
        'primaryAction': json['primary_action'],
        'sources': json['sources'] == null ? undefined : (json['sources'].map(LoginSource_1.LoginSourceFromJSON)),
        'showSourceLabels': json['show_source_labels'],
        'enableRememberMe': json['enable_remember_me'] == null ? undefined : json['enable_remember_me'],
        'passkeyChallenge': json['passkey_challenge'] == null ? undefined : json['passkey_challenge'],
    };
}
function IdentificationChallengeToJSON(json) {
    return IdentificationChallengeToJSONTyped(json, false);
}
function IdentificationChallengeToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'flow_info': (0, ContextualFlowInfo_1.ContextualFlowInfoToJSON)(value['flowInfo']),
        'component': value['component'],
        'response_errors': value['responseErrors'],
        'user_fields': value['userFields'],
        'pending_user_identifier': value['pendingUserIdentifier'],
        'password_fields': value['passwordFields'],
        'allow_show_password': value['allowShowPassword'],
        'application_pre': value['applicationPre'],
        'flow_designation': (0, FlowDesignationEnum_1.FlowDesignationEnumToJSON)(value['flowDesignation']),
        'captcha_stage': (0, CaptchaChallenge_1.CaptchaChallengeToJSON)(value['captchaStage']),
        'enroll_url': value['enrollUrl'],
        'recovery_url': value['recoveryUrl'],
        'passwordless_url': value['passwordlessUrl'],
        'primary_action': value['primaryAction'],
        'sources': value['sources'] == null ? undefined : (value['sources'].map(LoginSource_1.LoginSourceToJSON)),
        'show_source_labels': value['showSourceLabels'],
        'enable_remember_me': value['enableRememberMe'],
        'passkey_challenge': value['passkeyChallenge'],
    };
}
//# sourceMappingURL=IdentificationChallenge.js.map