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

/// TriggeredEnum : Extracted enum for TriggeredEnum
/// Extracted enum for TriggeredEnum
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TriggeredEnum {
    #[serde(rename = "NOT_TRIGGERED")]
    NotTriggered,
    #[serde(rename = "TRIGGERED")]
    Triggered,
    #[serde(rename = "STOP_ORDER_TRIGGERED")]
    StopOrderTriggered,
    #[serde(rename = "OCO_ORDER_TRIGGERED")]
    OcoOrderTriggered,
    #[serde(rename = "OTO_ORDER_TRIGGERED")]
    OtoOrderTriggered,
}

impl std::fmt::Display for TriggeredEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::NotTriggered => write!(f, "NOT_TRIGGERED"),
            Self::Triggered => write!(f, "TRIGGERED"),
            Self::StopOrderTriggered => write!(f, "STOP_ORDER_TRIGGERED"),
            Self::OcoOrderTriggered => write!(f, "OCO_ORDER_TRIGGERED"),
            Self::OtoOrderTriggered => write!(f, "OTO_ORDER_TRIGGERED"),
        }
    }
}

impl Default for TriggeredEnum {
    fn default() -> TriggeredEnum {
        Self::NotTriggered
    }
}
