#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EStreamP2PScope {
    Automatic = 0,
    Disabled = 1,
    OnlyMe = 2,
    Friends = 3,
    Everyone = 4,
}

impl EStreamP2PScope {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Automatic as i32 => Some(Self::Automatic),
            x if x == Self::Disabled as i32 => Some(Self::Disabled),
            x if x == Self::OnlyMe as i32 => Some(Self::OnlyMe),
            x if x == Self::Friends as i32 => Some(Self::Friends),
            x if x == Self::Everyone as i32 => Some(Self::Everyone),
            _ => None,
        }
    }
}
