/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2025.6.3 * 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 { mapValues } from '../runtime'; import type { LoginChallengeTypes } from './LoginChallengeTypes'; import { LoginChallengeTypesFromJSON, LoginChallengeTypesFromJSONTyped, LoginChallengeTypesToJSON, LoginChallengeTypesToJSONTyped, } from './LoginChallengeTypes'; /** * Serializer for Login buttons of sources * @export * @interface LoginSource */ export interface LoginSource { /** * * @type {string} * @memberof LoginSource */ name: string; /** * * @type {string} * @memberof LoginSource */ iconUrl?: string | null; /** * * @type {LoginChallengeTypes} * @memberof LoginSource */ challenge: LoginChallengeTypes; } /** * Check if a given object implements the LoginSource interface. */ export function instanceOfLoginSource(value: object): value is LoginSource { if (!('name' in value) || value['name'] === undefined) return false; if (!('challenge' in value) || value['challenge'] === undefined) return false; return true; } export function LoginSourceFromJSON(json: any): LoginSource { return LoginSourceFromJSONTyped(json, false); } export function LoginSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginSource { if (json == null) { return json; } return { 'name': json['name'], 'iconUrl': json['icon_url'] == null ? undefined : json['icon_url'], 'challenge': LoginChallengeTypesFromJSON(json['challenge']), }; } export function LoginSourceToJSON(json: any): LoginSource { return LoginSourceToJSONTyped(json, false); } export function LoginSourceToJSONTyped(value?: LoginSource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'icon_url': value['iconUrl'], 'challenge': LoginChallengeTypesToJSON(value['challenge']), }; }