#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EForumType {
    Invalid = 0,
    General = 1,
    ReportedPosts = 2,
    Workshop = 3,
    PublishedFile = 4,
    Trading = 5,
    PlayTest = 6,
    Event = 7,
    Max = 8,
}

impl EForumType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::General as i32 => Some(Self::General),
            x if x == Self::ReportedPosts as i32 => Some(Self::ReportedPosts),
            x if x == Self::Workshop as i32 => Some(Self::Workshop),
            x if x == Self::PublishedFile as i32 => Some(Self::PublishedFile),
            x if x == Self::Trading as i32 => Some(Self::Trading),
            x if x == Self::PlayTest as i32 => Some(Self::PlayTest),
            x if x == Self::Event as i32 => Some(Self::Event),
            x if x == Self::Max as i32 => Some(Self::Max),
            _ => None,
        }
    }
}
