/*
 * Ethereal Exchange API
 *
 * Ethereal HTTP API for real-time trading, order management, and market data access.
 *
 * The version of the OpenAPI document: 0.1.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// CancelOrderResultDtoResultEnum : Extracted enum for CancelOrderResultDtoResultEnum
/// Extracted enum for CancelOrderResultDtoResultEnum
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CancelOrderResultDtoResultEnum {
    #[serde(rename = "AlreadyCanceled")]
    AlreadyCanceled,
    #[serde(rename = "AlreadyExpired")]
    AlreadyExpired,
    #[serde(rename = "AlreadyFilled")]
    AlreadyFilled,
    #[serde(rename = "NotFound")]
    NotFound,
    #[serde(rename = "Ok")]
    Ok,
    #[serde(rename = "NonceAlreadyUsed")]
    NonceAlreadyUsed,
    #[serde(rename = "Unknown")]
    Unknown,
}

impl std::fmt::Display for CancelOrderResultDtoResultEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::AlreadyCanceled => write!(f, "AlreadyCanceled"),
            Self::AlreadyExpired => write!(f, "AlreadyExpired"),
            Self::AlreadyFilled => write!(f, "AlreadyFilled"),
            Self::NotFound => write!(f, "NotFound"),
            Self::Ok => write!(f, "Ok"),
            Self::NonceAlreadyUsed => write!(f, "NonceAlreadyUsed"),
            Self::Unknown => write!(f, "Unknown"),
        }
    }
}

impl Default for CancelOrderResultDtoResultEnum {
    fn default() -> CancelOrderResultDtoResultEnum {
        Self::AlreadyCanceled
    }
}
