oanda-v20-openapi 0.2.1

The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
Documentation
/*
 * OANDA v20 API
 *
 * The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
 *
 * The version of the OpenAPI document: 0.2.1
 * Contact: jmicoud02@gmail.com
 * Generated by: https://openapi-generator.tech
 */

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

/// AccountGuaranteedStopLossOrderMode : The current guaranteed Stop Loss Order mode of the Account.
/// The current guaranteed Stop Loss Order mode of the Account.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AccountGuaranteedStopLossOrderMode {
    #[serde(rename = "DISABLED")]
    Disabled,
    #[serde(rename = "ALLOWED")]
    Allowed,
    #[serde(rename = "REQUIRED")]
    Required,

}

impl std::fmt::Display for AccountGuaranteedStopLossOrderMode {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Disabled => write!(f, "DISABLED"),
            Self::Allowed => write!(f, "ALLOWED"),
            Self::Required => write!(f, "REQUIRED"),
        }
    }
}

impl Default for AccountGuaranteedStopLossOrderMode {
    fn default() -> AccountGuaranteedStopLossOrderMode {
        Self::Disabled
    }
}