"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.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.instanceOfLoginSource = instanceOfLoginSource;
exports.LoginSourceFromJSON = LoginSourceFromJSON;
exports.LoginSourceFromJSONTyped = LoginSourceFromJSONTyped;
exports.LoginSourceToJSON = LoginSourceToJSON;
exports.LoginSourceToJSONTyped = LoginSourceToJSONTyped;
const LoginChallengeTypes_1 = require("./LoginChallengeTypes");
/**
 * Check if a given object implements the LoginSource interface.
 */
function instanceOfLoginSource(value) {
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('challenge' in value) || value['challenge'] === undefined)
        return false;
    return true;
}
function LoginSourceFromJSON(json) {
    return LoginSourceFromJSONTyped(json, false);
}
function LoginSourceFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'name': json['name'],
        'iconUrl': json['icon_url'] == null ? undefined : json['icon_url'],
        'promoted': json['promoted'] == null ? undefined : json['promoted'],
        'challenge': (0, LoginChallengeTypes_1.LoginChallengeTypesFromJSON)(json['challenge']),
    };
}
function LoginSourceToJSON(json) {
    return LoginSourceToJSONTyped(json, false);
}
function LoginSourceToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'icon_url': value['iconUrl'],
        'promoted': value['promoted'],
        'challenge': (0, LoginChallengeTypes_1.LoginChallengeTypesToJSON)(value['challenge']),
    };
}
//# sourceMappingURL=LoginSource.js.map