#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ESteamNetworkingUDPMsgID {
    ChallengeRequest = 32,
    ChallengeReply = 33,
    ConnectRequest = 34,
    ConnectOK = 35,
    ConnectionClosed = 36,
    NoConnection = 37,
}

impl ESteamNetworkingUDPMsgID {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::ChallengeRequest as i32 => Some(Self::ChallengeRequest),
            x if x == Self::ChallengeReply as i32 => Some(Self::ChallengeReply),
            x if x == Self::ConnectRequest as i32 => Some(Self::ConnectRequest),
            x if x == Self::ConnectOK as i32 => Some(Self::ConnectOK),
            x if x == Self::ConnectionClosed as i32 => Some(Self::ConnectionClosed),
            x if x == Self::NoConnection as i32 => Some(Self::NoConnection),
            _ => None,
        }
    }
}
