/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.2
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateUserGloballyRequest {
    #[serde(rename = "email")]
    pub email: String,
    #[serde(rename = "password")]
    pub password: String,
    #[serde(rename = "super_admin")]
    pub super_admin: bool,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "company", skip_serializing_if = "Option::is_none")]
    pub company: Option<String>,
    /// Skip sending email notifications to the user
    #[serde(rename = "skip_email", skip_serializing_if = "Option::is_none")]
    pub skip_email: Option<bool>,
}

impl CreateUserGloballyRequest {
    pub fn new(email: String, password: String, super_admin: bool) -> CreateUserGloballyRequest {
        CreateUserGloballyRequest {
            email,
            password,
            super_admin,
            name: None,
            company: None,
            skip_email: None,
        }
    }
}

