{-# 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.SSM.Types.OpsItemEventSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.OpsItemIdentity
data OpsItemEventSummary = OpsItemEventSummary'
{
OpsItemEventSummary -> Maybe Text
opsItemId :: Prelude.Maybe Prelude.Text,
OpsItemEventSummary -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
OpsItemEventSummary -> Maybe OpsItemIdentity
createdBy :: Prelude.Maybe OpsItemIdentity,
OpsItemEventSummary -> Maybe Text
detailType :: Prelude.Maybe Prelude.Text,
OpsItemEventSummary -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
OpsItemEventSummary -> Maybe Text
detail :: Prelude.Maybe Prelude.Text,
OpsItemEventSummary -> Maybe Text
eventId :: Prelude.Maybe Prelude.Text
}
deriving (OpsItemEventSummary -> OpsItemEventSummary -> Bool
(OpsItemEventSummary -> OpsItemEventSummary -> Bool)
-> (OpsItemEventSummary -> OpsItemEventSummary -> Bool)
-> Eq OpsItemEventSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpsItemEventSummary -> OpsItemEventSummary -> Bool
$c/= :: OpsItemEventSummary -> OpsItemEventSummary -> Bool
== :: OpsItemEventSummary -> OpsItemEventSummary -> Bool
$c== :: OpsItemEventSummary -> OpsItemEventSummary -> Bool
Prelude.Eq, ReadPrec [OpsItemEventSummary]
ReadPrec OpsItemEventSummary
Int -> ReadS OpsItemEventSummary
ReadS [OpsItemEventSummary]
(Int -> ReadS OpsItemEventSummary)
-> ReadS [OpsItemEventSummary]
-> ReadPrec OpsItemEventSummary
-> ReadPrec [OpsItemEventSummary]
-> Read OpsItemEventSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OpsItemEventSummary]
$creadListPrec :: ReadPrec [OpsItemEventSummary]
readPrec :: ReadPrec OpsItemEventSummary
$creadPrec :: ReadPrec OpsItemEventSummary
readList :: ReadS [OpsItemEventSummary]
$creadList :: ReadS [OpsItemEventSummary]
readsPrec :: Int -> ReadS OpsItemEventSummary
$creadsPrec :: Int -> ReadS OpsItemEventSummary
Prelude.Read, Int -> OpsItemEventSummary -> ShowS
[OpsItemEventSummary] -> ShowS
OpsItemEventSummary -> String
(Int -> OpsItemEventSummary -> ShowS)
-> (OpsItemEventSummary -> String)
-> ([OpsItemEventSummary] -> ShowS)
-> Show OpsItemEventSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpsItemEventSummary] -> ShowS
$cshowList :: [OpsItemEventSummary] -> ShowS
show :: OpsItemEventSummary -> String
$cshow :: OpsItemEventSummary -> String
showsPrec :: Int -> OpsItemEventSummary -> ShowS
$cshowsPrec :: Int -> OpsItemEventSummary -> ShowS
Prelude.Show, (forall x. OpsItemEventSummary -> Rep OpsItemEventSummary x)
-> (forall x. Rep OpsItemEventSummary x -> OpsItemEventSummary)
-> Generic OpsItemEventSummary
forall x. Rep OpsItemEventSummary x -> OpsItemEventSummary
forall x. OpsItemEventSummary -> Rep OpsItemEventSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OpsItemEventSummary x -> OpsItemEventSummary
$cfrom :: forall x. OpsItemEventSummary -> Rep OpsItemEventSummary x
Prelude.Generic)
newOpsItemEventSummary ::
OpsItemEventSummary
newOpsItemEventSummary :: OpsItemEventSummary
newOpsItemEventSummary =
OpsItemEventSummary' :: Maybe Text
-> Maybe POSIX
-> Maybe OpsItemIdentity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OpsItemEventSummary
OpsItemEventSummary'
{ $sel:opsItemId:OpsItemEventSummary' :: Maybe Text
opsItemId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:OpsItemEventSummary' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:createdBy:OpsItemEventSummary' :: Maybe OpsItemIdentity
createdBy = Maybe OpsItemIdentity
forall a. Maybe a
Prelude.Nothing,
$sel:detailType:OpsItemEventSummary' :: Maybe Text
detailType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:source:OpsItemEventSummary' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:detail:OpsItemEventSummary' :: Maybe Text
detail = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventId:OpsItemEventSummary' :: Maybe Text
eventId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
opsItemEventSummary_opsItemId :: Lens.Lens' OpsItemEventSummary (Prelude.Maybe Prelude.Text)
opsItemEventSummary_opsItemId :: (Maybe Text -> f (Maybe Text))
-> OpsItemEventSummary -> f OpsItemEventSummary
opsItemEventSummary_opsItemId = (OpsItemEventSummary -> Maybe Text)
-> (OpsItemEventSummary -> Maybe Text -> OpsItemEventSummary)
-> Lens
OpsItemEventSummary OpsItemEventSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemEventSummary' {Maybe Text
opsItemId :: Maybe Text
$sel:opsItemId:OpsItemEventSummary' :: OpsItemEventSummary -> Maybe Text
opsItemId} -> Maybe Text
opsItemId) (\s :: OpsItemEventSummary
s@OpsItemEventSummary' {} Maybe Text
a -> OpsItemEventSummary
s {$sel:opsItemId:OpsItemEventSummary' :: Maybe Text
opsItemId = Maybe Text
a} :: OpsItemEventSummary)
opsItemEventSummary_createdTime :: Lens.Lens' OpsItemEventSummary (Prelude.Maybe Prelude.UTCTime)
opsItemEventSummary_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> OpsItemEventSummary -> f OpsItemEventSummary
opsItemEventSummary_createdTime = (OpsItemEventSummary -> Maybe POSIX)
-> (OpsItemEventSummary -> Maybe POSIX -> OpsItemEventSummary)
-> Lens
OpsItemEventSummary OpsItemEventSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemEventSummary' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:OpsItemEventSummary' :: OpsItemEventSummary -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: OpsItemEventSummary
s@OpsItemEventSummary' {} Maybe POSIX
a -> OpsItemEventSummary
s {$sel:createdTime:OpsItemEventSummary' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: OpsItemEventSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> OpsItemEventSummary -> f OpsItemEventSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> OpsItemEventSummary
-> f OpsItemEventSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
opsItemEventSummary_createdBy :: Lens.Lens' OpsItemEventSummary (Prelude.Maybe OpsItemIdentity)
opsItemEventSummary_createdBy :: (Maybe OpsItemIdentity -> f (Maybe OpsItemIdentity))
-> OpsItemEventSummary -> f OpsItemEventSummary
opsItemEventSummary_createdBy = (OpsItemEventSummary -> Maybe OpsItemIdentity)
-> (OpsItemEventSummary
-> Maybe OpsItemIdentity -> OpsItemEventSummary)
-> Lens
OpsItemEventSummary
OpsItemEventSummary
(Maybe OpsItemIdentity)
(Maybe OpsItemIdentity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemEventSummary' {Maybe OpsItemIdentity
createdBy :: Maybe OpsItemIdentity
$sel:createdBy:OpsItemEventSummary' :: OpsItemEventSummary -> Maybe OpsItemIdentity
createdBy} -> Maybe OpsItemIdentity
createdBy) (\s :: OpsItemEventSummary
s@OpsItemEventSummary' {} Maybe OpsItemIdentity
a -> OpsItemEventSummary
s {$sel:createdBy:OpsItemEventSummary' :: Maybe OpsItemIdentity
createdBy = Maybe OpsItemIdentity
a} :: OpsItemEventSummary)
opsItemEventSummary_detailType :: Lens.Lens' OpsItemEventSummary (Prelude.Maybe Prelude.Text)
opsItemEventSummary_detailType :: (Maybe Text -> f (Maybe Text))
-> OpsItemEventSummary -> f OpsItemEventSummary
opsItemEventSummary_detailType = (OpsItemEventSummary -> Maybe Text)
-> (OpsItemEventSummary -> Maybe Text -> OpsItemEventSummary)
-> Lens
OpsItemEventSummary OpsItemEventSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemEventSummary' {Maybe Text
detailType :: Maybe Text
$sel:detailType:OpsItemEventSummary' :: OpsItemEventSummary -> Maybe Text
detailType} -> Maybe Text
detailType) (\s :: OpsItemEventSummary
s@OpsItemEventSummary' {} Maybe Text
a -> OpsItemEventSummary
s {$sel:detailType:OpsItemEventSummary' :: Maybe Text
detailType = Maybe Text
a} :: OpsItemEventSummary)
opsItemEventSummary_source :: Lens.Lens' OpsItemEventSummary (Prelude.Maybe Prelude.Text)
opsItemEventSummary_source :: (Maybe Text -> f (Maybe Text))
-> OpsItemEventSummary -> f OpsItemEventSummary
opsItemEventSummary_source = (OpsItemEventSummary -> Maybe Text)
-> (OpsItemEventSummary -> Maybe Text -> OpsItemEventSummary)
-> Lens
OpsItemEventSummary OpsItemEventSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemEventSummary' {Maybe Text
source :: Maybe Text
$sel:source:OpsItemEventSummary' :: OpsItemEventSummary -> Maybe Text
source} -> Maybe Text
source) (\s :: OpsItemEventSummary
s@OpsItemEventSummary' {} Maybe Text
a -> OpsItemEventSummary
s {$sel:source:OpsItemEventSummary' :: Maybe Text
source = Maybe Text
a} :: OpsItemEventSummary)
opsItemEventSummary_detail :: Lens.Lens' OpsItemEventSummary (Prelude.Maybe Prelude.Text)
opsItemEventSummary_detail :: (Maybe Text -> f (Maybe Text))
-> OpsItemEventSummary -> f OpsItemEventSummary
opsItemEventSummary_detail = (OpsItemEventSummary -> Maybe Text)
-> (OpsItemEventSummary -> Maybe Text -> OpsItemEventSummary)
-> Lens
OpsItemEventSummary OpsItemEventSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemEventSummary' {Maybe Text
detail :: Maybe Text
$sel:detail:OpsItemEventSummary' :: OpsItemEventSummary -> Maybe Text
detail} -> Maybe Text
detail) (\s :: OpsItemEventSummary
s@OpsItemEventSummary' {} Maybe Text
a -> OpsItemEventSummary
s {$sel:detail:OpsItemEventSummary' :: Maybe Text
detail = Maybe Text
a} :: OpsItemEventSummary)
opsItemEventSummary_eventId :: Lens.Lens' OpsItemEventSummary (Prelude.Maybe Prelude.Text)
opsItemEventSummary_eventId :: (Maybe Text -> f (Maybe Text))
-> OpsItemEventSummary -> f OpsItemEventSummary
opsItemEventSummary_eventId = (OpsItemEventSummary -> Maybe Text)
-> (OpsItemEventSummary -> Maybe Text -> OpsItemEventSummary)
-> Lens
OpsItemEventSummary OpsItemEventSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemEventSummary' {Maybe Text
eventId :: Maybe Text
$sel:eventId:OpsItemEventSummary' :: OpsItemEventSummary -> Maybe Text
eventId} -> Maybe Text
eventId) (\s :: OpsItemEventSummary
s@OpsItemEventSummary' {} Maybe Text
a -> OpsItemEventSummary
s {$sel:eventId:OpsItemEventSummary' :: Maybe Text
eventId = Maybe Text
a} :: OpsItemEventSummary)
instance Core.FromJSON OpsItemEventSummary where
parseJSON :: Value -> Parser OpsItemEventSummary
parseJSON =
String
-> (Object -> Parser OpsItemEventSummary)
-> Value
-> Parser OpsItemEventSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OpsItemEventSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe OpsItemIdentity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OpsItemEventSummary
OpsItemEventSummary'
(Maybe Text
-> Maybe POSIX
-> Maybe OpsItemIdentity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OpsItemEventSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe OpsItemIdentity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OpsItemEventSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OpsItemId")
Parser
(Maybe POSIX
-> Maybe OpsItemIdentity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OpsItemEventSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe OpsItemIdentity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OpsItemEventSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTime")
Parser
(Maybe OpsItemIdentity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OpsItemEventSummary)
-> Parser (Maybe OpsItemIdentity)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> OpsItemEventSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OpsItemIdentity)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedBy")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> OpsItemEventSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> OpsItemEventSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DetailType")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> OpsItemEventSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> OpsItemEventSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Source")
Parser (Maybe Text -> Maybe Text -> OpsItemEventSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> OpsItemEventSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Detail")
Parser (Maybe Text -> OpsItemEventSummary)
-> Parser (Maybe Text) -> Parser OpsItemEventSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventId")
)
instance Prelude.Hashable OpsItemEventSummary
instance Prelude.NFData OpsItemEventSummary