#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ESystemIMType {
    RawText = 0,
    InvalidCard = 1,
    RecurringPurchaseFailed = 2,
    CardWillExpire = 3,
    SubscriptionExpired = 4,
    GuestPassReceived = 5,
    GuestPassGranted = 6,
    GiftRevoked = 7,
    SupportMessage = 8,
    SupportMessageClearAlert = 9,
}

impl ESystemIMType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::RawText as i32 => Some(Self::RawText),
            x if x == Self::InvalidCard as i32 => Some(Self::InvalidCard),
            x if x == Self::RecurringPurchaseFailed as i32 => Some(Self::RecurringPurchaseFailed),
            x if x == Self::CardWillExpire as i32 => Some(Self::CardWillExpire),
            x if x == Self::SubscriptionExpired as i32 => Some(Self::SubscriptionExpired),
            x if x == Self::GuestPassReceived as i32 => Some(Self::GuestPassReceived),
            x if x == Self::GuestPassGranted as i32 => Some(Self::GuestPassGranted),
            x if x == Self::GiftRevoked as i32 => Some(Self::GiftRevoked),
            x if x == Self::SupportMessage as i32 => Some(Self::SupportMessage),
            x if x == Self::SupportMessageClearAlert as i32 => Some(Self::SupportMessageClearAlert),
            _ => None,
        }
    }
}
