/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 4b3f595
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// Architecture : CPU architecture compatible with the Image.  | CPU architecture compatible with the ISO.  Null indicates no restriction on the architecture (wildcard).  | CPU architecture of the Server Type.
/// CPU architecture compatible with the Image.  | CPU architecture compatible with the ISO.  Null indicates no restriction on the architecture (wildcard).  | CPU architecture of the Server Type.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Architecture {
    #[serde(rename = "arm")]
    Arm,
    #[serde(rename = "x86")]
    X86,
}

impl std::fmt::Display for Architecture {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Arm => write!(f, "arm"),
            Self::X86 => write!(f, "x86"),
        }
    }
}

impl Default for Architecture {
    fn default() -> Architecture {
        Self::Arm
    }
}
