#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EChildProcessQueryExitCode {
    ErrorNotSupportedByPlatform = -5,
    ErrorFileSave = -4,
    ErrorUnimplemented = -3,
    ErrorOther = -2,
    ErrorCommandline = -1,
    Success = 0,
}

impl EChildProcessQueryExitCode {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::ErrorNotSupportedByPlatform as i32 => Some(Self::ErrorNotSupportedByPlatform),
            x if x == Self::ErrorFileSave as i32 => Some(Self::ErrorFileSave),
            x if x == Self::ErrorUnimplemented as i32 => Some(Self::ErrorUnimplemented),
            x if x == Self::ErrorOther as i32 => Some(Self::ErrorOther),
            x if x == Self::ErrorCommandline as i32 => Some(Self::ErrorCommandline),
            x if x == Self::Success as i32 => Some(Self::Success),
            _ => None,
        }
    }
}
