{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AppFlow.Types.ExecutionDetails where
import Amazonka.AppFlow.Types.ExecutionStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExecutionDetails = ExecutionDetails'
{
ExecutionDetails -> Maybe Text
mostRecentExecutionMessage :: Prelude.Maybe Prelude.Text,
ExecutionDetails -> Maybe ExecutionStatus
mostRecentExecutionStatus :: Prelude.Maybe ExecutionStatus,
ExecutionDetails -> Maybe POSIX
mostRecentExecutionTime :: Prelude.Maybe Core.POSIX
}
deriving (ExecutionDetails -> ExecutionDetails -> Bool
(ExecutionDetails -> ExecutionDetails -> Bool)
-> (ExecutionDetails -> ExecutionDetails -> Bool)
-> Eq ExecutionDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecutionDetails -> ExecutionDetails -> Bool
$c/= :: ExecutionDetails -> ExecutionDetails -> Bool
== :: ExecutionDetails -> ExecutionDetails -> Bool
$c== :: ExecutionDetails -> ExecutionDetails -> Bool
Prelude.Eq, ReadPrec [ExecutionDetails]
ReadPrec ExecutionDetails
Int -> ReadS ExecutionDetails
ReadS [ExecutionDetails]
(Int -> ReadS ExecutionDetails)
-> ReadS [ExecutionDetails]
-> ReadPrec ExecutionDetails
-> ReadPrec [ExecutionDetails]
-> Read ExecutionDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecutionDetails]
$creadListPrec :: ReadPrec [ExecutionDetails]
readPrec :: ReadPrec ExecutionDetails
$creadPrec :: ReadPrec ExecutionDetails
readList :: ReadS [ExecutionDetails]
$creadList :: ReadS [ExecutionDetails]
readsPrec :: Int -> ReadS ExecutionDetails
$creadsPrec :: Int -> ReadS ExecutionDetails
Prelude.Read, Int -> ExecutionDetails -> ShowS
[ExecutionDetails] -> ShowS
ExecutionDetails -> String
(Int -> ExecutionDetails -> ShowS)
-> (ExecutionDetails -> String)
-> ([ExecutionDetails] -> ShowS)
-> Show ExecutionDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecutionDetails] -> ShowS
$cshowList :: [ExecutionDetails] -> ShowS
show :: ExecutionDetails -> String
$cshow :: ExecutionDetails -> String
showsPrec :: Int -> ExecutionDetails -> ShowS
$cshowsPrec :: Int -> ExecutionDetails -> ShowS
Prelude.Show, (forall x. ExecutionDetails -> Rep ExecutionDetails x)
-> (forall x. Rep ExecutionDetails x -> ExecutionDetails)
-> Generic ExecutionDetails
forall x. Rep ExecutionDetails x -> ExecutionDetails
forall x. ExecutionDetails -> Rep ExecutionDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecutionDetails x -> ExecutionDetails
$cfrom :: forall x. ExecutionDetails -> Rep ExecutionDetails x
Prelude.Generic)
newExecutionDetails ::
ExecutionDetails
newExecutionDetails :: ExecutionDetails
newExecutionDetails =
ExecutionDetails' :: Maybe Text
-> Maybe ExecutionStatus -> Maybe POSIX -> ExecutionDetails
ExecutionDetails'
{ $sel:mostRecentExecutionMessage:ExecutionDetails' :: Maybe Text
mostRecentExecutionMessage =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mostRecentExecutionStatus:ExecutionDetails' :: Maybe ExecutionStatus
mostRecentExecutionStatus = Maybe ExecutionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:mostRecentExecutionTime:ExecutionDetails' :: Maybe POSIX
mostRecentExecutionTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
executionDetails_mostRecentExecutionMessage :: Lens.Lens' ExecutionDetails (Prelude.Maybe Prelude.Text)
executionDetails_mostRecentExecutionMessage :: (Maybe Text -> f (Maybe Text))
-> ExecutionDetails -> f ExecutionDetails
executionDetails_mostRecentExecutionMessage = (ExecutionDetails -> Maybe Text)
-> (ExecutionDetails -> Maybe Text -> ExecutionDetails)
-> Lens ExecutionDetails ExecutionDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionDetails' {Maybe Text
mostRecentExecutionMessage :: Maybe Text
$sel:mostRecentExecutionMessage:ExecutionDetails' :: ExecutionDetails -> Maybe Text
mostRecentExecutionMessage} -> Maybe Text
mostRecentExecutionMessage) (\s :: ExecutionDetails
s@ExecutionDetails' {} Maybe Text
a -> ExecutionDetails
s {$sel:mostRecentExecutionMessage:ExecutionDetails' :: Maybe Text
mostRecentExecutionMessage = Maybe Text
a} :: ExecutionDetails)
executionDetails_mostRecentExecutionStatus :: Lens.Lens' ExecutionDetails (Prelude.Maybe ExecutionStatus)
executionDetails_mostRecentExecutionStatus :: (Maybe ExecutionStatus -> f (Maybe ExecutionStatus))
-> ExecutionDetails -> f ExecutionDetails
executionDetails_mostRecentExecutionStatus = (ExecutionDetails -> Maybe ExecutionStatus)
-> (ExecutionDetails -> Maybe ExecutionStatus -> ExecutionDetails)
-> Lens
ExecutionDetails
ExecutionDetails
(Maybe ExecutionStatus)
(Maybe ExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionDetails' {Maybe ExecutionStatus
mostRecentExecutionStatus :: Maybe ExecutionStatus
$sel:mostRecentExecutionStatus:ExecutionDetails' :: ExecutionDetails -> Maybe ExecutionStatus
mostRecentExecutionStatus} -> Maybe ExecutionStatus
mostRecentExecutionStatus) (\s :: ExecutionDetails
s@ExecutionDetails' {} Maybe ExecutionStatus
a -> ExecutionDetails
s {$sel:mostRecentExecutionStatus:ExecutionDetails' :: Maybe ExecutionStatus
mostRecentExecutionStatus = Maybe ExecutionStatus
a} :: ExecutionDetails)
executionDetails_mostRecentExecutionTime :: Lens.Lens' ExecutionDetails (Prelude.Maybe Prelude.UTCTime)
executionDetails_mostRecentExecutionTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ExecutionDetails -> f ExecutionDetails
executionDetails_mostRecentExecutionTime = (ExecutionDetails -> Maybe POSIX)
-> (ExecutionDetails -> Maybe POSIX -> ExecutionDetails)
-> Lens
ExecutionDetails ExecutionDetails (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionDetails' {Maybe POSIX
mostRecentExecutionTime :: Maybe POSIX
$sel:mostRecentExecutionTime:ExecutionDetails' :: ExecutionDetails -> Maybe POSIX
mostRecentExecutionTime} -> Maybe POSIX
mostRecentExecutionTime) (\s :: ExecutionDetails
s@ExecutionDetails' {} Maybe POSIX
a -> ExecutionDetails
s {$sel:mostRecentExecutionTime:ExecutionDetails' :: Maybe POSIX
mostRecentExecutionTime = Maybe POSIX
a} :: ExecutionDetails) ((Maybe POSIX -> f (Maybe POSIX))
-> ExecutionDetails -> f ExecutionDetails)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ExecutionDetails
-> f ExecutionDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON ExecutionDetails where
parseJSON :: Value -> Parser ExecutionDetails
parseJSON =
String
-> (Object -> Parser ExecutionDetails)
-> Value
-> Parser ExecutionDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExecutionDetails"
( \Object
x ->
Maybe Text
-> Maybe ExecutionStatus -> Maybe POSIX -> ExecutionDetails
ExecutionDetails'
(Maybe Text
-> Maybe ExecutionStatus -> Maybe POSIX -> ExecutionDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe ExecutionStatus -> Maybe POSIX -> ExecutionDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mostRecentExecutionMessage")
Parser (Maybe ExecutionStatus -> Maybe POSIX -> ExecutionDetails)
-> Parser (Maybe ExecutionStatus)
-> Parser (Maybe POSIX -> ExecutionDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mostRecentExecutionStatus")
Parser (Maybe POSIX -> ExecutionDetails)
-> Parser (Maybe POSIX) -> Parser ExecutionDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mostRecentExecutionTime")
)
instance Prelude.Hashable ExecutionDetails
instance Prelude.NFData ExecutionDetails