#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EAccountType {
    Invalid = 0,
    Individual = 1,
    Multiseat = 2,
    GameServer = 3,
    AnonGameServer = 4,
    Pending = 5,
    ContentServer = 6,
    Clan = 7,
    Chat = 8,
    ConsoleUser = 9,
    AnonUser = 10,
}

impl EAccountType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Individual as i32 => Some(Self::Individual),
            x if x == Self::Multiseat as i32 => Some(Self::Multiseat),
            x if x == Self::GameServer as i32 => Some(Self::GameServer),
            x if x == Self::AnonGameServer as i32 => Some(Self::AnonGameServer),
            x if x == Self::Pending as i32 => Some(Self::Pending),
            x if x == Self::ContentServer as i32 => Some(Self::ContentServer),
            x if x == Self::Clan as i32 => Some(Self::Clan),
            x if x == Self::Chat as i32 => Some(Self::Chat),
            x if x == Self::ConsoleUser as i32 => Some(Self::ConsoleUser),
            x if x == Self::AnonUser as i32 => Some(Self::AnonUser),
            _ => None,
        }
    }
}
