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