/*
 * 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};

/// TooManyRequestsDtoOrderType : Extracted enum for TooManyRequestsDtoOrderType
/// Extracted enum for TooManyRequestsDtoOrderType
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TooManyRequestsDtoOrderType {
    #[serde(rename = "RATE_LIMIT_IP")]
    RateLimitIp,
    #[serde(rename = "RATE_LIMIT_ACCOUNT")]
    RateLimitAccount,
    #[serde(rename = "RATE_LIMIT_WITHDRAW")]
    RateLimitWithdraw,
    #[serde(rename = "RATE_LIMIT_LINKED_SIGNER")]
    RateLimitLinkedSigner,
}

impl std::fmt::Display for TooManyRequestsDtoOrderType {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::RateLimitIp => write!(f, "RATE_LIMIT_IP"),
            Self::RateLimitAccount => write!(f, "RATE_LIMIT_ACCOUNT"),
            Self::RateLimitWithdraw => write!(f, "RATE_LIMIT_WITHDRAW"),
            Self::RateLimitLinkedSigner => write!(f, "RATE_LIMIT_LINKED_SIGNER"),
        }
    }
}

impl Default for TooManyRequestsDtoOrderType {
    fn default() -> TooManyRequestsDtoOrderType {
        Self::RateLimitIp
    }
}
