/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.0.0-rc.3
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateUserRequest {
    #[serde(rename = "display_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<Option<String>>,
    #[serde(rename = "email")]
    pub email: String,
    #[serde(rename = "is_admin", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub is_admin: Option<Option<bool>>,
    #[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub password: Option<Option<String>>,
    #[serde(rename = "username")]
    pub username: String,
}

impl CreateUserRequest {
    pub fn new(email: String, username: String) -> CreateUserRequest {
        CreateUserRequest {
            display_name: None,
            email,
            is_admin: None,
            password: None,
            username,
        }
    }
}

