Skip to main content

authentik_client/models/
telegram_auth_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2026.2.0
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TelegramAuthRequest {
16    #[serde(rename = "id")]
17    pub id: i32,
18    #[serde(rename = "first_name", skip_serializing_if = "Option::is_none")]
19    pub first_name: Option<String>,
20    #[serde(rename = "last_name", skip_serializing_if = "Option::is_none")]
21    pub last_name: Option<String>,
22    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
23    pub username: Option<String>,
24    #[serde(rename = "photo_url", skip_serializing_if = "Option::is_none")]
25    pub photo_url: Option<String>,
26    #[serde(rename = "auth_date")]
27    pub auth_date: i32,
28    #[serde(rename = "hash")]
29    pub hash: String,
30}
31
32impl TelegramAuthRequest {
33    pub fn new(id: i32, auth_date: i32, hash: String) -> TelegramAuthRequest {
34        TelegramAuthRequest {
35            id,
36            first_name: None,
37            last_name: None,
38            username: None,
39            photo_url: None,
40            auth_date,
41            hash,
42        }
43    }
44}