#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EAuthSessionResponse {
    OK = 0,
    UserNotConnectedToSteam = 1,
    NoLicenseOrExpired = 2,
    VACBanned = 3,
    LoggedInElseWhere = 4,
    VACCheckTimedOut = 5,
    AuthTicketCanceled = 6,
    AuthTicketInvalidAlreadyUsed = 7,
    AuthTicketInvalid = 8,
    PublisherIssuedBan = 9,
}

impl EAuthSessionResponse {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::OK as i32 => Some(Self::OK),
            x if x == Self::UserNotConnectedToSteam as i32 => Some(Self::UserNotConnectedToSteam),
            x if x == Self::NoLicenseOrExpired as i32 => Some(Self::NoLicenseOrExpired),
            x if x == Self::VACBanned as i32 => Some(Self::VACBanned),
            x if x == Self::LoggedInElseWhere as i32 => Some(Self::LoggedInElseWhere),
            x if x == Self::VACCheckTimedOut as i32 => Some(Self::VACCheckTimedOut),
            x if x == Self::AuthTicketCanceled as i32 => Some(Self::AuthTicketCanceled),
            x if x == Self::AuthTicketInvalidAlreadyUsed as i32 => Some(Self::AuthTicketInvalidAlreadyUsed),
            x if x == Self::AuthTicketInvalid as i32 => Some(Self::AuthTicketInvalid),
            x if x == Self::PublisherIssuedBan as i32 => Some(Self::PublisherIssuedBan),
            _ => None,
        }
    }
}
