Skip to main content

authentik_client/models/
patched_telegram_source_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.12.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PatchedTelegramSourceRequest : Source Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PatchedTelegramSourceRequest {
17    /// Source's display Name.
18    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
19    pub name: Option<String>,
20    /// Internal source name, used in URLs.
21    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
22    pub slug: Option<String>,
23    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
24    pub enabled: Option<bool>,
25    /// When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon.
26    #[serde(rename = "promoted", skip_serializing_if = "Option::is_none")]
27    pub promoted: Option<bool>,
28    /// Flow to use when authenticating existing users.
29    #[serde(
30        rename = "authentication_flow",
31        default,
32        with = "::serde_with::rust::double_option",
33        skip_serializing_if = "Option::is_none"
34    )]
35    pub authentication_flow: Option<Option<uuid::Uuid>>,
36    /// Flow to use when enrolling new users.
37    #[serde(
38        rename = "enrollment_flow",
39        default,
40        with = "::serde_with::rust::double_option",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub enrollment_flow: Option<Option<uuid::Uuid>>,
44    #[serde(rename = "user_property_mappings", skip_serializing_if = "Option::is_none")]
45    pub user_property_mappings: Option<Vec<uuid::Uuid>>,
46    #[serde(rename = "group_property_mappings", skip_serializing_if = "Option::is_none")]
47    pub group_property_mappings: Option<Vec<uuid::Uuid>>,
48    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
49    pub policy_engine_mode: Option<models::PolicyEngineMode>,
50    /// How the source determines if an existing user should be authenticated or a new user enrolled.
51    #[serde(rename = "user_matching_mode", skip_serializing_if = "Option::is_none")]
52    pub user_matching_mode: Option<models::UserMatchingModeEnum>,
53    #[serde(rename = "user_path_template", skip_serializing_if = "Option::is_none")]
54    pub user_path_template: Option<String>,
55    #[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
56    pub icon: Option<String>,
57    /// Telegram bot username
58    #[serde(rename = "bot_username", skip_serializing_if = "Option::is_none")]
59    pub bot_username: Option<String>,
60    /// Telegram bot token
61    #[serde(rename = "bot_token", skip_serializing_if = "Option::is_none")]
62    pub bot_token: Option<String>,
63    /// Request access to send messages from your bot.
64    #[serde(rename = "request_message_access", skip_serializing_if = "Option::is_none")]
65    pub request_message_access: Option<bool>,
66    /// Flow used before authentication.
67    #[serde(rename = "pre_authentication_flow", skip_serializing_if = "Option::is_none")]
68    pub pre_authentication_flow: Option<uuid::Uuid>,
69}
70
71impl PatchedTelegramSourceRequest {
72    /// Source Serializer
73    pub fn new() -> PatchedTelegramSourceRequest {
74        PatchedTelegramSourceRequest {
75            name: None,
76            slug: None,
77            enabled: None,
78            promoted: None,
79            authentication_flow: None,
80            enrollment_flow: None,
81            user_property_mappings: None,
82            group_property_mappings: None,
83            policy_engine_mode: None,
84            user_matching_mode: None,
85            user_path_template: None,
86            icon: None,
87            bot_username: None,
88            bot_token: None,
89            request_message_access: None,
90            pre_authentication_flow: None,
91        }
92    }
93}