use serde::{Deserialize, Serialize};

#[derive(
    Debug,
    Clone,
    Copy,
    Serialize,
    Deserialize,
    PartialEq,
    Eq,
    strum::Display,
    strum::EnumString,
    rkyv::Archive,
    rkyv::Serialize,
    rkyv::Deserialize,
)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
#[strum(serialize_all = "SCREAMING_SNAKE_CASE")]
pub enum RejectReason {
    MarketHalted,
    MarketAlreadyHalted,
    MarketNotHalted,
    MarketNotFound,
    MarketAlreadyExists,
    MarketIdMismatch,
    RunnerNotFound,
    RunnerAlreadyRemoved,
    MarketNotOpen,
    MarketInPlayNotSupported,
    MarketTerminal,
    MarketNotSuspended,
    MarketAlreadyVoided,
    InvalidOdds,
    InvalidStake,
    MaxLiabilityExceeded,
    OrderNotFound,
    NotOrderOwner,
    OrderNotLive,
    WouldNotFillFok,
    MarketNotClosed,
    DuplicateRunner,
    IncompleteResults,
    QueueBackpressure,
    InvalidBatchSize,
    MarketClosing,
    MarketNotClosing,
    MarketBatchCancelling,
    MarketNotBatchCancelling,
    InvalidMarketConfig,
    CashoutInvalidPercent,
    CashoutNoExposure,
    CashoutNoLiquidity,
    CashoutOddsChanged,
    CashoutNotSupported,
    InvalidPriceTicks,
    InvalidQtyShares,
    MarketModelMismatch,
    MarketNotTerminal,
    InternalError,
    Duplicate,
    NoChange,
}
