/*
 * 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 TradeTypeEnum {
    #[serde(rename = "normal")]
    Normal,
    #[serde(rename = "block")]
    Block,
    #[serde(rename = "combo")]
    Combo,
    #[serde(rename = "amend")]
    Amend,
    #[serde(rename = "delete")]
    Delete,
    #[serde(rename = "internal_transfer")]
    InternalTransfer,
    #[serde(rename = "expiration")]
    Expiration,
    #[serde(rename = "daily_mark")]
    DailyMark,
    #[serde(rename = "rfq")]
    Rfq,
    #[serde(rename = "liquidation")]
    Liquidation,
}

impl std::fmt::Display for TradeTypeEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Normal => write!(f, "normal"),
            Self::Block => write!(f, "block"),
            Self::Combo => write!(f, "combo"),
            Self::Amend => write!(f, "amend"),
            Self::Delete => write!(f, "delete"),
            Self::InternalTransfer => write!(f, "internal_transfer"),
            Self::Expiration => write!(f, "expiration"),
            Self::DailyMark => write!(f, "daily_mark"),
            Self::Rfq => write!(f, "rfq"),
            Self::Liquidation => write!(f, "liquidation"),
        }
    }
}

impl Default for TradeTypeEnum {
    fn default() -> TradeTypeEnum {
        Self::Normal
    }
}
