module Network.Google.Fonts.Types.Sum where
import Network.Google.Prelude
data WebfontsListSort
= Alpha
| Date
| Popularity
| Style
| Trending
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable WebfontsListSort
instance FromText WebfontsListSort where
fromText = \case
"alpha" -> Just Alpha
"date" -> Just Date
"popularity" -> Just Popularity
"style" -> Just Style
"trending" -> Just Trending
_ -> Nothing
instance ToText WebfontsListSort where
toText = \case
Alpha -> "alpha"
Date -> "date"
Popularity -> "popularity"
Style -> "style"
Trending -> "trending"
instance FromJSON WebfontsListSort where
parseJSON = parseJSONText "WebfontsListSort"
instance ToJSON WebfontsListSort where
toJSON = toJSONText