authentik-client 2026.2.2-rc1

Making authentication simple.
Documentation
/*
 * authentik
 *
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.2-rc1
 * Contact: hello@goauthentik.io
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// LoginSource : Serializer for Login buttons of sources
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LoginSource {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(
        rename = "icon_url",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub icon_url: Option<Option<String>>,
    #[serde(rename = "promoted", skip_serializing_if = "Option::is_none")]
    pub promoted: Option<bool>,
    #[serde(rename = "challenge")]
    pub challenge: models::LoginChallengeTypes,
}

impl LoginSource {
    /// Serializer for Login buttons of sources
    pub fn new(name: String, challenge: models::LoginChallengeTypes) -> LoginSource {
        LoginSource {
            name,
            icon_url: None,
            promoted: None,
            challenge,
        }
    }
}