authentik_rust/models/
patched_user_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/// PatchedUserRequest : User Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PatchedUserRequest {
16    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
17    pub username: Option<String>,
18    /// User's display name.
19    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
20    pub name: Option<String>,
21    /// Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
22    #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
23    pub is_active: Option<bool>,
24    #[serde(rename = "last_login", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub last_login: Option<Option<String>>,
26    #[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
27    pub groups: Option<Vec<uuid::Uuid>>,
28    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
29    pub email: Option<String>,
30    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
31    pub attributes: Option<std::collections::HashMap<String, serde_json::Value>>,
32    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
33    pub path: Option<String>,
34    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
35    pub r#type: Option<models::UserTypeEnum>,
36}
37
38impl PatchedUserRequest {
39    /// User Serializer
40    pub fn new() -> PatchedUserRequest {
41        PatchedUserRequest {
42            username: None,
43            name: None,
44            is_active: None,
45            last_login: None,
46            groups: None,
47            email: None,
48            attributes: None,
49            path: None,
50            r#type: None,
51        }
52    }
53}
54