#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ECurrencyCode {
    Invalid = 0,
    USD = 1,
    GBP = 2,
    EUR = 3,
    CHF = 4,
    RUB = 5,
    PLN = 6,
    BRL = 7,
    JPY = 8,
    NOK = 9,
    IDR = 10,
    MYR = 11,
    PHP = 12,
    SGD = 13,
    THB = 14,
    VND = 15,
    KRW = 16,
    TRY = 17,
    UAH = 18,
    MXN = 19,
    CAD = 20,
    AUD = 21,
    NZD = 22,
    CNY = 23,
    INR = 24,
    CLP = 25,
    PEN = 26,
    COP = 27,
    ZAR = 28,
    HKD = 29,
    TWD = 30,
    SAR = 31,
    AED = 32,
    ARS = 34,
    ILS = 35,
    BYN = 36,
    KZT = 37,
    KWD = 38,
    QAR = 39,
    CRC = 40,
    UYU = 41,
    BGN = 42,
    HRK = 43,
    CZK = 44,
    DKK = 45,
    HUF = 46,
    RON = 47,
}

impl ECurrencyCode {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::USD as i32 => Some(Self::USD),
            x if x == Self::GBP as i32 => Some(Self::GBP),
            x if x == Self::EUR as i32 => Some(Self::EUR),
            x if x == Self::CHF as i32 => Some(Self::CHF),
            x if x == Self::RUB as i32 => Some(Self::RUB),
            x if x == Self::PLN as i32 => Some(Self::PLN),
            x if x == Self::BRL as i32 => Some(Self::BRL),
            x if x == Self::JPY as i32 => Some(Self::JPY),
            x if x == Self::NOK as i32 => Some(Self::NOK),
            x if x == Self::IDR as i32 => Some(Self::IDR),
            x if x == Self::MYR as i32 => Some(Self::MYR),
            x if x == Self::PHP as i32 => Some(Self::PHP),
            x if x == Self::SGD as i32 => Some(Self::SGD),
            x if x == Self::THB as i32 => Some(Self::THB),
            x if x == Self::VND as i32 => Some(Self::VND),
            x if x == Self::KRW as i32 => Some(Self::KRW),
            x if x == Self::TRY as i32 => Some(Self::TRY),
            x if x == Self::UAH as i32 => Some(Self::UAH),
            x if x == Self::MXN as i32 => Some(Self::MXN),
            x if x == Self::CAD as i32 => Some(Self::CAD),
            x if x == Self::AUD as i32 => Some(Self::AUD),
            x if x == Self::NZD as i32 => Some(Self::NZD),
            x if x == Self::CNY as i32 => Some(Self::CNY),
            x if x == Self::INR as i32 => Some(Self::INR),
            x if x == Self::CLP as i32 => Some(Self::CLP),
            x if x == Self::PEN as i32 => Some(Self::PEN),
            x if x == Self::COP as i32 => Some(Self::COP),
            x if x == Self::ZAR as i32 => Some(Self::ZAR),
            x if x == Self::HKD as i32 => Some(Self::HKD),
            x if x == Self::TWD as i32 => Some(Self::TWD),
            x if x == Self::SAR as i32 => Some(Self::SAR),
            x if x == Self::AED as i32 => Some(Self::AED),
            x if x == Self::ARS as i32 => Some(Self::ARS),
            x if x == Self::ILS as i32 => Some(Self::ILS),
            x if x == Self::BYN as i32 => Some(Self::BYN),
            x if x == Self::KZT as i32 => Some(Self::KZT),
            x if x == Self::KWD as i32 => Some(Self::KWD),
            x if x == Self::QAR as i32 => Some(Self::QAR),
            x if x == Self::CRC as i32 => Some(Self::CRC),
            x if x == Self::UYU as i32 => Some(Self::UYU),
            x if x == Self::BGN as i32 => Some(Self::BGN),
            x if x == Self::HRK as i32 => Some(Self::HRK),
            x if x == Self::CZK as i32 => Some(Self::CZK),
            x if x == Self::DKK as i32 => Some(Self::DKK),
            x if x == Self::HUF as i32 => Some(Self::HUF),
            x if x == Self::RON as i32 => Some(Self::RON),
            _ => None,
        }
    }
}
