/*
* authentik
*
* Making authentication simple.
*
* The version of the OpenAPI document: 2024.2.1
* Contact: hello@goauthentik.io
* Generated by: https://openapi-generator.tech
*/
use crate::models;
/// SessionUser : Response for the /user/me endpoint, returns the currently active user (as `user` property) and, if this user is being impersonated, the original user in the `original` property.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SessionUser {
#[serde(rename = "user")]
pub user: Box<models::UserSelf>,
#[serde(rename = "original", skip_serializing_if = "Option::is_none")]
pub original: Option<Box<models::UserSelf>>,
}
impl SessionUser {
/// Response for the /user/me endpoint, returns the currently active user (as `user` property) and, if this user is being impersonated, the original user in the `original` property.
pub fn new(user: models::UserSelf) -> SessionUser {
SessionUser {
user: Box::new(user),
original: None,
}
}
}