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