/*
 * 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 StatusEnum {
    #[serde(rename = "open")]
    Open,
    #[serde(rename = "partially_filled")]
    PartiallyFilled,
    #[serde(rename = "cancelled")]
    Cancelled,
    #[serde(rename = "cancelled_partially_filled")]
    CancelledPartiallyFilled,
    #[serde(rename = "filled")]
    Filled,
}

impl std::fmt::Display for StatusEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Open => write!(f, "open"),
            Self::PartiallyFilled => write!(f, "partially_filled"),
            Self::Cancelled => write!(f, "cancelled"),
            Self::CancelledPartiallyFilled => write!(f, "cancelled_partially_filled"),
            Self::Filled => write!(f, "filled"),
        }
    }
}

impl Default for StatusEnum {
    fn default() -> StatusEnum {
        Self::Open
    }
}
