{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.Lambda.Types.Sum where
import Network.AWS.Prelude
data EventSourcePosition
= AtTimestamp
| Latest
| TrimHorizon
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText EventSourcePosition where
parser = takeLowerText >>= \case
"at_timestamp" -> pure AtTimestamp
"latest" -> pure Latest
"trim_horizon" -> pure TrimHorizon
e -> fromTextError $ "Failure parsing EventSourcePosition from value: '" <> e
<> "'. Accepted values: at_timestamp, latest, trim_horizon"
instance ToText EventSourcePosition where
toText = \case
AtTimestamp -> "AT_TIMESTAMP"
Latest -> "LATEST"
TrimHorizon -> "TRIM_HORIZON"
instance Hashable EventSourcePosition
instance NFData EventSourcePosition
instance ToByteString EventSourcePosition
instance ToQuery EventSourcePosition
instance ToHeader EventSourcePosition
instance ToJSON EventSourcePosition where
toJSON = toJSONText
data InvocationType
= DryRun
| Event
| RequestResponse
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText InvocationType where
parser = takeLowerText >>= \case
"dryrun" -> pure DryRun
"event" -> pure Event
"requestresponse" -> pure RequestResponse
e -> fromTextError $ "Failure parsing InvocationType from value: '" <> e
<> "'. Accepted values: dryrun, event, requestresponse"
instance ToText InvocationType where
toText = \case
DryRun -> "DryRun"
Event -> "Event"
RequestResponse -> "RequestResponse"
instance Hashable InvocationType
instance NFData InvocationType
instance ToByteString InvocationType
instance ToQuery InvocationType
instance ToHeader InvocationType
instance ToJSON InvocationType where
toJSON = toJSONText
data LogType
= None
| Tail
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText LogType where
parser = takeLowerText >>= \case
"none" -> pure None
"tail" -> pure Tail
e -> fromTextError $ "Failure parsing LogType from value: '" <> e
<> "'. Accepted values: none, tail"
instance ToText LogType where
toText = \case
None -> "None"
Tail -> "Tail"
instance Hashable LogType
instance NFData LogType
instance ToByteString LogType
instance ToQuery LogType
instance ToHeader LogType
instance ToJSON LogType where
toJSON = toJSONText
data Runtime
= DOTNETCORE1_0
| JAVA8
| NODEJS4_3
| NODEJS4_3Edge
| Nodejs
| PYTHON2_7
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText Runtime where
parser = takeLowerText >>= \case
"dotnetcore1.0" -> pure DOTNETCORE1_0
"java8" -> pure JAVA8
"nodejs4.3" -> pure NODEJS4_3
"nodejs4.3-edge" -> pure NODEJS4_3Edge
"nodejs" -> pure Nodejs
"python2.7" -> pure PYTHON2_7
e -> fromTextError $ "Failure parsing Runtime from value: '" <> e
<> "'. Accepted values: dotnetcore1.0, java8, nodejs4.3, nodejs4.3-edge, nodejs, python2.7"
instance ToText Runtime where
toText = \case
DOTNETCORE1_0 -> "dotnetcore1.0"
JAVA8 -> "java8"
NODEJS4_3 -> "nodejs4.3"
NODEJS4_3Edge -> "nodejs4.3-edge"
Nodejs -> "nodejs"
PYTHON2_7 -> "python2.7"
instance Hashable Runtime
instance NFData Runtime
instance ToByteString Runtime
instance ToQuery Runtime
instance ToHeader Runtime
instance ToJSON Runtime where
toJSON = toJSONText
instance FromJSON Runtime where
parseJSON = parseJSONText "Runtime"