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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TelegramAuthRequest {
    #[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,
}

impl TelegramAuthRequest {
    pub fn new(id: i32, auth_date: i32, hash: String) -> TelegramAuthRequest {
        TelegramAuthRequest {
            id,
            first_name: None,
            last_name: None,
            username: None,
            photo_url: None,
            auth_date,
            hash,
        }
    }
}