#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EFriendFlags {
    None = 0,
    Blocked = 1,
    FriendshipRequested = 2,
    Immediate = 4,
    ClanMember = 8,
    OnGameServer = 16,
    RequestingFriendship = 128,
    RequestingInfo = 256,
    Ignored = 512,
    IgnoredFriend = 1024,
    Suggested = 2048,
    ChatMember = 4096,
    FlagAll = 65535,
}

impl EFriendFlags {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::None as i32 => Some(Self::None),
            x if x == Self::Blocked as i32 => Some(Self::Blocked),
            x if x == Self::FriendshipRequested as i32 => Some(Self::FriendshipRequested),
            x if x == Self::Immediate as i32 => Some(Self::Immediate),
            x if x == Self::ClanMember as i32 => Some(Self::ClanMember),
            x if x == Self::OnGameServer as i32 => Some(Self::OnGameServer),
            x if x == Self::RequestingFriendship as i32 => Some(Self::RequestingFriendship),
            x if x == Self::RequestingInfo as i32 => Some(Self::RequestingInfo),
            x if x == Self::Ignored as i32 => Some(Self::Ignored),
            x if x == Self::IgnoredFriend as i32 => Some(Self::IgnoredFriend),
            x if x == Self::Suggested as i32 => Some(Self::Suggested),
            x if x == Self::ChatMember as i32 => Some(Self::ChatMember),
            x if x == Self::FlagAll as i32 => Some(Self::FlagAll),
            _ => None,
        }
    }
}
