/*
 * Ethereal Exchange API
 *
 * Ethereal HTTP API for real-time trading, order management, and market data access.
 *
 * The version of the OpenAPI document: 0.1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

use serde_repr::{Deserialize_repr, Serialize_repr};
/// StopPriceTypeEnum : Extracted enum for StopPriceTypeEnum
/// Extracted enum for StopPriceTypeEnum
#[repr(i64)]
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr,
)]
pub enum StopPriceTypeEnum {
    LAST_PRICE = 0,
    MARK_PRICE = 1,
}

impl std::fmt::Display for StopPriceTypeEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(
            f,
            "{}",
            match self {
                Self::LAST_PRICE => "0",
                Self::MARK_PRICE => "1",
            }
        )
    }
}
impl Default for StopPriceTypeEnum {
    fn default() -> StopPriceTypeEnum {
        Self::LAST_PRICE
    }
}
