#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EFamilyGroupChangeLogType {
    InvalidChangeType = 0,
    FamilyGroupCreated = 1,
    FamilyGroupModified = 2,
    FamilyGroupDeleted = 3,
    AccountInvited = 4,
    InviteDeniedByGroupSize = 5,
    JoinedFamilyGroup = 6,
    JoinDeniedByRegionMismatch = 7,
    JoinDeniedByMissingIpAddress = 8,
    JoinDeniedByFamilyCooldown = 9,
    JoinDeniedByUserCooldown = 10,
    JoinDeniedByOtherGroup = 11,
    AccountRemoved = 12,
    InviteCanceled = 13,
    PurchaseRequested = 14,
    ParentalSettingsEnabled = 15,
    ParentalSettingsDisabled = 16,
    ParentalSettingsChanged = 17,
    FamilyCooldownOverridesChanged = 18,
    PurchaseRequestCanceled = 19,
    PurchaseRequestApproved = 20,
    PurchaseRequestDeclined = 21,
    CooldownSkipConsumed = 22,
    FamilyGroupRestored = 23,
    JoinDenied = 24,
    SupportForceAcceptedInvite = 25,
}

impl EFamilyGroupChangeLogType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::InvalidChangeType as i32 => Some(Self::InvalidChangeType),
            x if x == Self::FamilyGroupCreated as i32 => Some(Self::FamilyGroupCreated),
            x if x == Self::FamilyGroupModified as i32 => Some(Self::FamilyGroupModified),
            x if x == Self::FamilyGroupDeleted as i32 => Some(Self::FamilyGroupDeleted),
            x if x == Self::AccountInvited as i32 => Some(Self::AccountInvited),
            x if x == Self::InviteDeniedByGroupSize as i32 => Some(Self::InviteDeniedByGroupSize),
            x if x == Self::JoinedFamilyGroup as i32 => Some(Self::JoinedFamilyGroup),
            x if x == Self::JoinDeniedByRegionMismatch as i32 => Some(Self::JoinDeniedByRegionMismatch),
            x if x == Self::JoinDeniedByMissingIpAddress as i32 => Some(Self::JoinDeniedByMissingIpAddress),
            x if x == Self::JoinDeniedByFamilyCooldown as i32 => Some(Self::JoinDeniedByFamilyCooldown),
            x if x == Self::JoinDeniedByUserCooldown as i32 => Some(Self::JoinDeniedByUserCooldown),
            x if x == Self::JoinDeniedByOtherGroup as i32 => Some(Self::JoinDeniedByOtherGroup),
            x if x == Self::AccountRemoved as i32 => Some(Self::AccountRemoved),
            x if x == Self::InviteCanceled as i32 => Some(Self::InviteCanceled),
            x if x == Self::PurchaseRequested as i32 => Some(Self::PurchaseRequested),
            x if x == Self::ParentalSettingsEnabled as i32 => Some(Self::ParentalSettingsEnabled),
            x if x == Self::ParentalSettingsDisabled as i32 => Some(Self::ParentalSettingsDisabled),
            x if x == Self::ParentalSettingsChanged as i32 => Some(Self::ParentalSettingsChanged),
            x if x == Self::FamilyCooldownOverridesChanged as i32 => Some(Self::FamilyCooldownOverridesChanged),
            x if x == Self::PurchaseRequestCanceled as i32 => Some(Self::PurchaseRequestCanceled),
            x if x == Self::PurchaseRequestApproved as i32 => Some(Self::PurchaseRequestApproved),
            x if x == Self::PurchaseRequestDeclined as i32 => Some(Self::PurchaseRequestDeclined),
            x if x == Self::CooldownSkipConsumed as i32 => Some(Self::CooldownSkipConsumed),
            x if x == Self::FamilyGroupRestored as i32 => Some(Self::FamilyGroupRestored),
            x if x == Self::JoinDenied as i32 => Some(Self::JoinDenied),
            x if x == Self::SupportForceAcceptedInvite as i32 => Some(Self::SupportForceAcceptedInvite),
            _ => None,
        }
    }
}
