#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ENetworkDisconnectionReason {
    INVALID = 0,
    SHUTDOWN = 1,
    DIRECT_CONNECT_RESERVATION = 50,
    RECONNECTION = 53,
}

impl ENetworkDisconnectionReason {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::INVALID as i32 => Some(Self::INVALID),
            x if x == Self::SHUTDOWN as i32 => Some(Self::SHUTDOWN),
            x if x == Self::DIRECT_CONNECT_RESERVATION as i32 => Some(Self::DIRECT_CONNECT_RESERVATION),
            x if x == Self::RECONNECTION as i32 => Some(Self::RECONNECTION),
            _ => None,
        }
    }
}
