/*
 * 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 ConsoleMode {
    #[serde(rename = "Off")]
    Off,
    #[serde(rename = "Pty")]
    Pty,
    #[serde(rename = "Tty")]
    Tty,
    #[serde(rename = "File")]
    File,
    #[serde(rename = "Socket")]
    Socket,
    #[serde(rename = "Null")]
    Null,
}

impl std::fmt::Display for ConsoleMode {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Off => write!(f, "Off"),
            Self::Pty => write!(f, "Pty"),
            Self::Tty => write!(f, "Tty"),
            Self::File => write!(f, "File"),
            Self::Socket => write!(f, "Socket"),
            Self::Null => write!(f, "Null"),
        }
    }
}

impl Default for ConsoleMode {
    fn default() -> ConsoleMode {
        Self::Off
    }
}
