authentik-client 2026.2.2-rc2

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

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

/// TelegramLoginChallenge : Base login challenge for Identification stage
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TelegramLoginChallenge {
    #[serde(rename = "flow_info", skip_serializing_if = "Option::is_none")]
    pub flow_info: Option<models::ContextualFlowInfo>,
    #[serde(rename = "component", skip_serializing_if = "Option::is_none")]
    pub component: Option<String>,
    #[serde(rename = "response_errors", skip_serializing_if = "Option::is_none")]
    pub response_errors: Option<std::collections::HashMap<String, Vec<models::ErrorDetail>>>,
    /// Telegram bot username
    #[serde(rename = "bot_username")]
    pub bot_username: String,
    #[serde(rename = "request_message_access")]
    pub request_message_access: bool,
}

impl TelegramLoginChallenge {
    /// Base login challenge for Identification stage
    pub fn new(bot_username: String, request_message_access: bool) -> TelegramLoginChallenge {
        TelegramLoginChallenge {
            flow_info: None,
            component: None,
            response_errors: None,
            bot_username,
            request_message_access,
        }
    }
}