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};

/// TelegramChallengeResponseRequest : Base class for all challenge responses
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TelegramChallengeResponseRequest {
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "first_name", skip_serializing_if = "Option::is_none")]
    pub first_name: Option<String>,
    #[serde(rename = "last_name", skip_serializing_if = "Option::is_none")]
    pub last_name: Option<String>,
    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
    #[serde(rename = "photo_url", skip_serializing_if = "Option::is_none")]
    pub photo_url: Option<String>,
    #[serde(rename = "auth_date")]
    pub auth_date: i32,
    #[serde(rename = "hash")]
    pub hash: String,
    #[serde(rename = "component", skip_serializing_if = "Option::is_none")]
    pub component: Option<String>,
}

impl TelegramChallengeResponseRequest {
    /// Base class for all challenge responses
    pub fn new(id: i32, auth_date: i32, hash: String) -> TelegramChallengeResponseRequest {
        TelegramChallengeResponseRequest {
            id,
            first_name: None,
            last_name: None,
            username: None,
            photo_url: None,
            auth_date,
            hash,
            component: None,
        }
    }
}