{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DataExchange.Types.Action
import Amazonka.DataExchange.Types.Event
import qualified Amazonka.Prelude as Prelude
data EventActionEntry = EventActionEntry'
{
EventActionEntry -> Action
action :: Action,
EventActionEntry -> Text
arn :: Prelude.Text,
EventActionEntry -> ISO8601
createdAt :: Data.ISO8601,
EventActionEntry -> Event
event :: Event,
EventActionEntry -> Text
id :: Prelude.Text,
EventActionEntry -> ISO8601
updatedAt :: Data.ISO8601
}
deriving (EventActionEntry -> EventActionEntry -> Bool
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]
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
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. 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.Text ->
Prelude.UTCTime ->
Event ->
Prelude.Text ->
Prelude.UTCTime ->
EventActionEntry
newEventActionEntry :: Action
-> Text -> UTCTime -> Event -> Text -> UTCTime -> EventActionEntry
newEventActionEntry
Action
pAction_
Text
pArn_
UTCTime
pCreatedAt_
Event
pEvent_
Text
pId_
UTCTime
pUpdatedAt_ =
EventActionEntry'
{ $sel:action:EventActionEntry' :: Action
action = Action
pAction_,
$sel:arn:EventActionEntry' :: Text
arn = Text
pArn_,
$sel:createdAt:EventActionEntry' :: ISO8601
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time 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:updatedAt:EventActionEntry' :: ISO8601
updatedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_
}
eventActionEntry_action :: Lens.Lens' EventActionEntry Action
eventActionEntry_action :: Lens' EventActionEntry Action
eventActionEntry_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_arn :: Lens.Lens' EventActionEntry Prelude.Text
eventActionEntry_arn :: Lens' EventActionEntry Text
eventActionEntry_arn = 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_createdAt :: Lens.Lens' EventActionEntry Prelude.UTCTime
eventActionEntry_createdAt :: Lens' EventActionEntry UTCTime
eventActionEntry_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventActionEntry' {ISO8601
createdAt :: ISO8601
$sel:createdAt:EventActionEntry' :: EventActionEntry -> ISO8601
createdAt} -> ISO8601
createdAt) (\s :: EventActionEntry
s@EventActionEntry' {} ISO8601
a -> EventActionEntry
s {$sel:createdAt:EventActionEntry' :: ISO8601
createdAt = ISO8601
a} :: EventActionEntry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
eventActionEntry_event :: Lens.Lens' EventActionEntry Event
eventActionEntry_event :: Lens' EventActionEntry Event
eventActionEntry_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 :: Lens' EventActionEntry Text
eventActionEntry_id = 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_updatedAt :: Lens.Lens' EventActionEntry Prelude.UTCTime
eventActionEntry_updatedAt :: Lens' EventActionEntry UTCTime
eventActionEntry_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventActionEntry' {ISO8601
updatedAt :: ISO8601
$sel:updatedAt:EventActionEntry' :: EventActionEntry -> ISO8601
updatedAt} -> ISO8601
updatedAt) (\s :: EventActionEntry
s@EventActionEntry' {} ISO8601
a -> EventActionEntry
s {$sel:updatedAt:EventActionEntry' :: ISO8601
updatedAt = ISO8601
a} :: EventActionEntry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON EventActionEntry where
parseJSON :: Value -> Parser EventActionEntry
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EventActionEntry"
( \Object
x ->
Action
-> Text -> ISO8601 -> Event -> Text -> ISO8601 -> EventActionEntry
EventActionEntry'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Action")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CreatedAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Event")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"UpdatedAt")
)
instance Prelude.Hashable EventActionEntry where
hashWithSalt :: Int -> EventActionEntry -> Int
hashWithSalt Int
_salt EventActionEntry' {Text
ISO8601
Event
Action
updatedAt :: ISO8601
id :: Text
event :: Event
createdAt :: ISO8601
arn :: Text
action :: Action
$sel:updatedAt:EventActionEntry' :: EventActionEntry -> ISO8601
$sel:id:EventActionEntry' :: EventActionEntry -> Text
$sel:event:EventActionEntry' :: EventActionEntry -> Event
$sel:createdAt:EventActionEntry' :: EventActionEntry -> ISO8601
$sel:arn:EventActionEntry' :: EventActionEntry -> Text
$sel:action:EventActionEntry' :: EventActionEntry -> Action
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Action
action
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Event
event
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
updatedAt
instance Prelude.NFData EventActionEntry where
rnf :: EventActionEntry -> ()
rnf EventActionEntry' {Text
ISO8601
Event
Action
updatedAt :: ISO8601
id :: Text
event :: Event
createdAt :: ISO8601
arn :: Text
action :: Action
$sel:updatedAt:EventActionEntry' :: EventActionEntry -> ISO8601
$sel:id:EventActionEntry' :: EventActionEntry -> Text
$sel:event:EventActionEntry' :: EventActionEntry -> Event
$sel:createdAt:EventActionEntry' :: EventActionEntry -> ISO8601
$sel:arn:EventActionEntry' :: EventActionEntry -> Text
$sel:action:EventActionEntry' :: EventActionEntry -> Action
..} =
forall a. NFData a => a -> ()
Prelude.rnf Action
action
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Event
event
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
updatedAt