{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.Mobile.Types.Sum where
import Network.AWS.Prelude
data Platform
= Android
| Javascript
| Linux
| OSx
| Objc
| Swift
| Windows
deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
instance FromText Platform where
parser = takeLowerText >>= \case
"android" -> pure Android
"javascript" -> pure Javascript
"linux" -> pure Linux
"osx" -> pure OSx
"objc" -> pure Objc
"swift" -> pure Swift
"windows" -> pure Windows
e -> fromTextError $ "Failure parsing Platform from value: '" <> e
<> "'. Accepted values: android, javascript, linux, osx, objc, swift, windows"
instance ToText Platform where
toText = \case
Android -> "ANDROID"
Javascript -> "JAVASCRIPT"
Linux -> "LINUX"
OSx -> "OSX"
Objc -> "OBJC"
Swift -> "SWIFT"
Windows -> "WINDOWS"
instance Hashable Platform
instance NFData Platform
instance ToByteString Platform
instance ToQuery Platform
instance ToHeader Platform
instance ToJSON Platform where
toJSON = toJSONText
instance FromJSON Platform where
parseJSON = parseJSONText "Platform"
data ProjectState
= Importing
| Normal
| Syncing
deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
instance FromText ProjectState where
parser = takeLowerText >>= \case
"importing" -> pure Importing
"normal" -> pure Normal
"syncing" -> pure Syncing
e -> fromTextError $ "Failure parsing ProjectState from value: '" <> e
<> "'. Accepted values: importing, normal, syncing"
instance ToText ProjectState where
toText = \case
Importing -> "IMPORTING"
Normal -> "NORMAL"
Syncing -> "SYNCING"
instance Hashable ProjectState
instance NFData ProjectState
instance ToByteString ProjectState
instance ToQuery ProjectState
instance ToHeader ProjectState
instance FromJSON ProjectState where
parseJSON = parseJSONText "ProjectState"