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