#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EStreamStatsMessage {
    FrameEvents = 1,
    DebugDump = 2,
    LogMessage = 3,
    LogUploadBegin = 4,
    LogUploadData = 5,
    LogUploadComplete = 6,
}

impl EStreamStatsMessage {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::FrameEvents as i32 => Some(Self::FrameEvents),
            x if x == Self::DebugDump as i32 => Some(Self::DebugDump),
            x if x == Self::LogMessage as i32 => Some(Self::LogMessage),
            x if x == Self::LogUploadBegin as i32 => Some(Self::LogUploadBegin),
            x if x == Self::LogUploadData as i32 => Some(Self::LogUploadData),
            x if x == Self::LogUploadComplete as i32 => Some(Self::LogUploadComplete),
            _ => None,
        }
    }
}
