#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ERemoteDeviceStreamingResult {
    Success = 0,
    Unauthorized = 1,
    ScreenLocked = 2,
    Failed = 3,
    Busy = 4,
    InProgress = 5,
    Canceled = 6,
    DriversNotInstalled = 7,
    Disabled = 8,
    BroadcastingActive = 9,
    VRActive = 10,
    PINRequired = 11,
    TransportUnavailable = 12,
    Invisible = 13,
    GameLaunchFailed = 14,
    SteamVRNotInstalled = 15,
}

impl ERemoteDeviceStreamingResult {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Success as i32 => Some(Self::Success),
            x if x == Self::Unauthorized as i32 => Some(Self::Unauthorized),
            x if x == Self::ScreenLocked as i32 => Some(Self::ScreenLocked),
            x if x == Self::Failed as i32 => Some(Self::Failed),
            x if x == Self::Busy as i32 => Some(Self::Busy),
            x if x == Self::InProgress as i32 => Some(Self::InProgress),
            x if x == Self::Canceled as i32 => Some(Self::Canceled),
            x if x == Self::DriversNotInstalled as i32 => Some(Self::DriversNotInstalled),
            x if x == Self::Disabled as i32 => Some(Self::Disabled),
            x if x == Self::BroadcastingActive as i32 => Some(Self::BroadcastingActive),
            x if x == Self::VRActive as i32 => Some(Self::VRActive),
            x if x == Self::PINRequired as i32 => Some(Self::PINRequired),
            x if x == Self::TransportUnavailable as i32 => Some(Self::TransportUnavailable),
            x if x == Self::Invisible as i32 => Some(Self::Invisible),
            x if x == Self::GameLaunchFailed as i32 => Some(Self::GameLaunchFailed),
            x if x == Self::SteamVRNotInstalled as i32 => Some(Self::SteamVRNotInstalled),
            _ => None,
        }
    }
}
