/*
 * 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 CreateKubernetesClusterRequest {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "project")]
    pub project: String,
    #[serde(rename = "region")]
    pub region: String,
    #[serde(rename = "ssh_keys")]
    pub ssh_keys: Vec<String>,
    #[serde(rename = "instance_type")]
    pub instance_type: String,
    #[serde(rename = "k8s_version", skip_serializing_if = "Option::is_none")]
    pub k8s_version: Option<K8sVersion>,
    #[serde(rename = "image_version", skip_serializing_if = "Option::is_none")]
    pub image_version: Option<String>,
}

impl CreateKubernetesClusterRequest {
    pub fn new(
        name: String,
        project: String,
        region: String,
        ssh_keys: Vec<String>,
        instance_type: String,
    ) -> CreateKubernetesClusterRequest {
        CreateKubernetesClusterRequest {
            name,
            project,
            region,
            ssh_keys,
            instance_type,
            k8s_version: None,
            image_version: None,
        }
    }
}
///
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
)]
pub enum K8sVersion {
    #[serde(rename = "1.34")]
    #[default]
    Variant134,
    #[serde(rename = "1.29")]
    Variant129,
}
