/*
 * 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 CoreSchedulingMode {
    #[serde(rename = "Vm")]
    Vm,
    #[serde(rename = "Vcpu")]
    Vcpu,
    #[serde(rename = "Off")]
    Off,
}

impl std::fmt::Display for CoreSchedulingMode {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Vm => write!(f, "Vm"),
            Self::Vcpu => write!(f, "Vcpu"),
            Self::Off => write!(f, "Off"),
        }
    }
}

impl Default for CoreSchedulingMode {
    fn default() -> CoreSchedulingMode {
        Self::Vm
    }
}
