/*
 * Websocket Subscription Schemas
 *
 * Schema definitions Websocket API subscriptions for Thalex exchange.
 *
 * The version of the OpenAPI document: 1.0.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 ConditionalOrderStatusEnum {
    #[serde(rename = "created")]
    Created,
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "converted")]
    Converted,
    #[serde(rename = "rejected")]
    Rejected,
    #[serde(rename = "cancel requested")]
    CancelRequested,
    #[serde(rename = "cancelled")]
    Cancelled,
}

impl std::fmt::Display for ConditionalOrderStatusEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Created => write!(f, "created"),
            Self::Active => write!(f, "active"),
            Self::Converted => write!(f, "converted"),
            Self::Rejected => write!(f, "rejected"),
            Self::CancelRequested => write!(f, "cancel requested"),
            Self::Cancelled => write!(f, "cancelled"),
        }
    }
}

impl Default for ConditionalOrderStatusEnum {
    fn default() -> ConditionalOrderStatusEnum {
        Self::Created
    }
}
