{-# 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.SSMIncidents.Types.TimelineEvent where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TimelineEvent = TimelineEvent'
{
TimelineEvent -> Text
eventData :: Prelude.Text,
TimelineEvent -> Text
eventId :: Prelude.Text,
TimelineEvent -> POSIX
eventTime :: Core.POSIX,
TimelineEvent -> Text
eventType :: Prelude.Text,
TimelineEvent -> POSIX
eventUpdatedTime :: Core.POSIX,
TimelineEvent -> Text
incidentRecordArn :: Prelude.Text
}
deriving (TimelineEvent -> TimelineEvent -> Bool
(TimelineEvent -> TimelineEvent -> Bool)
-> (TimelineEvent -> TimelineEvent -> Bool) -> Eq TimelineEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimelineEvent -> TimelineEvent -> Bool
$c/= :: TimelineEvent -> TimelineEvent -> Bool
== :: TimelineEvent -> TimelineEvent -> Bool
$c== :: TimelineEvent -> TimelineEvent -> Bool
Prelude.Eq, ReadPrec [TimelineEvent]
ReadPrec TimelineEvent
Int -> ReadS TimelineEvent
ReadS [TimelineEvent]
(Int -> ReadS TimelineEvent)
-> ReadS [TimelineEvent]
-> ReadPrec TimelineEvent
-> ReadPrec [TimelineEvent]
-> Read TimelineEvent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TimelineEvent]
$creadListPrec :: ReadPrec [TimelineEvent]
readPrec :: ReadPrec TimelineEvent
$creadPrec :: ReadPrec TimelineEvent
readList :: ReadS [TimelineEvent]
$creadList :: ReadS [TimelineEvent]
readsPrec :: Int -> ReadS TimelineEvent
$creadsPrec :: Int -> ReadS TimelineEvent
Prelude.Read, Int -> TimelineEvent -> ShowS
[TimelineEvent] -> ShowS
TimelineEvent -> String
(Int -> TimelineEvent -> ShowS)
-> (TimelineEvent -> String)
-> ([TimelineEvent] -> ShowS)
-> Show TimelineEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimelineEvent] -> ShowS
$cshowList :: [TimelineEvent] -> ShowS
show :: TimelineEvent -> String
$cshow :: TimelineEvent -> String
showsPrec :: Int -> TimelineEvent -> ShowS
$cshowsPrec :: Int -> TimelineEvent -> ShowS
Prelude.Show, (forall x. TimelineEvent -> Rep TimelineEvent x)
-> (forall x. Rep TimelineEvent x -> TimelineEvent)
-> Generic TimelineEvent
forall x. Rep TimelineEvent x -> TimelineEvent
forall x. TimelineEvent -> Rep TimelineEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TimelineEvent x -> TimelineEvent
$cfrom :: forall x. TimelineEvent -> Rep TimelineEvent x
Prelude.Generic)
newTimelineEvent ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
TimelineEvent
newTimelineEvent :: Text -> Text -> UTCTime -> Text -> UTCTime -> Text -> TimelineEvent
newTimelineEvent
Text
pEventData_
Text
pEventId_
UTCTime
pEventTime_
Text
pEventType_
UTCTime
pEventUpdatedTime_
Text
pIncidentRecordArn_ =
TimelineEvent' :: Text -> Text -> POSIX -> Text -> POSIX -> Text -> TimelineEvent
TimelineEvent'
{ $sel:eventData:TimelineEvent' :: Text
eventData = Text
pEventData_,
$sel:eventId:TimelineEvent' :: Text
eventId = Text
pEventId_,
$sel:eventTime:TimelineEvent' :: POSIX
eventTime = 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
pEventTime_,
$sel:eventType:TimelineEvent' :: Text
eventType = Text
pEventType_,
$sel:eventUpdatedTime:TimelineEvent' :: POSIX
eventUpdatedTime =
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
pEventUpdatedTime_,
$sel:incidentRecordArn:TimelineEvent' :: Text
incidentRecordArn = Text
pIncidentRecordArn_
}
timelineEvent_eventData :: Lens.Lens' TimelineEvent Prelude.Text
timelineEvent_eventData :: (Text -> f Text) -> TimelineEvent -> f TimelineEvent
timelineEvent_eventData = (TimelineEvent -> Text)
-> (TimelineEvent -> Text -> TimelineEvent)
-> Lens TimelineEvent TimelineEvent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimelineEvent' {Text
eventData :: Text
$sel:eventData:TimelineEvent' :: TimelineEvent -> Text
eventData} -> Text
eventData) (\s :: TimelineEvent
s@TimelineEvent' {} Text
a -> TimelineEvent
s {$sel:eventData:TimelineEvent' :: Text
eventData = Text
a} :: TimelineEvent)
timelineEvent_eventId :: Lens.Lens' TimelineEvent Prelude.Text
timelineEvent_eventId :: (Text -> f Text) -> TimelineEvent -> f TimelineEvent
timelineEvent_eventId = (TimelineEvent -> Text)
-> (TimelineEvent -> Text -> TimelineEvent)
-> Lens TimelineEvent TimelineEvent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimelineEvent' {Text
eventId :: Text
$sel:eventId:TimelineEvent' :: TimelineEvent -> Text
eventId} -> Text
eventId) (\s :: TimelineEvent
s@TimelineEvent' {} Text
a -> TimelineEvent
s {$sel:eventId:TimelineEvent' :: Text
eventId = Text
a} :: TimelineEvent)
timelineEvent_eventTime :: Lens.Lens' TimelineEvent Prelude.UTCTime
timelineEvent_eventTime :: (UTCTime -> f UTCTime) -> TimelineEvent -> f TimelineEvent
timelineEvent_eventTime = (TimelineEvent -> POSIX)
-> (TimelineEvent -> POSIX -> TimelineEvent)
-> Lens TimelineEvent TimelineEvent POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimelineEvent' {POSIX
eventTime :: POSIX
$sel:eventTime:TimelineEvent' :: TimelineEvent -> POSIX
eventTime} -> POSIX
eventTime) (\s :: TimelineEvent
s@TimelineEvent' {} POSIX
a -> TimelineEvent
s {$sel:eventTime:TimelineEvent' :: POSIX
eventTime = POSIX
a} :: TimelineEvent) ((POSIX -> f POSIX) -> TimelineEvent -> f TimelineEvent)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> TimelineEvent
-> f TimelineEvent
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
timelineEvent_eventType :: Lens.Lens' TimelineEvent Prelude.Text
timelineEvent_eventType :: (Text -> f Text) -> TimelineEvent -> f TimelineEvent
timelineEvent_eventType = (TimelineEvent -> Text)
-> (TimelineEvent -> Text -> TimelineEvent)
-> Lens TimelineEvent TimelineEvent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimelineEvent' {Text
eventType :: Text
$sel:eventType:TimelineEvent' :: TimelineEvent -> Text
eventType} -> Text
eventType) (\s :: TimelineEvent
s@TimelineEvent' {} Text
a -> TimelineEvent
s {$sel:eventType:TimelineEvent' :: Text
eventType = Text
a} :: TimelineEvent)
timelineEvent_eventUpdatedTime :: Lens.Lens' TimelineEvent Prelude.UTCTime
timelineEvent_eventUpdatedTime :: (UTCTime -> f UTCTime) -> TimelineEvent -> f TimelineEvent
timelineEvent_eventUpdatedTime = (TimelineEvent -> POSIX)
-> (TimelineEvent -> POSIX -> TimelineEvent)
-> Lens TimelineEvent TimelineEvent POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimelineEvent' {POSIX
eventUpdatedTime :: POSIX
$sel:eventUpdatedTime:TimelineEvent' :: TimelineEvent -> POSIX
eventUpdatedTime} -> POSIX
eventUpdatedTime) (\s :: TimelineEvent
s@TimelineEvent' {} POSIX
a -> TimelineEvent
s {$sel:eventUpdatedTime:TimelineEvent' :: POSIX
eventUpdatedTime = POSIX
a} :: TimelineEvent) ((POSIX -> f POSIX) -> TimelineEvent -> f TimelineEvent)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> TimelineEvent
-> f TimelineEvent
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
timelineEvent_incidentRecordArn :: Lens.Lens' TimelineEvent Prelude.Text
timelineEvent_incidentRecordArn :: (Text -> f Text) -> TimelineEvent -> f TimelineEvent
timelineEvent_incidentRecordArn = (TimelineEvent -> Text)
-> (TimelineEvent -> Text -> TimelineEvent)
-> Lens TimelineEvent TimelineEvent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimelineEvent' {Text
incidentRecordArn :: Text
$sel:incidentRecordArn:TimelineEvent' :: TimelineEvent -> Text
incidentRecordArn} -> Text
incidentRecordArn) (\s :: TimelineEvent
s@TimelineEvent' {} Text
a -> TimelineEvent
s {$sel:incidentRecordArn:TimelineEvent' :: Text
incidentRecordArn = Text
a} :: TimelineEvent)
instance Core.FromJSON TimelineEvent where
parseJSON :: Value -> Parser TimelineEvent
parseJSON =
String
-> (Object -> Parser TimelineEvent)
-> Value
-> Parser TimelineEvent
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TimelineEvent"
( \Object
x ->
Text -> Text -> POSIX -> Text -> POSIX -> Text -> TimelineEvent
TimelineEvent'
(Text -> Text -> POSIX -> Text -> POSIX -> Text -> TimelineEvent)
-> Parser Text
-> Parser (Text -> POSIX -> Text -> POSIX -> Text -> TimelineEvent)
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
"eventData")
Parser (Text -> POSIX -> Text -> POSIX -> Text -> TimelineEvent)
-> Parser Text
-> Parser (POSIX -> Text -> POSIX -> Text -> TimelineEvent)
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
"eventId")
Parser (POSIX -> Text -> POSIX -> Text -> TimelineEvent)
-> Parser POSIX -> Parser (Text -> POSIX -> Text -> TimelineEvent)
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
"eventTime")
Parser (Text -> POSIX -> Text -> TimelineEvent)
-> Parser Text -> Parser (POSIX -> Text -> TimelineEvent)
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
"eventType")
Parser (POSIX -> Text -> TimelineEvent)
-> Parser POSIX -> Parser (Text -> TimelineEvent)
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
"eventUpdatedTime")
Parser (Text -> TimelineEvent)
-> Parser Text -> Parser TimelineEvent
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
"incidentRecordArn")
)
instance Prelude.Hashable TimelineEvent
instance Prelude.NFData TimelineEvent