/*
 * 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 LockGranularity {
    #[serde(rename = "ByteRange")]
    ByteRange,
    #[serde(rename = "Full")]
    Full,
}

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

impl Default for LockGranularity {
    fn default() -> LockGranularity {
        Self::ByteRange
    }
}
