#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EPublishedFileQueryType {
    RankedByVote = 0,
    RankedByPublicationDate = 1,
    AcceptedForGameRankedByAcceptanceDate = 2,
    RankedByTrend = 3,
    FavoritedByFriendsRankedByPublicationDate = 4,
    CreatedByFriendsRankedByPublicationDate = 5,
    RankedByNumTimesReported = 6,
    CreatedByFollowedUsersRankedByPublicationDate = 7,
    NotYetRated = 8,
    RankedByTotalUniqueSubscriptions = 9,
    RankedByTotalVotesAsc = 10,
    RankedByVotesUp = 11,
    RankedByTextSearch = 12,
    RankedByPlaytimeTrend = 13,
    RankedByTotalPlaytime = 14,
    RankedByAveragePlaytimeTrend = 15,
    RankedByLifetimeAveragePlaytime = 16,
    RankedByPlaytimeSessionsTrend = 17,
    RankedByLifetimePlaytimeSessions = 18,
    RankedByInappropriateContentRating = 19,
    RankedByBanContentCheck = 20,
    RankedByLastUpdatedDate = 21,
}

impl EPublishedFileQueryType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::RankedByVote as i32 => Some(Self::RankedByVote),
            x if x == Self::RankedByPublicationDate as i32 => Some(Self::RankedByPublicationDate),
            x if x == Self::AcceptedForGameRankedByAcceptanceDate as i32 => Some(Self::AcceptedForGameRankedByAcceptanceDate),
            x if x == Self::RankedByTrend as i32 => Some(Self::RankedByTrend),
            x if x == Self::FavoritedByFriendsRankedByPublicationDate as i32 => Some(Self::FavoritedByFriendsRankedByPublicationDate),
            x if x == Self::CreatedByFriendsRankedByPublicationDate as i32 => Some(Self::CreatedByFriendsRankedByPublicationDate),
            x if x == Self::RankedByNumTimesReported as i32 => Some(Self::RankedByNumTimesReported),
            x if x == Self::CreatedByFollowedUsersRankedByPublicationDate as i32 => Some(Self::CreatedByFollowedUsersRankedByPublicationDate),
            x if x == Self::NotYetRated as i32 => Some(Self::NotYetRated),
            x if x == Self::RankedByTotalUniqueSubscriptions as i32 => Some(Self::RankedByTotalUniqueSubscriptions),
            x if x == Self::RankedByTotalVotesAsc as i32 => Some(Self::RankedByTotalVotesAsc),
            x if x == Self::RankedByVotesUp as i32 => Some(Self::RankedByVotesUp),
            x if x == Self::RankedByTextSearch as i32 => Some(Self::RankedByTextSearch),
            x if x == Self::RankedByPlaytimeTrend as i32 => Some(Self::RankedByPlaytimeTrend),
            x if x == Self::RankedByTotalPlaytime as i32 => Some(Self::RankedByTotalPlaytime),
            x if x == Self::RankedByAveragePlaytimeTrend as i32 => Some(Self::RankedByAveragePlaytimeTrend),
            x if x == Self::RankedByLifetimeAveragePlaytime as i32 => Some(Self::RankedByLifetimeAveragePlaytime),
            x if x == Self::RankedByPlaytimeSessionsTrend as i32 => Some(Self::RankedByPlaytimeSessionsTrend),
            x if x == Self::RankedByLifetimePlaytimeSessions as i32 => Some(Self::RankedByLifetimePlaytimeSessions),
            x if x == Self::RankedByInappropriateContentRating as i32 => Some(Self::RankedByInappropriateContentRating),
            x if x == Self::RankedByBanContentCheck as i32 => Some(Self::RankedByBanContentCheck),
            x if x == Self::RankedByLastUpdatedDate as i32 => Some(Self::RankedByLastUpdatedDate),
            _ => None,
        }
    }
}
