{-# 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.ExecutionStepResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transfer.Types.ExecutionError
import Amazonka.Transfer.Types.WorkflowStepType
data ExecutionStepResult = ExecutionStepResult'
{
ExecutionStepResult -> Maybe WorkflowStepType
stepType :: Prelude.Maybe WorkflowStepType,
ExecutionStepResult -> Maybe ExecutionError
error :: Prelude.Maybe ExecutionError,
ExecutionStepResult -> Maybe Text
outputs :: Prelude.Maybe Prelude.Text
}
deriving (ExecutionStepResult -> ExecutionStepResult -> Bool
(ExecutionStepResult -> ExecutionStepResult -> Bool)
-> (ExecutionStepResult -> ExecutionStepResult -> Bool)
-> Eq ExecutionStepResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecutionStepResult -> ExecutionStepResult -> Bool
$c/= :: ExecutionStepResult -> ExecutionStepResult -> Bool
== :: ExecutionStepResult -> ExecutionStepResult -> Bool
$c== :: ExecutionStepResult -> ExecutionStepResult -> Bool
Prelude.Eq, ReadPrec [ExecutionStepResult]
ReadPrec ExecutionStepResult
Int -> ReadS ExecutionStepResult
ReadS [ExecutionStepResult]
(Int -> ReadS ExecutionStepResult)
-> ReadS [ExecutionStepResult]
-> ReadPrec ExecutionStepResult
-> ReadPrec [ExecutionStepResult]
-> Read ExecutionStepResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecutionStepResult]
$creadListPrec :: ReadPrec [ExecutionStepResult]
readPrec :: ReadPrec ExecutionStepResult
$creadPrec :: ReadPrec ExecutionStepResult
readList :: ReadS [ExecutionStepResult]
$creadList :: ReadS [ExecutionStepResult]
readsPrec :: Int -> ReadS ExecutionStepResult
$creadsPrec :: Int -> ReadS ExecutionStepResult
Prelude.Read, Int -> ExecutionStepResult -> ShowS
[ExecutionStepResult] -> ShowS
ExecutionStepResult -> String
(Int -> ExecutionStepResult -> ShowS)
-> (ExecutionStepResult -> String)
-> ([ExecutionStepResult] -> ShowS)
-> Show ExecutionStepResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecutionStepResult] -> ShowS
$cshowList :: [ExecutionStepResult] -> ShowS
show :: ExecutionStepResult -> String
$cshow :: ExecutionStepResult -> String
showsPrec :: Int -> ExecutionStepResult -> ShowS
$cshowsPrec :: Int -> ExecutionStepResult -> ShowS
Prelude.Show, (forall x. ExecutionStepResult -> Rep ExecutionStepResult x)
-> (forall x. Rep ExecutionStepResult x -> ExecutionStepResult)
-> Generic ExecutionStepResult
forall x. Rep ExecutionStepResult x -> ExecutionStepResult
forall x. ExecutionStepResult -> Rep ExecutionStepResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecutionStepResult x -> ExecutionStepResult
$cfrom :: forall x. ExecutionStepResult -> Rep ExecutionStepResult x
Prelude.Generic)
newExecutionStepResult ::
ExecutionStepResult
newExecutionStepResult :: ExecutionStepResult
newExecutionStepResult =
ExecutionStepResult' :: Maybe WorkflowStepType
-> Maybe ExecutionError -> Maybe Text -> ExecutionStepResult
ExecutionStepResult'
{ $sel:stepType:ExecutionStepResult' :: Maybe WorkflowStepType
stepType = Maybe WorkflowStepType
forall a. Maybe a
Prelude.Nothing,
$sel:error:ExecutionStepResult' :: Maybe ExecutionError
error = Maybe ExecutionError
forall a. Maybe a
Prelude.Nothing,
$sel:outputs:ExecutionStepResult' :: Maybe Text
outputs = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
executionStepResult_stepType :: Lens.Lens' ExecutionStepResult (Prelude.Maybe WorkflowStepType)
executionStepResult_stepType :: (Maybe WorkflowStepType -> f (Maybe WorkflowStepType))
-> ExecutionStepResult -> f ExecutionStepResult
executionStepResult_stepType = (ExecutionStepResult -> Maybe WorkflowStepType)
-> (ExecutionStepResult
-> Maybe WorkflowStepType -> ExecutionStepResult)
-> Lens
ExecutionStepResult
ExecutionStepResult
(Maybe WorkflowStepType)
(Maybe WorkflowStepType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionStepResult' {Maybe WorkflowStepType
stepType :: Maybe WorkflowStepType
$sel:stepType:ExecutionStepResult' :: ExecutionStepResult -> Maybe WorkflowStepType
stepType} -> Maybe WorkflowStepType
stepType) (\s :: ExecutionStepResult
s@ExecutionStepResult' {} Maybe WorkflowStepType
a -> ExecutionStepResult
s {$sel:stepType:ExecutionStepResult' :: Maybe WorkflowStepType
stepType = Maybe WorkflowStepType
a} :: ExecutionStepResult)
executionStepResult_error :: Lens.Lens' ExecutionStepResult (Prelude.Maybe ExecutionError)
executionStepResult_error :: (Maybe ExecutionError -> f (Maybe ExecutionError))
-> ExecutionStepResult -> f ExecutionStepResult
executionStepResult_error = (ExecutionStepResult -> Maybe ExecutionError)
-> (ExecutionStepResult
-> Maybe ExecutionError -> ExecutionStepResult)
-> Lens
ExecutionStepResult
ExecutionStepResult
(Maybe ExecutionError)
(Maybe ExecutionError)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionStepResult' {Maybe ExecutionError
error :: Maybe ExecutionError
$sel:error:ExecutionStepResult' :: ExecutionStepResult -> Maybe ExecutionError
error} -> Maybe ExecutionError
error) (\s :: ExecutionStepResult
s@ExecutionStepResult' {} Maybe ExecutionError
a -> ExecutionStepResult
s {$sel:error:ExecutionStepResult' :: Maybe ExecutionError
error = Maybe ExecutionError
a} :: ExecutionStepResult)
executionStepResult_outputs :: Lens.Lens' ExecutionStepResult (Prelude.Maybe Prelude.Text)
executionStepResult_outputs :: (Maybe Text -> f (Maybe Text))
-> ExecutionStepResult -> f ExecutionStepResult
executionStepResult_outputs = (ExecutionStepResult -> Maybe Text)
-> (ExecutionStepResult -> Maybe Text -> ExecutionStepResult)
-> Lens
ExecutionStepResult ExecutionStepResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionStepResult' {Maybe Text
outputs :: Maybe Text
$sel:outputs:ExecutionStepResult' :: ExecutionStepResult -> Maybe Text
outputs} -> Maybe Text
outputs) (\s :: ExecutionStepResult
s@ExecutionStepResult' {} Maybe Text
a -> ExecutionStepResult
s {$sel:outputs:ExecutionStepResult' :: Maybe Text
outputs = Maybe Text
a} :: ExecutionStepResult)
instance Core.FromJSON ExecutionStepResult where
parseJSON :: Value -> Parser ExecutionStepResult
parseJSON =
String
-> (Object -> Parser ExecutionStepResult)
-> Value
-> Parser ExecutionStepResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExecutionStepResult"
( \Object
x ->
Maybe WorkflowStepType
-> Maybe ExecutionError -> Maybe Text -> ExecutionStepResult
ExecutionStepResult'
(Maybe WorkflowStepType
-> Maybe ExecutionError -> Maybe Text -> ExecutionStepResult)
-> Parser (Maybe WorkflowStepType)
-> Parser
(Maybe ExecutionError -> Maybe Text -> ExecutionStepResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe WorkflowStepType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StepType")
Parser (Maybe ExecutionError -> Maybe Text -> ExecutionStepResult)
-> Parser (Maybe ExecutionError)
-> Parser (Maybe Text -> ExecutionStepResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExecutionError)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Error")
Parser (Maybe Text -> ExecutionStepResult)
-> Parser (Maybe Text) -> Parser ExecutionStepResult
forall (f :: * -> *) a b. Applicative f => 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
"Outputs")
)
instance Prelude.Hashable ExecutionStepResult
instance Prelude.NFData ExecutionStepResult