/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.2.0
 * 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 ExportedUser {
    #[serde(rename = "email")]
    pub email: String,
    #[serde(rename = "password_hash", skip_serializing_if = "Option::is_none")]
    pub password_hash: Option<String>,
    #[serde(rename = "super_admin")]
    pub super_admin: bool,
    #[serde(rename = "verified")]
    pub verified: 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>,
    #[serde(rename = "first_time_user")]
    pub first_time_user: bool,
    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
}

impl ExportedUser {
    pub fn new(email: String, super_admin: bool, verified: bool, first_time_user: bool) -> ExportedUser {
        ExportedUser {
            email,
            password_hash: None,
            super_admin,
            verified,
            name: None,
            company: None,
            first_time_user,
            username: None,
        }
    }
}

