#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EGPUPerformanceLevel {
    Invalid = 0,
    Auto = 1,
    Manual = 2,
    Low = 3,
    High = 4,
    Profiling = 5,
}

impl EGPUPerformanceLevel {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Auto as i32 => Some(Self::Auto),
            x if x == Self::Manual as i32 => Some(Self::Manual),
            x if x == Self::Low as i32 => Some(Self::Low),
            x if x == Self::High as i32 => Some(Self::High),
            x if x == Self::Profiling as i32 => Some(Self::Profiling),
            _ => None,
        }
    }
}
