#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EVoiceCallState {
    None = 0,
    ScheduledInitiate = 1,
    RequestedMicAccess = 2,
    LocalMicOnly = 3,
    CreatePeerConnection = 4,
    InitatedWebRTCSession = 5,
    UpdatingWebRTCSession = 6,
    WebRTCConnectedWaitingOnIceConnected = 7,
    RequestedPermission = 8,
    NotifyingVoiceChatOfWebRTCSession = 9,
    Connected = 10,
}

impl EVoiceCallState {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::None as i32 => Some(Self::None),
            x if x == Self::ScheduledInitiate as i32 => Some(Self::ScheduledInitiate),
            x if x == Self::RequestedMicAccess as i32 => Some(Self::RequestedMicAccess),
            x if x == Self::LocalMicOnly as i32 => Some(Self::LocalMicOnly),
            x if x == Self::CreatePeerConnection as i32 => Some(Self::CreatePeerConnection),
            x if x == Self::InitatedWebRTCSession as i32 => Some(Self::InitatedWebRTCSession),
            x if x == Self::UpdatingWebRTCSession as i32 => Some(Self::UpdatingWebRTCSession),
            x if x == Self::WebRTCConnectedWaitingOnIceConnected as i32 => Some(Self::WebRTCConnectedWaitingOnIceConnected),
            x if x == Self::RequestedPermission as i32 => Some(Self::RequestedPermission),
            x if x == Self::NotifyingVoiceChatOfWebRTCSession as i32 => Some(Self::NotifyingVoiceChatOfWebRTCSession),
            x if x == Self::Connected as i32 => Some(Self::Connected),
            _ => None,
        }
    }
}
