/*
 * 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 ChangeReasonEnum {
    #[serde(rename = "existing")]
    Existing,
    #[serde(rename = "insert")]
    Insert,
    #[serde(rename = "amend")]
    Amend,
    #[serde(rename = "cancel")]
    Cancel,
    #[serde(rename = "fill")]
    Fill,
}

impl std::fmt::Display for ChangeReasonEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Existing => write!(f, "existing"),
            Self::Insert => write!(f, "insert"),
            Self::Amend => write!(f, "amend"),
            Self::Cancel => write!(f, "cancel"),
            Self::Fill => write!(f, "fill"),
        }
    }
}

impl Default for ChangeReasonEnum {
    fn default() -> ChangeReasonEnum {
        Self::Existing
    }
}
