/*
 * Thalex RPC API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * 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 TypesEnum {
    #[serde(rename = "credit")]
    Credit,
    #[serde(rename = "deposit")]
    Deposit,
    #[serde(rename = "withdrawal")]
    Withdrawal,
    #[serde(rename = "withdrawal_fee")]
    WithdrawalFee,
    #[serde(rename = "session_settlement")]
    SessionSettlement,
    #[serde(rename = "perpetual_funding")]
    PerpetualFunding,
    #[serde(rename = "internal_transfer")]
    InternalTransfer,
    #[serde(rename = "asset_swap")]
    AssetSwap,
    #[serde(rename = "referral_program_payment")]
    ReferralProgramPayment,
    #[serde(rename = "market_quality_program_payment")]
    MarketQualityProgramPayment,
    #[serde(rename = "daily_interest")]
    DailyInterest,
    #[serde(rename = "balance_sweep")]
    BalanceSweep,
}

impl std::fmt::Display for TypesEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Credit => write!(f, "credit"),
            Self::Deposit => write!(f, "deposit"),
            Self::Withdrawal => write!(f, "withdrawal"),
            Self::WithdrawalFee => write!(f, "withdrawal_fee"),
            Self::SessionSettlement => write!(f, "session_settlement"),
            Self::PerpetualFunding => write!(f, "perpetual_funding"),
            Self::InternalTransfer => write!(f, "internal_transfer"),
            Self::AssetSwap => write!(f, "asset_swap"),
            Self::ReferralProgramPayment => write!(f, "referral_program_payment"),
            Self::MarketQualityProgramPayment => write!(f, "market_quality_program_payment"),
            Self::DailyInterest => write!(f, "daily_interest"),
            Self::BalanceSweep => write!(f, "balance_sweep"),
        }
    }
}

impl Default for TypesEnum {
    fn default() -> TypesEnum {
        Self::Credit
    }
}
