/*
 * 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 MemoryRestoreMode {
    #[serde(rename = "Copy")]
    Copy,
    #[serde(rename = "OnDemand")]
    OnDemand,
}

impl std::fmt::Display for MemoryRestoreMode {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Copy => write!(f, "Copy"),
            Self::OnDemand => write!(f, "OnDemand"),
        }
    }
}

impl Default for MemoryRestoreMode {
    fn default() -> MemoryRestoreMode {
        Self::Copy
    }
}
