#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EInitSystemResult {
    Invalid = 0,
    Success = 1,
    None = 2,
    NotFound = 3,
    Existing = 4,
    FailedOpen = 5,
    Mismatch = 6,
    FailedInit = 7,
    Max = 8,
}

impl EInitSystemResult {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Success as i32 => Some(Self::Success),
            x if x == Self::None as i32 => Some(Self::None),
            x if x == Self::NotFound as i32 => Some(Self::NotFound),
            x if x == Self::Existing as i32 => Some(Self::Existing),
            x if x == Self::FailedOpen as i32 => Some(Self::FailedOpen),
            x if x == Self::Mismatch as i32 => Some(Self::Mismatch),
            x if x == Self::FailedInit as i32 => Some(Self::FailedInit),
            x if x == Self::Max as i32 => Some(Self::Max),
            _ => None,
        }
    }
}
