/*
 * 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 TypeEnum {
    #[serde(rename = "perpetual")]
    Perpetual,
    #[serde(rename = "future")]
    Future,
    #[serde(rename = "option")]
    Option,
    #[serde(rename = "combination")]
    Combination,
}

impl std::fmt::Display for TypeEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Perpetual => write!(f, "perpetual"),
            Self::Future => write!(f, "future"),
            Self::Option => write!(f, "option"),
            Self::Combination => write!(f, "combination"),
        }
    }
}

impl Default for TypeEnum {
    fn default() -> TypeEnum {
        Self::Perpetual
    }
}
