module Network.Google.Games.Types.Sum where
import Network.Google.Prelude
data PlayersListCollection
= PlayedWith
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PlayersListCollection
instance FromText PlayersListCollection where
fromText = \case
"played_with" -> Just PlayedWith
_ -> Nothing
instance ToText PlayersListCollection where
toText = \case
PlayedWith -> "played_with"
instance FromJSON PlayersListCollection where
parseJSON = parseJSONText "PlayersListCollection"
instance ToJSON PlayersListCollection where
toJSON = toJSONText
data ScoresListCollection
= Public
| Social
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable ScoresListCollection
instance FromText ScoresListCollection where
fromText = \case
"PUBLIC" -> Just Public
"SOCIAL" -> Just Social
_ -> Nothing
instance ToText ScoresListCollection where
toText = \case
Public -> "PUBLIC"
Social -> "SOCIAL"
instance FromJSON ScoresListCollection where
parseJSON = parseJSONText "ScoresListCollection"
instance ToJSON ScoresListCollection where
toJSON = toJSONText
data ApplicationsGetPlatformType
= Android
| Ios
| WebApp
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable ApplicationsGetPlatformType
instance FromText ApplicationsGetPlatformType where
fromText = \case
"ANDROID" -> Just Android
"IOS" -> Just Ios
"WEB_APP" -> Just WebApp
_ -> Nothing
instance ToText ApplicationsGetPlatformType where
toText = \case
Android -> "ANDROID"
Ios -> "IOS"
WebApp -> "WEB_APP"
instance FromJSON ApplicationsGetPlatformType where
parseJSON = parseJSONText "ApplicationsGetPlatformType"
instance ToJSON ApplicationsGetPlatformType where
toJSON = toJSONText
data ScoresListWindowCollection
= SLWCPublic
| SLWCSocial
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable ScoresListWindowCollection
instance FromText ScoresListWindowCollection where
fromText = \case
"PUBLIC" -> Just SLWCPublic
"SOCIAL" -> Just SLWCSocial
_ -> Nothing
instance ToText ScoresListWindowCollection where
toText = \case
SLWCPublic -> "PUBLIC"
SLWCSocial -> "SOCIAL"
instance FromJSON ScoresListWindowCollection where
parseJSON = parseJSONText "ScoresListWindowCollection"
instance ToJSON ScoresListWindowCollection where
toJSON = toJSONText
data ScoresListWindowTimeSpan
= AllTime
| Daily
| Weekly
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable ScoresListWindowTimeSpan
instance FromText ScoresListWindowTimeSpan where
fromText = \case
"ALL_TIME" -> Just AllTime
"DAILY" -> Just Daily
"WEEKLY" -> Just Weekly
_ -> Nothing
instance ToText ScoresListWindowTimeSpan where
toText = \case
AllTime -> "ALL_TIME"
Daily -> "DAILY"
Weekly -> "WEEKLY"
instance FromJSON ScoresListWindowTimeSpan where
parseJSON = parseJSONText "ScoresListWindowTimeSpan"
instance ToJSON ScoresListWindowTimeSpan where
toJSON = toJSONText
data ScoresGetTimeSpan
= SGTSAll
| SGTSAllTime
| SGTSDaily
| SGTSWeekly
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable ScoresGetTimeSpan
instance FromText ScoresGetTimeSpan where
fromText = \case
"ALL" -> Just SGTSAll
"ALL_TIME" -> Just SGTSAllTime
"DAILY" -> Just SGTSDaily
"WEEKLY" -> Just SGTSWeekly
_ -> Nothing
instance ToText ScoresGetTimeSpan where
toText = \case
SGTSAll -> "ALL"
SGTSAllTime -> "ALL_TIME"
SGTSDaily -> "DAILY"
SGTSWeekly -> "WEEKLY"
instance FromJSON ScoresGetTimeSpan where
parseJSON = parseJSONText "ScoresGetTimeSpan"
instance ToJSON ScoresGetTimeSpan where
toJSON = toJSONText
data ScoresGetIncludeRankType
= SGIRTAll
| SGIRTPublic
| SGIRTSocial
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable ScoresGetIncludeRankType
instance FromText ScoresGetIncludeRankType where
fromText = \case
"ALL" -> Just SGIRTAll
"PUBLIC" -> Just SGIRTPublic
"SOCIAL" -> Just SGIRTSocial
_ -> Nothing
instance ToText ScoresGetIncludeRankType where
toText = \case
SGIRTAll -> "ALL"
SGIRTPublic -> "PUBLIC"
SGIRTSocial -> "SOCIAL"
instance FromJSON ScoresGetIncludeRankType where
parseJSON = parseJSONText "ScoresGetIncludeRankType"
instance ToJSON ScoresGetIncludeRankType where
toJSON = toJSONText
data ScoresListTimeSpan
= SLTSAllTime
| SLTSDaily
| SLTSWeekly
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable ScoresListTimeSpan
instance FromText ScoresListTimeSpan where
fromText = \case
"ALL_TIME" -> Just SLTSAllTime
"DAILY" -> Just SLTSDaily
"WEEKLY" -> Just SLTSWeekly
_ -> Nothing
instance ToText ScoresListTimeSpan where
toText = \case
SLTSAllTime -> "ALL_TIME"
SLTSDaily -> "DAILY"
SLTSWeekly -> "WEEKLY"
instance FromJSON ScoresListTimeSpan where
parseJSON = parseJSONText "ScoresListTimeSpan"
instance ToJSON ScoresListTimeSpan where
toJSON = toJSONText
data MetagameListCategoriesByPlayerCollection
= All
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable MetagameListCategoriesByPlayerCollection
instance FromText MetagameListCategoriesByPlayerCollection where
fromText = \case
"all" -> Just All
_ -> Nothing
instance ToText MetagameListCategoriesByPlayerCollection where
toText = \case
All -> "all"
instance FromJSON MetagameListCategoriesByPlayerCollection where
parseJSON = parseJSONText "MetagameListCategoriesByPlayerCollection"
instance ToJSON MetagameListCategoriesByPlayerCollection where
toJSON = toJSONText
data AchievementsListState
= ALSAll
| ALSHidden
| ALSRevealed
| ALSUnlocked
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable AchievementsListState
instance FromText AchievementsListState where
fromText = \case
"ALL" -> Just ALSAll
"HIDDEN" -> Just ALSHidden
"REVEALED" -> Just ALSRevealed
"UNLOCKED" -> Just ALSUnlocked
_ -> Nothing
instance ToText AchievementsListState where
toText = \case
ALSAll -> "ALL"
ALSHidden -> "HIDDEN"
ALSRevealed -> "REVEALED"
ALSUnlocked -> "UNLOCKED"
instance FromJSON AchievementsListState where
parseJSON = parseJSONText "AchievementsListState"
instance ToJSON AchievementsListState where
toJSON = toJSONText