{-# 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.DataExchange.Types.EventActionEntry where
import qualified Amazonka.Core as Core
import Amazonka.DataExchange.Types.Action
import Amazonka.DataExchange.Types.Event
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EventActionEntry = EventActionEntry'
{
EventActionEntry -> Action
action :: Action,
EventActionEntry -> POSIX
createdAt :: Core.POSIX,
EventActionEntry -> Event
event :: Event,
EventActionEntry -> Text
id :: Prelude.Text,
EventActionEntry -> Text
arn :: Prelude.Text,
EventActionEntry -> POSIX
updatedAt :: Core.POSIX
}
deriving (EventActionEntry -> EventActionEntry -> Bool
(EventActionEntry -> EventActionEntry -> Bool)
-> (EventActionEntry -> EventActionEntry -> Bool)
-> Eq EventActionEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventActionEntry -> EventActionEntry -> Bool
$c/= :: EventActionEntry -> EventActionEntry -> Bool
== :: EventActionEntry -> EventActionEntry -> Bool
$c== :: EventActionEntry -> EventActionEntry -> Bool
Prelude.Eq, ReadPrec [EventActionEntry]
ReadPrec EventActionEntry
Int -> ReadS EventActionEntry
ReadS [EventActionEntry]
(Int -> ReadS EventActionEntry)
-> ReadS [EventActionEntry]
-> ReadPrec EventActionEntry
-> ReadPrec [EventActionEntry]
-> Read EventActionEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventActionEntry]
$creadListPrec :: ReadPrec [EventActionEntry]
readPrec :: ReadPrec EventActionEntry
$creadPrec :: ReadPrec EventActionEntry
readList :: ReadS [EventActionEntry]
$creadList :: ReadS [EventActionEntry]
readsPrec :: Int -> ReadS EventActionEntry
$creadsPrec :: Int -> ReadS EventActionEntry
Prelude.Read, Int -> EventActionEntry -> ShowS
[EventActionEntry] -> ShowS
EventActionEntry -> String
(Int -> EventActionEntry -> ShowS)
-> (EventActionEntry -> String)
-> ([EventActionEntry] -> ShowS)
-> Show EventActionEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventActionEntry] -> ShowS
$cshowList :: [EventActionEntry] -> ShowS
show :: EventActionEntry -> String
$cshow :: EventActionEntry -> String
showsPrec :: Int -> EventActionEntry -> ShowS
$cshowsPrec :: Int -> EventActionEntry -> ShowS
Prelude.Show, (forall x. EventActionEntry -> Rep EventActionEntry x)
-> (forall x. Rep EventActionEntry x -> EventActionEntry)
-> Generic EventActionEntry
forall x. Rep EventActionEntry x -> EventActionEntry
forall x. EventActionEntry -> Rep EventActionEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventActionEntry x -> EventActionEntry
$cfrom :: forall x. EventActionEntry -> Rep EventActionEntry x
Prelude.Generic)
newEventActionEntry ::
Action ->
Prelude.UTCTime ->
Event ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
EventActionEntry
newEventActionEntry :: Action
-> UTCTime -> Event -> Text -> Text -> UTCTime -> EventActionEntry
newEventActionEntry
Action
pAction_
UTCTime
pCreatedAt_
Event
pEvent_
Text
pId_
Text
pArn_
UTCTime
pUpdatedAt_ =
EventActionEntry' :: Action
-> POSIX -> Event -> Text -> Text -> POSIX -> EventActionEntry
EventActionEntry'
{ $sel:action:EventActionEntry' :: Action
action = Action
pAction_,
$sel:createdAt:EventActionEntry' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:event:EventActionEntry' :: Event
event = Event
pEvent_,
$sel:id:EventActionEntry' :: Text
id = Text
pId_,
$sel:arn:EventActionEntry' :: Text
arn = Text
pArn_,
$sel:updatedAt:EventActionEntry' :: POSIX
updatedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_
}
eventActionEntry_action :: Lens.Lens' EventActionEntry Action
eventActionEntry_action :: (Action -> f Action) -> EventActionEntry -> f EventActionEntry
eventActionEntry_action = (EventActionEntry -> Action)
-> (EventActionEntry -> Action -> EventActionEntry)
-> Lens EventActionEntry EventActionEntry Action Action
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventActionEntry' {Action
action :: Action
$sel:action:EventActionEntry' :: EventActionEntry -> Action
action} -> Action
action) (\s :: EventActionEntry
s@EventActionEntry' {} Action
a -> EventActionEntry
s {$sel:action:EventActionEntry' :: Action
action = Action
a} :: EventActionEntry)
eventActionEntry_createdAt :: Lens.Lens' EventActionEntry Prelude.UTCTime
eventActionEntry_createdAt :: (UTCTime -> f UTCTime) -> EventActionEntry -> f EventActionEntry
eventActionEntry_createdAt = (EventActionEntry -> POSIX)
-> (EventActionEntry -> POSIX -> EventActionEntry)
-> Lens EventActionEntry EventActionEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventActionEntry' {POSIX
createdAt :: POSIX
$sel:createdAt:EventActionEntry' :: EventActionEntry -> POSIX
createdAt} -> POSIX
createdAt) (\s :: EventActionEntry
s@EventActionEntry' {} POSIX
a -> EventActionEntry
s {$sel:createdAt:EventActionEntry' :: POSIX
createdAt = POSIX
a} :: EventActionEntry) ((POSIX -> f POSIX) -> EventActionEntry -> f EventActionEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EventActionEntry
-> f EventActionEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
eventActionEntry_event :: Lens.Lens' EventActionEntry Event
eventActionEntry_event :: (Event -> f Event) -> EventActionEntry -> f EventActionEntry
eventActionEntry_event = (EventActionEntry -> Event)
-> (EventActionEntry -> Event -> EventActionEntry)
-> Lens EventActionEntry EventActionEntry Event Event
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventActionEntry' {Event
event :: Event
$sel:event:EventActionEntry' :: EventActionEntry -> Event
event} -> Event
event) (\s :: EventActionEntry
s@EventActionEntry' {} Event
a -> EventActionEntry
s {$sel:event:EventActionEntry' :: Event
event = Event
a} :: EventActionEntry)
eventActionEntry_id :: Lens.Lens' EventActionEntry Prelude.Text
eventActionEntry_id :: (Text -> f Text) -> EventActionEntry -> f EventActionEntry
eventActionEntry_id = (EventActionEntry -> Text)
-> (EventActionEntry -> Text -> EventActionEntry)
-> Lens EventActionEntry EventActionEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventActionEntry' {Text
id :: Text
$sel:id:EventActionEntry' :: EventActionEntry -> Text
id} -> Text
id) (\s :: EventActionEntry
s@EventActionEntry' {} Text
a -> EventActionEntry
s {$sel:id:EventActionEntry' :: Text
id = Text
a} :: EventActionEntry)
eventActionEntry_arn :: Lens.Lens' EventActionEntry Prelude.Text
eventActionEntry_arn :: (Text -> f Text) -> EventActionEntry -> f EventActionEntry
eventActionEntry_arn = (EventActionEntry -> Text)
-> (EventActionEntry -> Text -> EventActionEntry)
-> Lens EventActionEntry EventActionEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventActionEntry' {Text
arn :: Text
$sel:arn:EventActionEntry' :: EventActionEntry -> Text
arn} -> Text
arn) (\s :: EventActionEntry
s@EventActionEntry' {} Text
a -> EventActionEntry
s {$sel:arn:EventActionEntry' :: Text
arn = Text
a} :: EventActionEntry)
eventActionEntry_updatedAt :: Lens.Lens' EventActionEntry Prelude.UTCTime
eventActionEntry_updatedAt :: (UTCTime -> f UTCTime) -> EventActionEntry -> f EventActionEntry
eventActionEntry_updatedAt = (EventActionEntry -> POSIX)
-> (EventActionEntry -> POSIX -> EventActionEntry)
-> Lens EventActionEntry EventActionEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventActionEntry' {POSIX
updatedAt :: POSIX
$sel:updatedAt:EventActionEntry' :: EventActionEntry -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: EventActionEntry
s@EventActionEntry' {} POSIX
a -> EventActionEntry
s {$sel:updatedAt:EventActionEntry' :: POSIX
updatedAt = POSIX
a} :: EventActionEntry) ((POSIX -> f POSIX) -> EventActionEntry -> f EventActionEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EventActionEntry
-> f EventActionEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON EventActionEntry where
parseJSON :: Value -> Parser EventActionEntry
parseJSON =
String
-> (Object -> Parser EventActionEntry)
-> Value
-> Parser EventActionEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EventActionEntry"
( \Object
x ->
Action
-> POSIX -> Event -> Text -> Text -> POSIX -> EventActionEntry
EventActionEntry'
(Action
-> POSIX -> Event -> Text -> Text -> POSIX -> EventActionEntry)
-> Parser Action
-> Parser
(POSIX -> Event -> Text -> Text -> POSIX -> EventActionEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Action
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Action")
Parser
(POSIX -> Event -> Text -> Text -> POSIX -> EventActionEntry)
-> Parser POSIX
-> Parser (Event -> Text -> Text -> POSIX -> EventActionEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreatedAt")
Parser (Event -> Text -> Text -> POSIX -> EventActionEntry)
-> Parser Event
-> Parser (Text -> Text -> POSIX -> EventActionEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Event
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Event")
Parser (Text -> Text -> POSIX -> EventActionEntry)
-> Parser Text -> Parser (Text -> POSIX -> EventActionEntry)
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
"Id")
Parser (Text -> POSIX -> EventActionEntry)
-> Parser Text -> Parser (POSIX -> EventActionEntry)
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
"Arn")
Parser (POSIX -> EventActionEntry)
-> Parser POSIX -> Parser EventActionEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"UpdatedAt")
)
instance Prelude.Hashable EventActionEntry
instance Prelude.NFData EventActionEntry