authentik_rust/models/
patched_settings_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// PatchedSettingsRequest : Settings Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PatchedSettingsRequest {
16    /// Configure how authentik should show avatars for users.
17    #[serde(rename = "avatars", skip_serializing_if = "Option::is_none")]
18    pub avatars: Option<String>,
19    /// Enable the ability for users to change their name.
20    #[serde(rename = "default_user_change_name", skip_serializing_if = "Option::is_none")]
21    pub default_user_change_name: Option<bool>,
22    /// Enable the ability for users to change their email address.
23    #[serde(rename = "default_user_change_email", skip_serializing_if = "Option::is_none")]
24    pub default_user_change_email: Option<bool>,
25    /// Enable the ability for users to change their username.
26    #[serde(rename = "default_user_change_username", skip_serializing_if = "Option::is_none")]
27    pub default_user_change_username: Option<bool>,
28    /// Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2).
29    #[serde(rename = "event_retention", skip_serializing_if = "Option::is_none")]
30    pub event_retention: Option<String>,
31    /// The option configures the footer links on the flow executor pages.
32    #[serde(rename = "footer_links", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub footer_links: Option<Option<serde_json::Value>>,
34    /// When enabled, all the events caused by a user will be deleted upon the user's deletion.
35    #[serde(rename = "gdpr_compliance", skip_serializing_if = "Option::is_none")]
36    pub gdpr_compliance: Option<bool>,
37    /// Globally enable/disable impersonation.
38    #[serde(rename = "impersonation", skip_serializing_if = "Option::is_none")]
39    pub impersonation: Option<bool>,
40}
41
42impl PatchedSettingsRequest {
43    /// Settings Serializer
44    pub fn new() -> PatchedSettingsRequest {
45        PatchedSettingsRequest {
46            avatars: None,
47            default_user_change_name: None,
48            default_user_change_email: None,
49            default_user_change_username: None,
50            event_retention: None,
51            footer_links: None,
52            gdpr_compliance: None,
53            impersonation: None,
54        }
55    }
56}
57