/*
 * 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 ImageVersionModel {
    #[serde(rename = "image_version_fid")]
    pub image_version_fid: String,
    #[serde(rename = "image_version_name")]
    pub image_version_name: String,
    #[serde(rename = "os")]
    pub os: String,
    #[serde(rename = "kernel")]
    pub kernel: String,
    #[serde(rename = "stable")]
    pub stable: bool,
    #[serde(rename = "supported_regions")]
    pub supported_regions: Vec<String>,
    #[serde(rename = "deactivated_at", skip_serializing_if = "Option::is_none")]
    pub deactivated_at: Option<String>,
    #[serde(rename = "nvidia_driver", skip_serializing_if = "Option::is_none")]
    pub nvidia_driver: Option<String>,
    #[serde(rename = "cuda", skip_serializing_if = "Option::is_none")]
    pub cuda: Option<String>,
    #[serde(rename = "cuda_toolkit", skip_serializing_if = "Option::is_none")]
    pub cuda_toolkit: Option<String>,
    #[serde(
        rename = "nvidia_container_toolkit",
        skip_serializing_if = "Option::is_none"
    )]
    pub nvidia_container_toolkit: Option<String>,
    #[serde(rename = "packages", skip_serializing_if = "Option::is_none")]
    pub packages: Option<String>,
}

impl ImageVersionModel {
    pub fn new(
        image_version_fid: String,
        image_version_name: String,
        os: String,
        kernel: String,
        stable: bool,
        supported_regions: Vec<String>,
    ) -> ImageVersionModel {
        ImageVersionModel {
            image_version_fid,
            image_version_name,
            os,
            kernel,
            stable,
            supported_regions,
            deactivated_at: None,
            nvidia_driver: None,
            cuda: None,
            cuda_toolkit: None,
            nvidia_container_toolkit: None,
            packages: None,
        }
    }
}
