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