{-# 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.Transfer.Types.ExecutionResults where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transfer.Types.ExecutionStepResult
data ExecutionResults = ExecutionResults'
{
ExecutionResults -> Maybe (NonEmpty ExecutionStepResult)
onExceptionSteps :: Prelude.Maybe (Prelude.NonEmpty ExecutionStepResult),
ExecutionResults -> Maybe (NonEmpty ExecutionStepResult)
steps :: Prelude.Maybe (Prelude.NonEmpty ExecutionStepResult)
}
deriving (ExecutionResults -> ExecutionResults -> Bool
(ExecutionResults -> ExecutionResults -> Bool)
-> (ExecutionResults -> ExecutionResults -> Bool)
-> Eq ExecutionResults
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecutionResults -> ExecutionResults -> Bool
$c/= :: ExecutionResults -> ExecutionResults -> Bool
== :: ExecutionResults -> ExecutionResults -> Bool
$c== :: ExecutionResults -> ExecutionResults -> Bool
Prelude.Eq, ReadPrec [ExecutionResults]
ReadPrec ExecutionResults
Int -> ReadS ExecutionResults
ReadS [ExecutionResults]
(Int -> ReadS ExecutionResults)
-> ReadS [ExecutionResults]
-> ReadPrec ExecutionResults
-> ReadPrec [ExecutionResults]
-> Read ExecutionResults
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecutionResults]
$creadListPrec :: ReadPrec [ExecutionResults]
readPrec :: ReadPrec ExecutionResults
$creadPrec :: ReadPrec ExecutionResults
readList :: ReadS [ExecutionResults]
$creadList :: ReadS [ExecutionResults]
readsPrec :: Int -> ReadS ExecutionResults
$creadsPrec :: Int -> ReadS ExecutionResults
Prelude.Read, Int -> ExecutionResults -> ShowS
[ExecutionResults] -> ShowS
ExecutionResults -> String
(Int -> ExecutionResults -> ShowS)
-> (ExecutionResults -> String)
-> ([ExecutionResults] -> ShowS)
-> Show ExecutionResults
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecutionResults] -> ShowS
$cshowList :: [ExecutionResults] -> ShowS
show :: ExecutionResults -> String
$cshow :: ExecutionResults -> String
showsPrec :: Int -> ExecutionResults -> ShowS
$cshowsPrec :: Int -> ExecutionResults -> ShowS
Prelude.Show, (forall x. ExecutionResults -> Rep ExecutionResults x)
-> (forall x. Rep ExecutionResults x -> ExecutionResults)
-> Generic ExecutionResults
forall x. Rep ExecutionResults x -> ExecutionResults
forall x. ExecutionResults -> Rep ExecutionResults x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecutionResults x -> ExecutionResults
$cfrom :: forall x. ExecutionResults -> Rep ExecutionResults x
Prelude.Generic)
newExecutionResults ::
ExecutionResults
newExecutionResults :: ExecutionResults
newExecutionResults =
ExecutionResults' :: Maybe (NonEmpty ExecutionStepResult)
-> Maybe (NonEmpty ExecutionStepResult) -> ExecutionResults
ExecutionResults'
{ $sel:onExceptionSteps:ExecutionResults' :: Maybe (NonEmpty ExecutionStepResult)
onExceptionSteps =
Maybe (NonEmpty ExecutionStepResult)
forall a. Maybe a
Prelude.Nothing,
$sel:steps:ExecutionResults' :: Maybe (NonEmpty ExecutionStepResult)
steps = Maybe (NonEmpty ExecutionStepResult)
forall a. Maybe a
Prelude.Nothing
}
executionResults_onExceptionSteps :: Lens.Lens' ExecutionResults (Prelude.Maybe (Prelude.NonEmpty ExecutionStepResult))
executionResults_onExceptionSteps :: (Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> ExecutionResults -> f ExecutionResults
executionResults_onExceptionSteps = (ExecutionResults -> Maybe (NonEmpty ExecutionStepResult))
-> (ExecutionResults
-> Maybe (NonEmpty ExecutionStepResult) -> ExecutionResults)
-> Lens
ExecutionResults
ExecutionResults
(Maybe (NonEmpty ExecutionStepResult))
(Maybe (NonEmpty ExecutionStepResult))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionResults' {Maybe (NonEmpty ExecutionStepResult)
onExceptionSteps :: Maybe (NonEmpty ExecutionStepResult)
$sel:onExceptionSteps:ExecutionResults' :: ExecutionResults -> Maybe (NonEmpty ExecutionStepResult)
onExceptionSteps} -> Maybe (NonEmpty ExecutionStepResult)
onExceptionSteps) (\s :: ExecutionResults
s@ExecutionResults' {} Maybe (NonEmpty ExecutionStepResult)
a -> ExecutionResults
s {$sel:onExceptionSteps:ExecutionResults' :: Maybe (NonEmpty ExecutionStepResult)
onExceptionSteps = Maybe (NonEmpty ExecutionStepResult)
a} :: ExecutionResults) ((Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> ExecutionResults -> f ExecutionResults)
-> ((Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> (Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> ExecutionResults
-> f ExecutionResults
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
-> Iso
(Maybe (NonEmpty ExecutionStepResult))
(Maybe (NonEmpty ExecutionStepResult))
(Maybe (NonEmpty ExecutionStepResult))
(Maybe (NonEmpty ExecutionStepResult))
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
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
executionResults_steps :: Lens.Lens' ExecutionResults (Prelude.Maybe (Prelude.NonEmpty ExecutionStepResult))
executionResults_steps :: (Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> ExecutionResults -> f ExecutionResults
executionResults_steps = (ExecutionResults -> Maybe (NonEmpty ExecutionStepResult))
-> (ExecutionResults
-> Maybe (NonEmpty ExecutionStepResult) -> ExecutionResults)
-> Lens
ExecutionResults
ExecutionResults
(Maybe (NonEmpty ExecutionStepResult))
(Maybe (NonEmpty ExecutionStepResult))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionResults' {Maybe (NonEmpty ExecutionStepResult)
steps :: Maybe (NonEmpty ExecutionStepResult)
$sel:steps:ExecutionResults' :: ExecutionResults -> Maybe (NonEmpty ExecutionStepResult)
steps} -> Maybe (NonEmpty ExecutionStepResult)
steps) (\s :: ExecutionResults
s@ExecutionResults' {} Maybe (NonEmpty ExecutionStepResult)
a -> ExecutionResults
s {$sel:steps:ExecutionResults' :: Maybe (NonEmpty ExecutionStepResult)
steps = Maybe (NonEmpty ExecutionStepResult)
a} :: ExecutionResults) ((Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> ExecutionResults -> f ExecutionResults)
-> ((Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> (Maybe (NonEmpty ExecutionStepResult)
-> f (Maybe (NonEmpty ExecutionStepResult)))
-> ExecutionResults
-> f ExecutionResults
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
-> Iso
(Maybe (NonEmpty ExecutionStepResult))
(Maybe (NonEmpty ExecutionStepResult))
(Maybe (NonEmpty ExecutionStepResult))
(Maybe (NonEmpty ExecutionStepResult))
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
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
(NonEmpty ExecutionStepResult)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ExecutionResults where
parseJSON :: Value -> Parser ExecutionResults
parseJSON =
String
-> (Object -> Parser ExecutionResults)
-> Value
-> Parser ExecutionResults
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExecutionResults"
( \Object
x ->
Maybe (NonEmpty ExecutionStepResult)
-> Maybe (NonEmpty ExecutionStepResult) -> ExecutionResults
ExecutionResults'
(Maybe (NonEmpty ExecutionStepResult)
-> Maybe (NonEmpty ExecutionStepResult) -> ExecutionResults)
-> Parser (Maybe (NonEmpty ExecutionStepResult))
-> Parser
(Maybe (NonEmpty ExecutionStepResult) -> ExecutionResults)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (NonEmpty ExecutionStepResult))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OnExceptionSteps")
Parser (Maybe (NonEmpty ExecutionStepResult) -> ExecutionResults)
-> Parser (Maybe (NonEmpty ExecutionStepResult))
-> Parser ExecutionResults
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty ExecutionStepResult))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Steps")
)
instance Prelude.Hashable ExecutionResults
instance Prelude.NFData ExecutionResults