/*
 * Mithril
 *
 * Mithril Compute API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MeResponse {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "fid")]
    pub fid: String,
    #[serde(rename = "email")]
    pub email: String,
    #[serde(rename = "user_name", skip_serializing_if = "Option::is_none")]
    pub user_name: Option<String>,
    #[serde(rename = "organization_id")]
    pub organization_id: String,
    #[serde(rename = "organization_role", skip_serializing_if = "Option::is_none")]
    pub organization_role: Option<String>,
}

impl MeResponse {
    pub fn new(id: String, fid: String, email: String, organization_id: String) -> MeResponse {
        MeResponse {
            id,
            fid,
            email,
            user_name: None,
            organization_id,
            organization_role: None,
        }
    }
}
