/*
 * 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 TeammateResponse {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "fid")]
    pub fid: String,
    #[serde(rename = "user_name", skip_serializing_if = "Option::is_none")]
    pub user_name: Option<String>,
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    #[serde(rename = "organization_role", skip_serializing_if = "Option::is_none")]
    pub organization_role: Option<String>,
    #[serde(rename = "project_ids")]
    pub project_ids: Vec<String>,
    #[serde(rename = "deactivated_at", skip_serializing_if = "Option::is_none")]
    pub deactivated_at: Option<String>,
}

impl TeammateResponse {
    pub fn new(id: String, fid: String, project_ids: Vec<String>) -> TeammateResponse {
        TeammateResponse {
            id,
            fid,
            user_name: None,
            email: None,
            organization_role: None,
            project_ids,
            deactivated_at: None,
        }
    }
}
