#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EBrowserGPUStatus {
    Invalid = 0,
    Enabled = 1,
    DisabledUnknown = 2,
    DisabledCrashCount = 4,
    DisabledBlocklist = 5,
    DisabledJSRequest = 6,
    DisabledCommandLine = 7,
    DisabledRuntimeDetect = 8,
    DisabledChildCommandLine = 9,
    DisabledCompositingCommandLine = 10,
}

impl EBrowserGPUStatus {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Enabled as i32 => Some(Self::Enabled),
            x if x == Self::DisabledUnknown as i32 => Some(Self::DisabledUnknown),
            x if x == Self::DisabledCrashCount as i32 => Some(Self::DisabledCrashCount),
            x if x == Self::DisabledBlocklist as i32 => Some(Self::DisabledBlocklist),
            x if x == Self::DisabledJSRequest as i32 => Some(Self::DisabledJSRequest),
            x if x == Self::DisabledCommandLine as i32 => Some(Self::DisabledCommandLine),
            x if x == Self::DisabledRuntimeDetect as i32 => Some(Self::DisabledRuntimeDetect),
            x if x == Self::DisabledChildCommandLine as i32 => Some(Self::DisabledChildCommandLine),
            x if x == Self::DisabledCompositingCommandLine as i32 => Some(Self::DisabledCompositingCommandLine),
            _ => None,
        }
    }
}
