harbor-api 2.0.0

These APIs provide services for manipulating Harbor project.
Documentation
/*
 * Harbor API
 *
 * These APIs provide services for manipulating Harbor project.
 *
 * The version of the OpenAPI document: 2.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserResp {
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    #[serde(rename = "realname", skip_serializing_if = "Option::is_none")]
    pub realname: Option<String>,
    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
    pub comment: Option<String>,
    #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
    pub user_id: Option<i32>,
    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
    #[serde(rename = "sysadmin_flag", skip_serializing_if = "Option::is_none")]
    pub sysadmin_flag: Option<bool>,
    /// indicate the admin privilege is grant by authenticator (LDAP), is always false unless it is the current login user
    #[serde(rename = "admin_role_in_auth", skip_serializing_if = "Option::is_none")]
    pub admin_role_in_auth: Option<bool>,
    #[serde(rename = "oidc_user_meta", skip_serializing_if = "Option::is_none")]
    pub oidc_user_meta: Option<Box<models::OidcUserInfo>>,
    /// The creation time of the user.
    #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
    pub creation_time: Option<String>,
    /// The update time of the user.
    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
}

impl UserResp {
    pub fn new() -> UserResp {
        UserResp {
            email: None,
            realname: None,
            comment: None,
            user_id: None,
            username: None,
            sysadmin_flag: None,
            admin_role_in_auth: None,
            oidc_user_meta: None,
            creation_time: None,
            update_time: None,
        }
    }
}