{-# 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.StepFunctions.Types.ExecutionFailedEventDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExecutionFailedEventDetails = ExecutionFailedEventDetails'
{
ExecutionFailedEventDetails -> Maybe (Sensitive Text)
error :: Prelude.Maybe (Core.Sensitive Prelude.Text),
ExecutionFailedEventDetails -> Maybe (Sensitive Text)
cause :: Prelude.Maybe (Core.Sensitive Prelude.Text)
}
deriving (ExecutionFailedEventDetails -> ExecutionFailedEventDetails -> Bool
(ExecutionFailedEventDetails
-> ExecutionFailedEventDetails -> Bool)
-> (ExecutionFailedEventDetails
-> ExecutionFailedEventDetails -> Bool)
-> Eq ExecutionFailedEventDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecutionFailedEventDetails -> ExecutionFailedEventDetails -> Bool
$c/= :: ExecutionFailedEventDetails -> ExecutionFailedEventDetails -> Bool
== :: ExecutionFailedEventDetails -> ExecutionFailedEventDetails -> Bool
$c== :: ExecutionFailedEventDetails -> ExecutionFailedEventDetails -> Bool
Prelude.Eq, Int -> ExecutionFailedEventDetails -> ShowS
[ExecutionFailedEventDetails] -> ShowS
ExecutionFailedEventDetails -> String
(Int -> ExecutionFailedEventDetails -> ShowS)
-> (ExecutionFailedEventDetails -> String)
-> ([ExecutionFailedEventDetails] -> ShowS)
-> Show ExecutionFailedEventDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecutionFailedEventDetails] -> ShowS
$cshowList :: [ExecutionFailedEventDetails] -> ShowS
show :: ExecutionFailedEventDetails -> String
$cshow :: ExecutionFailedEventDetails -> String
showsPrec :: Int -> ExecutionFailedEventDetails -> ShowS
$cshowsPrec :: Int -> ExecutionFailedEventDetails -> ShowS
Prelude.Show, (forall x.
ExecutionFailedEventDetails -> Rep ExecutionFailedEventDetails x)
-> (forall x.
Rep ExecutionFailedEventDetails x -> ExecutionFailedEventDetails)
-> Generic ExecutionFailedEventDetails
forall x.
Rep ExecutionFailedEventDetails x -> ExecutionFailedEventDetails
forall x.
ExecutionFailedEventDetails -> Rep ExecutionFailedEventDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExecutionFailedEventDetails x -> ExecutionFailedEventDetails
$cfrom :: forall x.
ExecutionFailedEventDetails -> Rep ExecutionFailedEventDetails x
Prelude.Generic)
newExecutionFailedEventDetails ::
ExecutionFailedEventDetails
newExecutionFailedEventDetails :: ExecutionFailedEventDetails
newExecutionFailedEventDetails =
ExecutionFailedEventDetails' :: Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> ExecutionFailedEventDetails
ExecutionFailedEventDetails'
{ $sel:error:ExecutionFailedEventDetails' :: Maybe (Sensitive Text)
error =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:cause:ExecutionFailedEventDetails' :: Maybe (Sensitive Text)
cause = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing
}
executionFailedEventDetails_error :: Lens.Lens' ExecutionFailedEventDetails (Prelude.Maybe Prelude.Text)
executionFailedEventDetails_error :: (Maybe Text -> f (Maybe Text))
-> ExecutionFailedEventDetails -> f ExecutionFailedEventDetails
executionFailedEventDetails_error = (ExecutionFailedEventDetails -> Maybe (Sensitive Text))
-> (ExecutionFailedEventDetails
-> Maybe (Sensitive Text) -> ExecutionFailedEventDetails)
-> Lens
ExecutionFailedEventDetails
ExecutionFailedEventDetails
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionFailedEventDetails' {Maybe (Sensitive Text)
error :: Maybe (Sensitive Text)
$sel:error:ExecutionFailedEventDetails' :: ExecutionFailedEventDetails -> Maybe (Sensitive Text)
error} -> Maybe (Sensitive Text)
error) (\s :: ExecutionFailedEventDetails
s@ExecutionFailedEventDetails' {} Maybe (Sensitive Text)
a -> ExecutionFailedEventDetails
s {$sel:error:ExecutionFailedEventDetails' :: Maybe (Sensitive Text)
error = Maybe (Sensitive Text)
a} :: ExecutionFailedEventDetails) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ExecutionFailedEventDetails -> f ExecutionFailedEventDetails)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ExecutionFailedEventDetails
-> f ExecutionFailedEventDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
executionFailedEventDetails_cause :: Lens.Lens' ExecutionFailedEventDetails (Prelude.Maybe Prelude.Text)
executionFailedEventDetails_cause :: (Maybe Text -> f (Maybe Text))
-> ExecutionFailedEventDetails -> f ExecutionFailedEventDetails
executionFailedEventDetails_cause = (ExecutionFailedEventDetails -> Maybe (Sensitive Text))
-> (ExecutionFailedEventDetails
-> Maybe (Sensitive Text) -> ExecutionFailedEventDetails)
-> Lens
ExecutionFailedEventDetails
ExecutionFailedEventDetails
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionFailedEventDetails' {Maybe (Sensitive Text)
cause :: Maybe (Sensitive Text)
$sel:cause:ExecutionFailedEventDetails' :: ExecutionFailedEventDetails -> Maybe (Sensitive Text)
cause} -> Maybe (Sensitive Text)
cause) (\s :: ExecutionFailedEventDetails
s@ExecutionFailedEventDetails' {} Maybe (Sensitive Text)
a -> ExecutionFailedEventDetails
s {$sel:cause:ExecutionFailedEventDetails' :: Maybe (Sensitive Text)
cause = Maybe (Sensitive Text)
a} :: ExecutionFailedEventDetails) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ExecutionFailedEventDetails -> f ExecutionFailedEventDetails)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ExecutionFailedEventDetails
-> f ExecutionFailedEventDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.FromJSON ExecutionFailedEventDetails where
parseJSON :: Value -> Parser ExecutionFailedEventDetails
parseJSON =
String
-> (Object -> Parser ExecutionFailedEventDetails)
-> Value
-> Parser ExecutionFailedEventDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExecutionFailedEventDetails"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> ExecutionFailedEventDetails
ExecutionFailedEventDetails'
(Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> ExecutionFailedEventDetails)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe (Sensitive Text) -> ExecutionFailedEventDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"error")
Parser (Maybe (Sensitive Text) -> ExecutionFailedEventDetails)
-> Parser (Maybe (Sensitive Text))
-> Parser ExecutionFailedEventDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cause")
)
instance Prelude.Hashable ExecutionFailedEventDetails
instance Prelude.NFData ExecutionFailedEventDetails