#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EChatRoomGroupRank {
    Default = 0,
    Viewer = 10,
    Guest = 15,
    Member = 20,
    Moderator = 30,
    Officer = 40,
    Owner = 50,
    TestInvalid = 99,
}

impl EChatRoomGroupRank {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Default as i32 => Some(Self::Default),
            x if x == Self::Viewer as i32 => Some(Self::Viewer),
            x if x == Self::Guest as i32 => Some(Self::Guest),
            x if x == Self::Member as i32 => Some(Self::Member),
            x if x == Self::Moderator as i32 => Some(Self::Moderator),
            x if x == Self::Officer as i32 => Some(Self::Officer),
            x if x == Self::Owner as i32 => Some(Self::Owner),
            x if x == Self::TestInvalid as i32 => Some(Self::TestInvalid),
            _ => None,
        }
    }
}
