1#![allow(non_camel_case_types)]
2#![allow(non_upper_case_globals)]
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4#[repr(i32)]
5pub enum ECurrencyCode {
6 Invalid = 0,
7 USD = 1,
8 GBP = 2,
9 EUR = 3,
10 CHF = 4,
11 RUB = 5,
12 PLN = 6,
13 BRL = 7,
14 JPY = 8,
15 NOK = 9,
16 IDR = 10,
17 MYR = 11,
18 PHP = 12,
19 SGD = 13,
20 THB = 14,
21 VND = 15,
22 KRW = 16,
23 TRY = 17,
24 UAH = 18,
25 MXN = 19,
26 CAD = 20,
27 AUD = 21,
28 NZD = 22,
29 CNY = 23,
30 INR = 24,
31 CLP = 25,
32 PEN = 26,
33 COP = 27,
34 ZAR = 28,
35 HKD = 29,
36 TWD = 30,
37 SAR = 31,
38 AED = 32,
39 ARS = 34,
40 ILS = 35,
41 BYN = 36,
42 KZT = 37,
43 KWD = 38,
44 QAR = 39,
45 CRC = 40,
46 UYU = 41,
47 BGN = 42,
48 HRK = 43,
49 CZK = 44,
50 DKK = 45,
51 HUF = 46,
52 RON = 47,
53}
54
55impl ECurrencyCode {
56 pub fn from_i32(val: i32) -> Option<Self> {
57 match val {
58 x if x == Self::Invalid as i32 => Some(Self::Invalid),
59 x if x == Self::USD as i32 => Some(Self::USD),
60 x if x == Self::GBP as i32 => Some(Self::GBP),
61 x if x == Self::EUR as i32 => Some(Self::EUR),
62 x if x == Self::CHF as i32 => Some(Self::CHF),
63 x if x == Self::RUB as i32 => Some(Self::RUB),
64 x if x == Self::PLN as i32 => Some(Self::PLN),
65 x if x == Self::BRL as i32 => Some(Self::BRL),
66 x if x == Self::JPY as i32 => Some(Self::JPY),
67 x if x == Self::NOK as i32 => Some(Self::NOK),
68 x if x == Self::IDR as i32 => Some(Self::IDR),
69 x if x == Self::MYR as i32 => Some(Self::MYR),
70 x if x == Self::PHP as i32 => Some(Self::PHP),
71 x if x == Self::SGD as i32 => Some(Self::SGD),
72 x if x == Self::THB as i32 => Some(Self::THB),
73 x if x == Self::VND as i32 => Some(Self::VND),
74 x if x == Self::KRW as i32 => Some(Self::KRW),
75 x if x == Self::TRY as i32 => Some(Self::TRY),
76 x if x == Self::UAH as i32 => Some(Self::UAH),
77 x if x == Self::MXN as i32 => Some(Self::MXN),
78 x if x == Self::CAD as i32 => Some(Self::CAD),
79 x if x == Self::AUD as i32 => Some(Self::AUD),
80 x if x == Self::NZD as i32 => Some(Self::NZD),
81 x if x == Self::CNY as i32 => Some(Self::CNY),
82 x if x == Self::INR as i32 => Some(Self::INR),
83 x if x == Self::CLP as i32 => Some(Self::CLP),
84 x if x == Self::PEN as i32 => Some(Self::PEN),
85 x if x == Self::COP as i32 => Some(Self::COP),
86 x if x == Self::ZAR as i32 => Some(Self::ZAR),
87 x if x == Self::HKD as i32 => Some(Self::HKD),
88 x if x == Self::TWD as i32 => Some(Self::TWD),
89 x if x == Self::SAR as i32 => Some(Self::SAR),
90 x if x == Self::AED as i32 => Some(Self::AED),
91 x if x == Self::ARS as i32 => Some(Self::ARS),
92 x if x == Self::ILS as i32 => Some(Self::ILS),
93 x if x == Self::BYN as i32 => Some(Self::BYN),
94 x if x == Self::KZT as i32 => Some(Self::KZT),
95 x if x == Self::KWD as i32 => Some(Self::KWD),
96 x if x == Self::QAR as i32 => Some(Self::QAR),
97 x if x == Self::CRC as i32 => Some(Self::CRC),
98 x if x == Self::UYU as i32 => Some(Self::UYU),
99 x if x == Self::BGN as i32 => Some(Self::BGN),
100 x if x == Self::HRK as i32 => Some(Self::HRK),
101 x if x == Self::CZK as i32 => Some(Self::CZK),
102 x if x == Self::DKK as i32 => Some(Self::DKK),
103 x if x == Self::HUF as i32 => Some(Self::HUF),
104 x if x == Self::RON as i32 => Some(Self::RON),
105 _ => None,
106 }
107 }
108}