#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EBaseUserMessages {
    AchievementEvent = 101,
    CloseCaption = 102,
    CloseCaptionDirect = 103,
    CurrentTimescale = 104,
    DesiredTimescale = 105,
    Fade = 106,
    GameTitle = 107,
    HudMsg = 110,
    HudText = 111,
    ColoredText = 113,
    RequestState = 114,
    ResetHUD = 115,
    Rumble = 116,
    SayText = 117,
    SayText2 = 118,
    SayTextChannel = 119,
    Shake = 120,
    ShakeDir = 121,
    WaterShake = 122,
    TextMsg = 124,
    ScreenTilt = 125,
    VoiceMask = 128,
    SendAudio = 130,
    ItemPickup = 131,
    AmmoDenied = 132,
    ShowMenu = 134,
    CreditsMsg = 135,
    CloseCaptionPlaceholder = 142,
    CameraTransition = 143,
    AudioParameter = 144,
    ParticleManager = 145,
    HudError = 146,
    CustomGameEvent = 148,
    AnimGraphUpdate = 149,
    HapticsManagerPulse = 150,
    HapticsManagerEffect = 151,
    UpdateCssClasses = 153,
    ServerFrameTime = 154,
    LagCompensationError = 155,
    RequestDllStatus = 156,
    RequestUtilAction = 157,
    UtilActionResponse = 158,
    DllStatusResponse = 159,
    RequestInventory = 160,
    InventoryResponse = 161,
    RequestDiagnostic = 162,
    DiagnosticResponse = 163,
    ExtraUserData = 164,
    NotifyResponseFound = 165,
    PlayResponseConditional = 166,
    MAX_BASE = 200,
}

impl EBaseUserMessages {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::AchievementEvent as i32 => Some(Self::AchievementEvent),
            x if x == Self::CloseCaption as i32 => Some(Self::CloseCaption),
            x if x == Self::CloseCaptionDirect as i32 => Some(Self::CloseCaptionDirect),
            x if x == Self::CurrentTimescale as i32 => Some(Self::CurrentTimescale),
            x if x == Self::DesiredTimescale as i32 => Some(Self::DesiredTimescale),
            x if x == Self::Fade as i32 => Some(Self::Fade),
            x if x == Self::GameTitle as i32 => Some(Self::GameTitle),
            x if x == Self::HudMsg as i32 => Some(Self::HudMsg),
            x if x == Self::HudText as i32 => Some(Self::HudText),
            x if x == Self::ColoredText as i32 => Some(Self::ColoredText),
            x if x == Self::RequestState as i32 => Some(Self::RequestState),
            x if x == Self::ResetHUD as i32 => Some(Self::ResetHUD),
            x if x == Self::Rumble as i32 => Some(Self::Rumble),
            x if x == Self::SayText as i32 => Some(Self::SayText),
            x if x == Self::SayText2 as i32 => Some(Self::SayText2),
            x if x == Self::SayTextChannel as i32 => Some(Self::SayTextChannel),
            x if x == Self::Shake as i32 => Some(Self::Shake),
            x if x == Self::ShakeDir as i32 => Some(Self::ShakeDir),
            x if x == Self::WaterShake as i32 => Some(Self::WaterShake),
            x if x == Self::TextMsg as i32 => Some(Self::TextMsg),
            x if x == Self::ScreenTilt as i32 => Some(Self::ScreenTilt),
            x if x == Self::VoiceMask as i32 => Some(Self::VoiceMask),
            x if x == Self::SendAudio as i32 => Some(Self::SendAudio),
            x if x == Self::ItemPickup as i32 => Some(Self::ItemPickup),
            x if x == Self::AmmoDenied as i32 => Some(Self::AmmoDenied),
            x if x == Self::ShowMenu as i32 => Some(Self::ShowMenu),
            x if x == Self::CreditsMsg as i32 => Some(Self::CreditsMsg),
            x if x == Self::CloseCaptionPlaceholder as i32 => Some(Self::CloseCaptionPlaceholder),
            x if x == Self::CameraTransition as i32 => Some(Self::CameraTransition),
            x if x == Self::AudioParameter as i32 => Some(Self::AudioParameter),
            x if x == Self::ParticleManager as i32 => Some(Self::ParticleManager),
            x if x == Self::HudError as i32 => Some(Self::HudError),
            x if x == Self::CustomGameEvent as i32 => Some(Self::CustomGameEvent),
            x if x == Self::AnimGraphUpdate as i32 => Some(Self::AnimGraphUpdate),
            x if x == Self::HapticsManagerPulse as i32 => Some(Self::HapticsManagerPulse),
            x if x == Self::HapticsManagerEffect as i32 => Some(Self::HapticsManagerEffect),
            x if x == Self::UpdateCssClasses as i32 => Some(Self::UpdateCssClasses),
            x if x == Self::ServerFrameTime as i32 => Some(Self::ServerFrameTime),
            x if x == Self::LagCompensationError as i32 => Some(Self::LagCompensationError),
            x if x == Self::RequestDllStatus as i32 => Some(Self::RequestDllStatus),
            x if x == Self::RequestUtilAction as i32 => Some(Self::RequestUtilAction),
            x if x == Self::UtilActionResponse as i32 => Some(Self::UtilActionResponse),
            x if x == Self::DllStatusResponse as i32 => Some(Self::DllStatusResponse),
            x if x == Self::RequestInventory as i32 => Some(Self::RequestInventory),
            x if x == Self::InventoryResponse as i32 => Some(Self::InventoryResponse),
            x if x == Self::RequestDiagnostic as i32 => Some(Self::RequestDiagnostic),
            x if x == Self::DiagnosticResponse as i32 => Some(Self::DiagnosticResponse),
            x if x == Self::ExtraUserData as i32 => Some(Self::ExtraUserData),
            x if x == Self::NotifyResponseFound as i32 => Some(Self::NotifyResponseFound),
            x if x == Self::PlayResponseConditional as i32 => Some(Self::PlayResponseConditional),
            x if x == Self::MAX_BASE as i32 => Some(Self::MAX_BASE),
            _ => None,
        }
    }
}
