/*
 * Cloud Hypervisor API
 *
 * Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
 *
 * The version of the OpenAPI document: 0.3.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ImageType {
    #[serde(rename = "FixedVhd")]
    FixedVhd,
    #[serde(rename = "Qcow2")]
    Qcow2,
    #[serde(rename = "Raw")]
    Raw,
    #[serde(rename = "Vhdx")]
    Vhdx,
    #[serde(rename = "Unknown")]
    Unknown,
}

impl std::fmt::Display for ImageType {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::FixedVhd => write!(f, "FixedVhd"),
            Self::Qcow2 => write!(f, "Qcow2"),
            Self::Raw => write!(f, "Raw"),
            Self::Vhdx => write!(f, "Vhdx"),
            Self::Unknown => write!(f, "Unknown"),
        }
    }
}

impl Default for ImageType {
    fn default() -> ImageType {
        Self::FixedVhd
    }
}
