#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EClientPersonaStateFlag {
    Status = 1,
    PlayerName = 2,
    QueryPort = 4,
    SourceID = 8,
    Presence = 16,
    Metadata = 32,
    LastSeen = 64,
    UserClanRank = 128,
    GameExtraInfo = 256,
    GameDataBlob = 512,
    ClanData = 1024,
    Facebook = 2048,
    RichPresence = 4096,
    Broadcast = 8192,
    Watching = 16384,
}

impl EClientPersonaStateFlag {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Status as i32 => Some(Self::Status),
            x if x == Self::PlayerName as i32 => Some(Self::PlayerName),
            x if x == Self::QueryPort as i32 => Some(Self::QueryPort),
            x if x == Self::SourceID as i32 => Some(Self::SourceID),
            x if x == Self::Presence as i32 => Some(Self::Presence),
            x if x == Self::Metadata as i32 => Some(Self::Metadata),
            x if x == Self::LastSeen as i32 => Some(Self::LastSeen),
            x if x == Self::UserClanRank as i32 => Some(Self::UserClanRank),
            x if x == Self::GameExtraInfo as i32 => Some(Self::GameExtraInfo),
            x if x == Self::GameDataBlob as i32 => Some(Self::GameDataBlob),
            x if x == Self::ClanData as i32 => Some(Self::ClanData),
            x if x == Self::Facebook as i32 => Some(Self::Facebook),
            x if x == Self::RichPresence as i32 => Some(Self::RichPresence),
            x if x == Self::Broadcast as i32 => Some(Self::Broadcast),
            x if x == Self::Watching as i32 => Some(Self::Watching),
            _ => None,
        }
    }
}
