#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EProtoAppType {
    DepotOnly = -2147483648,
    Invalid = 0,
    Game = 1,
    Application = 2,
    Tool = 4,
    Demo = 8,
    Deprected = 16,
    DLC = 32,
    Guide = 64,
    Driver = 128,
    Config = 256,
    Hardware = 512,
    Franchise = 1024,
    Video = 2048,
    Plugin = 4096,
    MusicAlbum = 8192,
    Series = 16384,
    Comic = 32768,
    Beta = 65536,
    Shortcut = 1073741824,
}

impl EProtoAppType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::DepotOnly as i32 => Some(Self::DepotOnly),
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Game as i32 => Some(Self::Game),
            x if x == Self::Application as i32 => Some(Self::Application),
            x if x == Self::Tool as i32 => Some(Self::Tool),
            x if x == Self::Demo as i32 => Some(Self::Demo),
            x if x == Self::Deprected as i32 => Some(Self::Deprected),
            x if x == Self::DLC as i32 => Some(Self::DLC),
            x if x == Self::Guide as i32 => Some(Self::Guide),
            x if x == Self::Driver as i32 => Some(Self::Driver),
            x if x == Self::Config as i32 => Some(Self::Config),
            x if x == Self::Hardware as i32 => Some(Self::Hardware),
            x if x == Self::Franchise as i32 => Some(Self::Franchise),
            x if x == Self::Video as i32 => Some(Self::Video),
            x if x == Self::Plugin as i32 => Some(Self::Plugin),
            x if x == Self::MusicAlbum as i32 => Some(Self::MusicAlbum),
            x if x == Self::Series as i32 => Some(Self::Series),
            x if x == Self::Comic as i32 => Some(Self::Comic),
            x if x == Self::Beta as i32 => Some(Self::Beta),
            x if x == Self::Shortcut as i32 => Some(Self::Shortcut),
            _ => None,
        }
    }
}
