Skip to main content

authentik_client/models/
patched_user_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.8.6
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PatchedUserRequest : User Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PatchedUserRequest {
17    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
18    pub username: Option<String>,
19    /// User's display name.
20    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    /// Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
23    #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
24    pub is_active: Option<bool>,
25    #[serde(
26        rename = "last_login",
27        default,
28        with = "::serde_with::rust::double_option",
29        skip_serializing_if = "Option::is_none"
30    )]
31    pub last_login: Option<Option<String>>,
32    #[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
33    pub groups: Option<Vec<uuid::Uuid>>,
34    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
35    pub email: Option<String>,
36    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
37    pub attributes: Option<std::collections::HashMap<String, serde_json::Value>>,
38    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
39    pub path: Option<String>,
40    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
41    pub r#type: Option<models::UserTypeEnum>,
42}
43
44impl PatchedUserRequest {
45    /// User Serializer
46    pub fn new() -> PatchedUserRequest {
47        PatchedUserRequest {
48            username: None,
49            name: None,
50            is_active: None,
51            last_login: None,
52            groups: None,
53            email: None,
54            attributes: None,
55            path: None,
56            r#type: None,
57        }
58    }
59}