authentik_client/models/
patched_telegram_source_request.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PatchedTelegramSourceRequest {
17 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
19 pub name: Option<String>,
20 #[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 #[serde(rename = "promoted", skip_serializing_if = "Option::is_none")]
27 pub promoted: Option<bool>,
28 #[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 #[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 #[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 #[serde(rename = "bot_username", skip_serializing_if = "Option::is_none")]
59 pub bot_username: Option<String>,
60 #[serde(rename = "bot_token", skip_serializing_if = "Option::is_none")]
62 pub bot_token: Option<String>,
63 #[serde(rename = "request_message_access", skip_serializing_if = "Option::is_none")]
65 pub request_message_access: Option<bool>,
66 #[serde(rename = "pre_authentication_flow", skip_serializing_if = "Option::is_none")]
68 pub pre_authentication_flow: Option<uuid::Uuid>,
69}
70
71impl PatchedTelegramSourceRequest {
72 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}