#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EHIDDeviceDisconnectMethod {
    Unknown = 0,
    Bluetooth = 1,
    FeatureReport = 2,
    OutputReport = 3,
}

impl EHIDDeviceDisconnectMethod {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::Bluetooth as i32 => Some(Self::Bluetooth),
            x if x == Self::FeatureReport as i32 => Some(Self::FeatureReport),
            x if x == Self::OutputReport as i32 => Some(Self::OutputReport),
            _ => None,
        }
    }
}
