#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ESLSHelper {
    Invalid = 0,
    Minidump = 1,
    Kdump = 2,
    Journal = 3,
    Gpu = 4,
    SystemInfo = 5,
    Devcoredump = 6,
}

impl ESLSHelper {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Minidump as i32 => Some(Self::Minidump),
            x if x == Self::Kdump as i32 => Some(Self::Kdump),
            x if x == Self::Journal as i32 => Some(Self::Journal),
            x if x == Self::Gpu as i32 => Some(Self::Gpu),
            x if x == Self::SystemInfo as i32 => Some(Self::SystemInfo),
            x if x == Self::Devcoredump as i32 => Some(Self::Devcoredump),
            _ => None,
        }
    }
}
