#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EPlatformType {
    Unknown = 0,
    Win32 = 1,
    Win64 = 2,
    Linux = 3,
    OSX = 4,
    PS3 = 5,
    Linux32 = 6,
    Android32 = 7,
    Android64 = 8,
    IOS32 = 9,
    IOS64 = 10,
    TVOS = 11,
    EmbeddedClient = 12,
    Browser = 13,
}

impl EPlatformType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::Win32 as i32 => Some(Self::Win32),
            x if x == Self::Win64 as i32 => Some(Self::Win64),
            x if x == Self::Linux as i32 => Some(Self::Linux),
            x if x == Self::OSX as i32 => Some(Self::OSX),
            x if x == Self::PS3 as i32 => Some(Self::PS3),
            x if x == Self::Linux32 as i32 => Some(Self::Linux32),
            x if x == Self::Android32 as i32 => Some(Self::Android32),
            x if x == Self::Android64 as i32 => Some(Self::Android64),
            x if x == Self::IOS32 as i32 => Some(Self::IOS32),
            x if x == Self::IOS64 as i32 => Some(Self::IOS64),
            x if x == Self::TVOS as i32 => Some(Self::TVOS),
            x if x == Self::EmbeddedClient as i32 => Some(Self::EmbeddedClient),
            x if x == Self::Browser as i32 => Some(Self::Browser),
            _ => None,
        }
    }
}
