/*
 * 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};

/// SignerDtoOrderStatus : Extracted enum for SignerDtoOrderStatus
/// Extracted enum for SignerDtoOrderStatus
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SignerDtoOrderStatus {
    #[serde(rename = "PENDING")]
    Pending,
    #[serde(rename = "ACTIVE")]
    Active,
    #[serde(rename = "PENDING_REVOKE")]
    PendingRevoke,
    #[serde(rename = "REVOKED")]
    Revoked,
    #[serde(rename = "REJECTED")]
    Rejected,
}

impl std::fmt::Display for SignerDtoOrderStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Pending => write!(f, "PENDING"),
            Self::Active => write!(f, "ACTIVE"),
            Self::PendingRevoke => write!(f, "PENDING_REVOKE"),
            Self::Revoked => write!(f, "REVOKED"),
            Self::Rejected => write!(f, "REJECTED"),
        }
    }
}

impl Default for SignerDtoOrderStatus {
    fn default() -> SignerDtoOrderStatus {
        Self::Pending
    }
}
