authentik_rust/models/
user_setting.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/// UserSetting : Serializer for User settings for stages and sources
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UserSetting {
16    #[serde(rename = "object_uid")]
17    pub object_uid: String,
18    #[serde(rename = "component")]
19    pub component: String,
20    #[serde(rename = "title")]
21    pub title: String,
22    #[serde(rename = "configure_url", skip_serializing_if = "Option::is_none")]
23    pub configure_url: Option<String>,
24    #[serde(rename = "icon_url", skip_serializing_if = "Option::is_none")]
25    pub icon_url: Option<String>,
26}
27
28impl UserSetting {
29    /// Serializer for User settings for stages and sources
30    pub fn new(object_uid: String, component: String, title: String) -> UserSetting {
31        UserSetting {
32            object_uid,
33            component,
34            title,
35            configure_url: None,
36            icon_url: None,
37        }
38    }
39}
40