#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ECommunityItemClass {
    Invalid = 0,
    Badge = 1,
    GameCard = 2,
    ProfileBackground = 3,
    Emoticon = 4,
    BoosterPack = 5,
    Consumable = 6,
    GameGoo = 7,
    ProfileModifier = 8,
    Scene = 9,
    SalienItem = 10,
    Sticker = 11,
    ChatEffect = 12,
    MiniProfileBackground = 13,
    AvatarFrame = 14,
    AnimatedAvatar = 15,
    SteamDeckKeyboardSkin = 16,
    SteamDeckStartupMovie = 17,
}

impl ECommunityItemClass {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Badge as i32 => Some(Self::Badge),
            x if x == Self::GameCard as i32 => Some(Self::GameCard),
            x if x == Self::ProfileBackground as i32 => Some(Self::ProfileBackground),
            x if x == Self::Emoticon as i32 => Some(Self::Emoticon),
            x if x == Self::BoosterPack as i32 => Some(Self::BoosterPack),
            x if x == Self::Consumable as i32 => Some(Self::Consumable),
            x if x == Self::GameGoo as i32 => Some(Self::GameGoo),
            x if x == Self::ProfileModifier as i32 => Some(Self::ProfileModifier),
            x if x == Self::Scene as i32 => Some(Self::Scene),
            x if x == Self::SalienItem as i32 => Some(Self::SalienItem),
            x if x == Self::Sticker as i32 => Some(Self::Sticker),
            x if x == Self::ChatEffect as i32 => Some(Self::ChatEffect),
            x if x == Self::MiniProfileBackground as i32 => Some(Self::MiniProfileBackground),
            x if x == Self::AvatarFrame as i32 => Some(Self::AvatarFrame),
            x if x == Self::AnimatedAvatar as i32 => Some(Self::AnimatedAvatar),
            x if x == Self::SteamDeckKeyboardSkin as i32 => Some(Self::SteamDeckKeyboardSkin),
            x if x == Self::SteamDeckStartupMovie as i32 => Some(Self::SteamDeckStartupMovie),
            _ => None,
        }
    }
}
