#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ENewsUpdateType {
    AppNews = 0,
    SteamAds = 1,
    SteamNews = 2,
    CDDBUpdate = 3,
    ClientUpdate = 4,
}

impl ENewsUpdateType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::AppNews as i32 => Some(Self::AppNews),
            x if x == Self::SteamAds as i32 => Some(Self::SteamAds),
            x if x == Self::SteamNews as i32 => Some(Self::SteamNews),
            x if x == Self::CDDBUpdate as i32 => Some(Self::CDDBUpdate),
            x if x == Self::ClientUpdate as i32 => Some(Self::ClientUpdate),
            _ => None,
        }
    }
}
