#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EUCMFilePrivacyState {
    Invalid = -1,
    Private = 2,
    FriendsOnly = 4,
    Public = 8,
    Unlisted = 16,
}

impl EUCMFilePrivacyState {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Private as i32 => Some(Self::Private),
            x if x == Self::FriendsOnly as i32 => Some(Self::FriendsOnly),
            x if x == Self::Public as i32 => Some(Self::Public),
            x if x == Self::Unlisted as i32 => Some(Self::Unlisted),
            _ => None,
        }
    }
}
