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