{-# 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.TaskFailedEventDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TaskFailedEventDetails = TaskFailedEventDetails'
{
TaskFailedEventDetails -> Maybe (Sensitive Text)
error :: Prelude.Maybe (Core.Sensitive Prelude.Text),
TaskFailedEventDetails -> Maybe (Sensitive Text)
cause :: Prelude.Maybe (Core.Sensitive Prelude.Text),
TaskFailedEventDetails -> Text
resourceType :: Prelude.Text,
TaskFailedEventDetails -> Text
resource :: Prelude.Text
}
deriving (TaskFailedEventDetails -> TaskFailedEventDetails -> Bool
(TaskFailedEventDetails -> TaskFailedEventDetails -> Bool)
-> (TaskFailedEventDetails -> TaskFailedEventDetails -> Bool)
-> Eq TaskFailedEventDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TaskFailedEventDetails -> TaskFailedEventDetails -> Bool
$c/= :: TaskFailedEventDetails -> TaskFailedEventDetails -> Bool
== :: TaskFailedEventDetails -> TaskFailedEventDetails -> Bool
$c== :: TaskFailedEventDetails -> TaskFailedEventDetails -> Bool
Prelude.Eq, Int -> TaskFailedEventDetails -> ShowS
[TaskFailedEventDetails] -> ShowS
TaskFailedEventDetails -> String
(Int -> TaskFailedEventDetails -> ShowS)
-> (TaskFailedEventDetails -> String)
-> ([TaskFailedEventDetails] -> ShowS)
-> Show TaskFailedEventDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TaskFailedEventDetails] -> ShowS
$cshowList :: [TaskFailedEventDetails] -> ShowS
show :: TaskFailedEventDetails -> String
$cshow :: TaskFailedEventDetails -> String
showsPrec :: Int -> TaskFailedEventDetails -> ShowS
$cshowsPrec :: Int -> TaskFailedEventDetails -> ShowS
Prelude.Show, (forall x. TaskFailedEventDetails -> Rep TaskFailedEventDetails x)
-> (forall x.
Rep TaskFailedEventDetails x -> TaskFailedEventDetails)
-> Generic TaskFailedEventDetails
forall x. Rep TaskFailedEventDetails x -> TaskFailedEventDetails
forall x. TaskFailedEventDetails -> Rep TaskFailedEventDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TaskFailedEventDetails x -> TaskFailedEventDetails
$cfrom :: forall x. TaskFailedEventDetails -> Rep TaskFailedEventDetails x
Prelude.Generic)
newTaskFailedEventDetails ::
Prelude.Text ->
Prelude.Text ->
TaskFailedEventDetails
newTaskFailedEventDetails :: Text -> Text -> TaskFailedEventDetails
newTaskFailedEventDetails Text
pResourceType_ Text
pResource_ =
TaskFailedEventDetails' :: Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> Text -> Text -> TaskFailedEventDetails
TaskFailedEventDetails'
{ $sel:error:TaskFailedEventDetails' :: Maybe (Sensitive Text)
error = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:cause:TaskFailedEventDetails' :: Maybe (Sensitive Text)
cause = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:TaskFailedEventDetails' :: Text
resourceType = Text
pResourceType_,
$sel:resource:TaskFailedEventDetails' :: Text
resource = Text
pResource_
}
taskFailedEventDetails_error :: Lens.Lens' TaskFailedEventDetails (Prelude.Maybe Prelude.Text)
taskFailedEventDetails_error :: (Maybe Text -> f (Maybe Text))
-> TaskFailedEventDetails -> f TaskFailedEventDetails
taskFailedEventDetails_error = (TaskFailedEventDetails -> Maybe (Sensitive Text))
-> (TaskFailedEventDetails
-> Maybe (Sensitive Text) -> TaskFailedEventDetails)
-> Lens
TaskFailedEventDetails
TaskFailedEventDetails
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskFailedEventDetails' {Maybe (Sensitive Text)
error :: Maybe (Sensitive Text)
$sel:error:TaskFailedEventDetails' :: TaskFailedEventDetails -> Maybe (Sensitive Text)
error} -> Maybe (Sensitive Text)
error) (\s :: TaskFailedEventDetails
s@TaskFailedEventDetails' {} Maybe (Sensitive Text)
a -> TaskFailedEventDetails
s {$sel:error:TaskFailedEventDetails' :: Maybe (Sensitive Text)
error = Maybe (Sensitive Text)
a} :: TaskFailedEventDetails) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> TaskFailedEventDetails -> f TaskFailedEventDetails)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> TaskFailedEventDetails
-> f TaskFailedEventDetails
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
taskFailedEventDetails_cause :: Lens.Lens' TaskFailedEventDetails (Prelude.Maybe Prelude.Text)
taskFailedEventDetails_cause :: (Maybe Text -> f (Maybe Text))
-> TaskFailedEventDetails -> f TaskFailedEventDetails
taskFailedEventDetails_cause = (TaskFailedEventDetails -> Maybe (Sensitive Text))
-> (TaskFailedEventDetails
-> Maybe (Sensitive Text) -> TaskFailedEventDetails)
-> Lens
TaskFailedEventDetails
TaskFailedEventDetails
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskFailedEventDetails' {Maybe (Sensitive Text)
cause :: Maybe (Sensitive Text)
$sel:cause:TaskFailedEventDetails' :: TaskFailedEventDetails -> Maybe (Sensitive Text)
cause} -> Maybe (Sensitive Text)
cause) (\s :: TaskFailedEventDetails
s@TaskFailedEventDetails' {} Maybe (Sensitive Text)
a -> TaskFailedEventDetails
s {$sel:cause:TaskFailedEventDetails' :: Maybe (Sensitive Text)
cause = Maybe (Sensitive Text)
a} :: TaskFailedEventDetails) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> TaskFailedEventDetails -> f TaskFailedEventDetails)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> TaskFailedEventDetails
-> f TaskFailedEventDetails
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
taskFailedEventDetails_resourceType :: Lens.Lens' TaskFailedEventDetails Prelude.Text
taskFailedEventDetails_resourceType :: (Text -> f Text)
-> TaskFailedEventDetails -> f TaskFailedEventDetails
taskFailedEventDetails_resourceType = (TaskFailedEventDetails -> Text)
-> (TaskFailedEventDetails -> Text -> TaskFailedEventDetails)
-> Lens TaskFailedEventDetails TaskFailedEventDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskFailedEventDetails' {Text
resourceType :: Text
$sel:resourceType:TaskFailedEventDetails' :: TaskFailedEventDetails -> Text
resourceType} -> Text
resourceType) (\s :: TaskFailedEventDetails
s@TaskFailedEventDetails' {} Text
a -> TaskFailedEventDetails
s {$sel:resourceType:TaskFailedEventDetails' :: Text
resourceType = Text
a} :: TaskFailedEventDetails)
taskFailedEventDetails_resource :: Lens.Lens' TaskFailedEventDetails Prelude.Text
taskFailedEventDetails_resource :: (Text -> f Text)
-> TaskFailedEventDetails -> f TaskFailedEventDetails
taskFailedEventDetails_resource = (TaskFailedEventDetails -> Text)
-> (TaskFailedEventDetails -> Text -> TaskFailedEventDetails)
-> Lens TaskFailedEventDetails TaskFailedEventDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskFailedEventDetails' {Text
resource :: Text
$sel:resource:TaskFailedEventDetails' :: TaskFailedEventDetails -> Text
resource} -> Text
resource) (\s :: TaskFailedEventDetails
s@TaskFailedEventDetails' {} Text
a -> TaskFailedEventDetails
s {$sel:resource:TaskFailedEventDetails' :: Text
resource = Text
a} :: TaskFailedEventDetails)
instance Core.FromJSON TaskFailedEventDetails where
parseJSON :: Value -> Parser TaskFailedEventDetails
parseJSON =
String
-> (Object -> Parser TaskFailedEventDetails)
-> Value
-> Parser TaskFailedEventDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TaskFailedEventDetails"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> Text -> Text -> TaskFailedEventDetails
TaskFailedEventDetails'
(Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Text
-> Text
-> TaskFailedEventDetails)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe (Sensitive Text) -> Text -> Text -> TaskFailedEventDetails)
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) -> Text -> Text -> TaskFailedEventDetails)
-> Parser (Maybe (Sensitive Text))
-> Parser (Text -> Text -> TaskFailedEventDetails)
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")
Parser (Text -> Text -> TaskFailedEventDetails)
-> Parser Text -> Parser (Text -> TaskFailedEventDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourceType")
Parser (Text -> TaskFailedEventDetails)
-> Parser Text -> Parser TaskFailedEventDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resource")
)
instance Prelude.Hashable TaskFailedEventDetails
instance Prelude.NFData TaskFailedEventDetails