{-# 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.TaskStartedEventDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TaskStartedEventDetails = TaskStartedEventDetails'
{
TaskStartedEventDetails -> Text
resourceType :: Prelude.Text,
TaskStartedEventDetails -> Text
resource :: Prelude.Text
}
deriving (TaskStartedEventDetails -> TaskStartedEventDetails -> Bool
(TaskStartedEventDetails -> TaskStartedEventDetails -> Bool)
-> (TaskStartedEventDetails -> TaskStartedEventDetails -> Bool)
-> Eq TaskStartedEventDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TaskStartedEventDetails -> TaskStartedEventDetails -> Bool
$c/= :: TaskStartedEventDetails -> TaskStartedEventDetails -> Bool
== :: TaskStartedEventDetails -> TaskStartedEventDetails -> Bool
$c== :: TaskStartedEventDetails -> TaskStartedEventDetails -> Bool
Prelude.Eq, ReadPrec [TaskStartedEventDetails]
ReadPrec TaskStartedEventDetails
Int -> ReadS TaskStartedEventDetails
ReadS [TaskStartedEventDetails]
(Int -> ReadS TaskStartedEventDetails)
-> ReadS [TaskStartedEventDetails]
-> ReadPrec TaskStartedEventDetails
-> ReadPrec [TaskStartedEventDetails]
-> Read TaskStartedEventDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TaskStartedEventDetails]
$creadListPrec :: ReadPrec [TaskStartedEventDetails]
readPrec :: ReadPrec TaskStartedEventDetails
$creadPrec :: ReadPrec TaskStartedEventDetails
readList :: ReadS [TaskStartedEventDetails]
$creadList :: ReadS [TaskStartedEventDetails]
readsPrec :: Int -> ReadS TaskStartedEventDetails
$creadsPrec :: Int -> ReadS TaskStartedEventDetails
Prelude.Read, Int -> TaskStartedEventDetails -> ShowS
[TaskStartedEventDetails] -> ShowS
TaskStartedEventDetails -> String
(Int -> TaskStartedEventDetails -> ShowS)
-> (TaskStartedEventDetails -> String)
-> ([TaskStartedEventDetails] -> ShowS)
-> Show TaskStartedEventDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TaskStartedEventDetails] -> ShowS
$cshowList :: [TaskStartedEventDetails] -> ShowS
show :: TaskStartedEventDetails -> String
$cshow :: TaskStartedEventDetails -> String
showsPrec :: Int -> TaskStartedEventDetails -> ShowS
$cshowsPrec :: Int -> TaskStartedEventDetails -> ShowS
Prelude.Show, (forall x.
TaskStartedEventDetails -> Rep TaskStartedEventDetails x)
-> (forall x.
Rep TaskStartedEventDetails x -> TaskStartedEventDetails)
-> Generic TaskStartedEventDetails
forall x. Rep TaskStartedEventDetails x -> TaskStartedEventDetails
forall x. TaskStartedEventDetails -> Rep TaskStartedEventDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TaskStartedEventDetails x -> TaskStartedEventDetails
$cfrom :: forall x. TaskStartedEventDetails -> Rep TaskStartedEventDetails x
Prelude.Generic)
newTaskStartedEventDetails ::
Prelude.Text ->
Prelude.Text ->
TaskStartedEventDetails
newTaskStartedEventDetails :: Text -> Text -> TaskStartedEventDetails
newTaskStartedEventDetails Text
pResourceType_ Text
pResource_ =
TaskStartedEventDetails' :: Text -> Text -> TaskStartedEventDetails
TaskStartedEventDetails'
{ $sel:resourceType:TaskStartedEventDetails' :: Text
resourceType =
Text
pResourceType_,
$sel:resource:TaskStartedEventDetails' :: Text
resource = Text
pResource_
}
taskStartedEventDetails_resourceType :: Lens.Lens' TaskStartedEventDetails Prelude.Text
taskStartedEventDetails_resourceType :: (Text -> f Text)
-> TaskStartedEventDetails -> f TaskStartedEventDetails
taskStartedEventDetails_resourceType = (TaskStartedEventDetails -> Text)
-> (TaskStartedEventDetails -> Text -> TaskStartedEventDetails)
-> Lens TaskStartedEventDetails TaskStartedEventDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskStartedEventDetails' {Text
resourceType :: Text
$sel:resourceType:TaskStartedEventDetails' :: TaskStartedEventDetails -> Text
resourceType} -> Text
resourceType) (\s :: TaskStartedEventDetails
s@TaskStartedEventDetails' {} Text
a -> TaskStartedEventDetails
s {$sel:resourceType:TaskStartedEventDetails' :: Text
resourceType = Text
a} :: TaskStartedEventDetails)
taskStartedEventDetails_resource :: Lens.Lens' TaskStartedEventDetails Prelude.Text
taskStartedEventDetails_resource :: (Text -> f Text)
-> TaskStartedEventDetails -> f TaskStartedEventDetails
taskStartedEventDetails_resource = (TaskStartedEventDetails -> Text)
-> (TaskStartedEventDetails -> Text -> TaskStartedEventDetails)
-> Lens TaskStartedEventDetails TaskStartedEventDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskStartedEventDetails' {Text
resource :: Text
$sel:resource:TaskStartedEventDetails' :: TaskStartedEventDetails -> Text
resource} -> Text
resource) (\s :: TaskStartedEventDetails
s@TaskStartedEventDetails' {} Text
a -> TaskStartedEventDetails
s {$sel:resource:TaskStartedEventDetails' :: Text
resource = Text
a} :: TaskStartedEventDetails)
instance Core.FromJSON TaskStartedEventDetails where
parseJSON :: Value -> Parser TaskStartedEventDetails
parseJSON =
String
-> (Object -> Parser TaskStartedEventDetails)
-> Value
-> Parser TaskStartedEventDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TaskStartedEventDetails"
( \Object
x ->
Text -> Text -> TaskStartedEventDetails
TaskStartedEventDetails'
(Text -> Text -> TaskStartedEventDetails)
-> Parser Text -> Parser (Text -> TaskStartedEventDetails)
forall (f :: * -> *) a b. Functor 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 -> TaskStartedEventDetails)
-> Parser Text -> Parser TaskStartedEventDetails
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 TaskStartedEventDetails
instance Prelude.NFData TaskStartedEventDetails