#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EWorkshopFileType {
    Community = 0,
    Microtransaction = 1,
    Collection = 2,
    Art = 3,
    Video = 4,
    Screenshot = 5,
    Game = 6,
    Software = 7,
    Concept = 8,
    WebGuide = 9,
    IntegratedGuide = 10,
    Merch = 11,
    ControllerBinding = 12,
    SteamworksAccessInvite = 13,
    SteamVideo = 14,
    GameManagedItem = 15,
    Clip = 16,
}

impl EWorkshopFileType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Community as i32 => Some(Self::Community),
            x if x == Self::Microtransaction as i32 => Some(Self::Microtransaction),
            x if x == Self::Collection as i32 => Some(Self::Collection),
            x if x == Self::Art as i32 => Some(Self::Art),
            x if x == Self::Video as i32 => Some(Self::Video),
            x if x == Self::Screenshot as i32 => Some(Self::Screenshot),
            x if x == Self::Game as i32 => Some(Self::Game),
            x if x == Self::Software as i32 => Some(Self::Software),
            x if x == Self::Concept as i32 => Some(Self::Concept),
            x if x == Self::WebGuide as i32 => Some(Self::WebGuide),
            x if x == Self::IntegratedGuide as i32 => Some(Self::IntegratedGuide),
            x if x == Self::Merch as i32 => Some(Self::Merch),
            x if x == Self::ControllerBinding as i32 => Some(Self::ControllerBinding),
            x if x == Self::SteamworksAccessInvite as i32 => Some(Self::SteamworksAccessInvite),
            x if x == Self::SteamVideo as i32 => Some(Self::SteamVideo),
            x if x == Self::GameManagedItem as i32 => Some(Self::GameManagedItem),
            x if x == Self::Clip as i32 => Some(Self::Clip),
            _ => None,
        }
    }
}
