#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EAuthTokenState {
    Invalid = 0,
    New = 1,
    Confirmed = 2,
    Issued = 3,
    Denied = 4,
    LoggedOut = 5,
    Consumed = 6,
    Revoked = 99,
}

impl EAuthTokenState {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::New as i32 => Some(Self::New),
            x if x == Self::Confirmed as i32 => Some(Self::Confirmed),
            x if x == Self::Issued as i32 => Some(Self::Issued),
            x if x == Self::Denied as i32 => Some(Self::Denied),
            x if x == Self::LoggedOut as i32 => Some(Self::LoggedOut),
            x if x == Self::Consumed as i32 => Some(Self::Consumed),
            x if x == Self::Revoked as i32 => Some(Self::Revoked),
            _ => None,
        }
    }
}
