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