{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.GamesConfiguration.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data ImageConfigurationsUploadImageType
= AchievementIcon
| LeaderboardIcon
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ImageConfigurationsUploadImageType
instance FromHttpApiData ImageConfigurationsUploadImageType where
parseQueryParam = \case
"ACHIEVEMENT_ICON" -> Right AchievementIcon
"LEADERBOARD_ICON" -> Right LeaderboardIcon
x -> Left ("Unable to parse ImageConfigurationsUploadImageType from: " <> x)
instance ToHttpApiData ImageConfigurationsUploadImageType where
toQueryParam = \case
AchievementIcon -> "ACHIEVEMENT_ICON"
LeaderboardIcon -> "LEADERBOARD_ICON"
instance FromJSON ImageConfigurationsUploadImageType where
parseJSON = parseJSONText "ImageConfigurationsUploadImageType"
instance ToJSON ImageConfigurationsUploadImageType where
toJSON = toJSONText