/*
 * 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 CreateSshKeyRequest {
    #[serde(rename = "project")]
    pub project: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")]
    pub public_key: Option<String>,
    #[serde(rename = "required", skip_serializing_if = "Option::is_none")]
    pub required: Option<bool>,
}

impl CreateSshKeyRequest {
    pub fn new(project: String, name: String) -> CreateSshKeyRequest {
        CreateSshKeyRequest {
            project,
            name,
            public_key: None,
            required: None,
        }
    }
}
