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