bluefin_api 1.7.0

Bluefin API
Documentation
/*
 * Bluefin API
 *
 * Bluefin API
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// OrderStatus : The current status of the order.
/// The current status of the order.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OrderStatus {
    #[serde(rename = "STANDBY")]
    Standby,
    #[serde(rename = "OPEN")]
    Open,
    #[serde(rename = "PARTIALLY_FILLED_OPEN")]
    PartiallyFilledOpen,
    #[serde(rename = "PARTIALLY_FILLED_CANCELED")]
    PartiallyFilledCanceled,
    #[serde(rename = "FILLED")]
    Filled,
    #[serde(rename = "CANCELLED")]
    Cancelled,
    #[serde(rename = "EXPIRED")]
    Expired,
    #[serde(rename = "PARTIALLY_FILLED_EXPIRED")]
    PartiallyFilledExpired,
    #[serde(rename = "UNSPECIFIED")]
    Unspecified,

}

impl std::fmt::Display for OrderStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Standby => write!(f, "STANDBY"),
            Self::Open => write!(f, "OPEN"),
            Self::PartiallyFilledOpen => write!(f, "PARTIALLY_FILLED_OPEN"),
            Self::PartiallyFilledCanceled => write!(f, "PARTIALLY_FILLED_CANCELED"),
            Self::Filled => write!(f, "FILLED"),
            Self::Cancelled => write!(f, "CANCELLED"),
            Self::Expired => write!(f, "EXPIRED"),
            Self::PartiallyFilledExpired => write!(f, "PARTIALLY_FILLED_EXPIRED"),
            Self::Unspecified => write!(f, "UNSPECIFIED"),
        }
    }
}

impl Default for OrderStatus {
    fn default() -> OrderStatus {
        Self::Standby
    }
}