{-# 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.IncidentRecord where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSMIncidents.Types.AutomationExecution
import Amazonka.SSMIncidents.Types.ChatChannel
import Amazonka.SSMIncidents.Types.IncidentRecordSource
import Amazonka.SSMIncidents.Types.IncidentRecordStatus
import Amazonka.SSMIncidents.Types.NotificationTargetItem
data IncidentRecord = IncidentRecord'
{
IncidentRecord -> Maybe Text
summary :: Prelude.Maybe Prelude.Text,
IncidentRecord -> Maybe [NotificationTargetItem]
notificationTargets :: Prelude.Maybe [NotificationTargetItem],
IncidentRecord -> Maybe POSIX
resolvedTime :: Prelude.Maybe Core.POSIX,
IncidentRecord -> Maybe ChatChannel
chatChannel :: Prelude.Maybe ChatChannel,
IncidentRecord -> Maybe [AutomationExecution]
automationExecutions :: Prelude.Maybe [AutomationExecution],
IncidentRecord -> Text
arn :: Prelude.Text,
IncidentRecord -> POSIX
creationTime :: Core.POSIX,
IncidentRecord -> Text
dedupeString :: Prelude.Text,
IncidentRecord -> Natural
impact :: Prelude.Natural,
IncidentRecord -> IncidentRecordSource
incidentRecordSource :: IncidentRecordSource,
IncidentRecord -> Text
lastModifiedBy :: Prelude.Text,
IncidentRecord -> POSIX
lastModifiedTime :: Core.POSIX,
IncidentRecord -> IncidentRecordStatus
status :: IncidentRecordStatus,
IncidentRecord -> Text
title :: Prelude.Text
}
deriving (IncidentRecord -> IncidentRecord -> Bool
(IncidentRecord -> IncidentRecord -> Bool)
-> (IncidentRecord -> IncidentRecord -> Bool) -> Eq IncidentRecord
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IncidentRecord -> IncidentRecord -> Bool
$c/= :: IncidentRecord -> IncidentRecord -> Bool
== :: IncidentRecord -> IncidentRecord -> Bool
$c== :: IncidentRecord -> IncidentRecord -> Bool
Prelude.Eq, ReadPrec [IncidentRecord]
ReadPrec IncidentRecord
Int -> ReadS IncidentRecord
ReadS [IncidentRecord]
(Int -> ReadS IncidentRecord)
-> ReadS [IncidentRecord]
-> ReadPrec IncidentRecord
-> ReadPrec [IncidentRecord]
-> Read IncidentRecord
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IncidentRecord]
$creadListPrec :: ReadPrec [IncidentRecord]
readPrec :: ReadPrec IncidentRecord
$creadPrec :: ReadPrec IncidentRecord
readList :: ReadS [IncidentRecord]
$creadList :: ReadS [IncidentRecord]
readsPrec :: Int -> ReadS IncidentRecord
$creadsPrec :: Int -> ReadS IncidentRecord
Prelude.Read, Int -> IncidentRecord -> ShowS
[IncidentRecord] -> ShowS
IncidentRecord -> String
(Int -> IncidentRecord -> ShowS)
-> (IncidentRecord -> String)
-> ([IncidentRecord] -> ShowS)
-> Show IncidentRecord
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IncidentRecord] -> ShowS
$cshowList :: [IncidentRecord] -> ShowS
show :: IncidentRecord -> String
$cshow :: IncidentRecord -> String
showsPrec :: Int -> IncidentRecord -> ShowS
$cshowsPrec :: Int -> IncidentRecord -> ShowS
Prelude.Show, (forall x. IncidentRecord -> Rep IncidentRecord x)
-> (forall x. Rep IncidentRecord x -> IncidentRecord)
-> Generic IncidentRecord
forall x. Rep IncidentRecord x -> IncidentRecord
forall x. IncidentRecord -> Rep IncidentRecord x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IncidentRecord x -> IncidentRecord
$cfrom :: forall x. IncidentRecord -> Rep IncidentRecord x
Prelude.Generic)
newIncidentRecord ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Natural ->
IncidentRecordSource ->
Prelude.Text ->
Prelude.UTCTime ->
IncidentRecordStatus ->
Prelude.Text ->
IncidentRecord
newIncidentRecord :: Text
-> UTCTime
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> UTCTime
-> IncidentRecordStatus
-> Text
-> IncidentRecord
newIncidentRecord
Text
pArn_
UTCTime
pCreationTime_
Text
pDedupeString_
Natural
pImpact_
IncidentRecordSource
pIncidentRecordSource_
Text
pLastModifiedBy_
UTCTime
pLastModifiedTime_
IncidentRecordStatus
pStatus_
Text
pTitle_ =
IncidentRecord' :: Maybe Text
-> Maybe [NotificationTargetItem]
-> Maybe POSIX
-> Maybe ChatChannel
-> Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord
IncidentRecord'
{ $sel:summary:IncidentRecord' :: Maybe Text
summary = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:notificationTargets:IncidentRecord' :: Maybe [NotificationTargetItem]
notificationTargets = Maybe [NotificationTargetItem]
forall a. Maybe a
Prelude.Nothing,
$sel:resolvedTime:IncidentRecord' :: Maybe POSIX
resolvedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:chatChannel:IncidentRecord' :: Maybe ChatChannel
chatChannel = Maybe ChatChannel
forall a. Maybe a
Prelude.Nothing,
$sel:automationExecutions:IncidentRecord' :: Maybe [AutomationExecution]
automationExecutions = Maybe [AutomationExecution]
forall a. Maybe a
Prelude.Nothing,
$sel:arn:IncidentRecord' :: Text
arn = Text
pArn_,
$sel:creationTime:IncidentRecord' :: POSIX
creationTime = 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
pCreationTime_,
$sel:dedupeString:IncidentRecord' :: Text
dedupeString = Text
pDedupeString_,
$sel:impact:IncidentRecord' :: Natural
impact = Natural
pImpact_,
$sel:incidentRecordSource:IncidentRecord' :: IncidentRecordSource
incidentRecordSource = IncidentRecordSource
pIncidentRecordSource_,
$sel:lastModifiedBy:IncidentRecord' :: Text
lastModifiedBy = Text
pLastModifiedBy_,
$sel:lastModifiedTime:IncidentRecord' :: POSIX
lastModifiedTime =
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
pLastModifiedTime_,
$sel:status:IncidentRecord' :: IncidentRecordStatus
status = IncidentRecordStatus
pStatus_,
$sel:title:IncidentRecord' :: Text
title = Text
pTitle_
}
incidentRecord_summary :: Lens.Lens' IncidentRecord (Prelude.Maybe Prelude.Text)
incidentRecord_summary :: (Maybe Text -> f (Maybe Text))
-> IncidentRecord -> f IncidentRecord
incidentRecord_summary = (IncidentRecord -> Maybe Text)
-> (IncidentRecord -> Maybe Text -> IncidentRecord)
-> Lens IncidentRecord IncidentRecord (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Maybe Text
summary :: Maybe Text
$sel:summary:IncidentRecord' :: IncidentRecord -> Maybe Text
summary} -> Maybe Text
summary) (\s :: IncidentRecord
s@IncidentRecord' {} Maybe Text
a -> IncidentRecord
s {$sel:summary:IncidentRecord' :: Maybe Text
summary = Maybe Text
a} :: IncidentRecord)
incidentRecord_notificationTargets :: Lens.Lens' IncidentRecord (Prelude.Maybe [NotificationTargetItem])
incidentRecord_notificationTargets :: (Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> IncidentRecord -> f IncidentRecord
incidentRecord_notificationTargets = (IncidentRecord -> Maybe [NotificationTargetItem])
-> (IncidentRecord
-> Maybe [NotificationTargetItem] -> IncidentRecord)
-> Lens
IncidentRecord
IncidentRecord
(Maybe [NotificationTargetItem])
(Maybe [NotificationTargetItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Maybe [NotificationTargetItem]
notificationTargets :: Maybe [NotificationTargetItem]
$sel:notificationTargets:IncidentRecord' :: IncidentRecord -> Maybe [NotificationTargetItem]
notificationTargets} -> Maybe [NotificationTargetItem]
notificationTargets) (\s :: IncidentRecord
s@IncidentRecord' {} Maybe [NotificationTargetItem]
a -> IncidentRecord
s {$sel:notificationTargets:IncidentRecord' :: Maybe [NotificationTargetItem]
notificationTargets = Maybe [NotificationTargetItem]
a} :: IncidentRecord) ((Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> IncidentRecord -> f IncidentRecord)
-> ((Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> (Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> IncidentRecord
-> f IncidentRecord
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[NotificationTargetItem]
[NotificationTargetItem]
[NotificationTargetItem]
[NotificationTargetItem]
-> Iso
(Maybe [NotificationTargetItem])
(Maybe [NotificationTargetItem])
(Maybe [NotificationTargetItem])
(Maybe [NotificationTargetItem])
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
[NotificationTargetItem]
[NotificationTargetItem]
[NotificationTargetItem]
[NotificationTargetItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
incidentRecord_resolvedTime :: Lens.Lens' IncidentRecord (Prelude.Maybe Prelude.UTCTime)
incidentRecord_resolvedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> IncidentRecord -> f IncidentRecord
incidentRecord_resolvedTime = (IncidentRecord -> Maybe POSIX)
-> (IncidentRecord -> Maybe POSIX -> IncidentRecord)
-> Lens IncidentRecord IncidentRecord (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Maybe POSIX
resolvedTime :: Maybe POSIX
$sel:resolvedTime:IncidentRecord' :: IncidentRecord -> Maybe POSIX
resolvedTime} -> Maybe POSIX
resolvedTime) (\s :: IncidentRecord
s@IncidentRecord' {} Maybe POSIX
a -> IncidentRecord
s {$sel:resolvedTime:IncidentRecord' :: Maybe POSIX
resolvedTime = Maybe POSIX
a} :: IncidentRecord) ((Maybe POSIX -> f (Maybe POSIX))
-> IncidentRecord -> f IncidentRecord)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> IncidentRecord
-> f IncidentRecord
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
incidentRecord_chatChannel :: Lens.Lens' IncidentRecord (Prelude.Maybe ChatChannel)
incidentRecord_chatChannel :: (Maybe ChatChannel -> f (Maybe ChatChannel))
-> IncidentRecord -> f IncidentRecord
incidentRecord_chatChannel = (IncidentRecord -> Maybe ChatChannel)
-> (IncidentRecord -> Maybe ChatChannel -> IncidentRecord)
-> Lens
IncidentRecord
IncidentRecord
(Maybe ChatChannel)
(Maybe ChatChannel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Maybe ChatChannel
chatChannel :: Maybe ChatChannel
$sel:chatChannel:IncidentRecord' :: IncidentRecord -> Maybe ChatChannel
chatChannel} -> Maybe ChatChannel
chatChannel) (\s :: IncidentRecord
s@IncidentRecord' {} Maybe ChatChannel
a -> IncidentRecord
s {$sel:chatChannel:IncidentRecord' :: Maybe ChatChannel
chatChannel = Maybe ChatChannel
a} :: IncidentRecord)
incidentRecord_automationExecutions :: Lens.Lens' IncidentRecord (Prelude.Maybe [AutomationExecution])
incidentRecord_automationExecutions :: (Maybe [AutomationExecution] -> f (Maybe [AutomationExecution]))
-> IncidentRecord -> f IncidentRecord
incidentRecord_automationExecutions = (IncidentRecord -> Maybe [AutomationExecution])
-> (IncidentRecord
-> Maybe [AutomationExecution] -> IncidentRecord)
-> Lens
IncidentRecord
IncidentRecord
(Maybe [AutomationExecution])
(Maybe [AutomationExecution])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Maybe [AutomationExecution]
automationExecutions :: Maybe [AutomationExecution]
$sel:automationExecutions:IncidentRecord' :: IncidentRecord -> Maybe [AutomationExecution]
automationExecutions} -> Maybe [AutomationExecution]
automationExecutions) (\s :: IncidentRecord
s@IncidentRecord' {} Maybe [AutomationExecution]
a -> IncidentRecord
s {$sel:automationExecutions:IncidentRecord' :: Maybe [AutomationExecution]
automationExecutions = Maybe [AutomationExecution]
a} :: IncidentRecord) ((Maybe [AutomationExecution] -> f (Maybe [AutomationExecution]))
-> IncidentRecord -> f IncidentRecord)
-> ((Maybe [AutomationExecution]
-> f (Maybe [AutomationExecution]))
-> Maybe [AutomationExecution] -> f (Maybe [AutomationExecution]))
-> (Maybe [AutomationExecution] -> f (Maybe [AutomationExecution]))
-> IncidentRecord
-> f IncidentRecord
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AutomationExecution]
[AutomationExecution]
[AutomationExecution]
[AutomationExecution]
-> Iso
(Maybe [AutomationExecution])
(Maybe [AutomationExecution])
(Maybe [AutomationExecution])
(Maybe [AutomationExecution])
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
[AutomationExecution]
[AutomationExecution]
[AutomationExecution]
[AutomationExecution]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
incidentRecord_arn :: Lens.Lens' IncidentRecord Prelude.Text
incidentRecord_arn :: (Text -> f Text) -> IncidentRecord -> f IncidentRecord
incidentRecord_arn = (IncidentRecord -> Text)
-> (IncidentRecord -> Text -> IncidentRecord)
-> Lens IncidentRecord IncidentRecord Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Text
arn :: Text
$sel:arn:IncidentRecord' :: IncidentRecord -> Text
arn} -> Text
arn) (\s :: IncidentRecord
s@IncidentRecord' {} Text
a -> IncidentRecord
s {$sel:arn:IncidentRecord' :: Text
arn = Text
a} :: IncidentRecord)
incidentRecord_creationTime :: Lens.Lens' IncidentRecord Prelude.UTCTime
incidentRecord_creationTime :: (UTCTime -> f UTCTime) -> IncidentRecord -> f IncidentRecord
incidentRecord_creationTime = (IncidentRecord -> POSIX)
-> (IncidentRecord -> POSIX -> IncidentRecord)
-> Lens IncidentRecord IncidentRecord POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {POSIX
creationTime :: POSIX
$sel:creationTime:IncidentRecord' :: IncidentRecord -> POSIX
creationTime} -> POSIX
creationTime) (\s :: IncidentRecord
s@IncidentRecord' {} POSIX
a -> IncidentRecord
s {$sel:creationTime:IncidentRecord' :: POSIX
creationTime = POSIX
a} :: IncidentRecord) ((POSIX -> f POSIX) -> IncidentRecord -> f IncidentRecord)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> IncidentRecord
-> f IncidentRecord
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
incidentRecord_dedupeString :: Lens.Lens' IncidentRecord Prelude.Text
incidentRecord_dedupeString :: (Text -> f Text) -> IncidentRecord -> f IncidentRecord
incidentRecord_dedupeString = (IncidentRecord -> Text)
-> (IncidentRecord -> Text -> IncidentRecord)
-> Lens IncidentRecord IncidentRecord Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Text
dedupeString :: Text
$sel:dedupeString:IncidentRecord' :: IncidentRecord -> Text
dedupeString} -> Text
dedupeString) (\s :: IncidentRecord
s@IncidentRecord' {} Text
a -> IncidentRecord
s {$sel:dedupeString:IncidentRecord' :: Text
dedupeString = Text
a} :: IncidentRecord)
incidentRecord_impact :: Lens.Lens' IncidentRecord Prelude.Natural
incidentRecord_impact :: (Natural -> f Natural) -> IncidentRecord -> f IncidentRecord
incidentRecord_impact = (IncidentRecord -> Natural)
-> (IncidentRecord -> Natural -> IncidentRecord)
-> Lens IncidentRecord IncidentRecord Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Natural
impact :: Natural
$sel:impact:IncidentRecord' :: IncidentRecord -> Natural
impact} -> Natural
impact) (\s :: IncidentRecord
s@IncidentRecord' {} Natural
a -> IncidentRecord
s {$sel:impact:IncidentRecord' :: Natural
impact = Natural
a} :: IncidentRecord)
incidentRecord_incidentRecordSource :: Lens.Lens' IncidentRecord IncidentRecordSource
incidentRecord_incidentRecordSource :: (IncidentRecordSource -> f IncidentRecordSource)
-> IncidentRecord -> f IncidentRecord
incidentRecord_incidentRecordSource = (IncidentRecord -> IncidentRecordSource)
-> (IncidentRecord -> IncidentRecordSource -> IncidentRecord)
-> Lens
IncidentRecord
IncidentRecord
IncidentRecordSource
IncidentRecordSource
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {IncidentRecordSource
incidentRecordSource :: IncidentRecordSource
$sel:incidentRecordSource:IncidentRecord' :: IncidentRecord -> IncidentRecordSource
incidentRecordSource} -> IncidentRecordSource
incidentRecordSource) (\s :: IncidentRecord
s@IncidentRecord' {} IncidentRecordSource
a -> IncidentRecord
s {$sel:incidentRecordSource:IncidentRecord' :: IncidentRecordSource
incidentRecordSource = IncidentRecordSource
a} :: IncidentRecord)
incidentRecord_lastModifiedBy :: Lens.Lens' IncidentRecord Prelude.Text
incidentRecord_lastModifiedBy :: (Text -> f Text) -> IncidentRecord -> f IncidentRecord
incidentRecord_lastModifiedBy = (IncidentRecord -> Text)
-> (IncidentRecord -> Text -> IncidentRecord)
-> Lens IncidentRecord IncidentRecord Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Text
lastModifiedBy :: Text
$sel:lastModifiedBy:IncidentRecord' :: IncidentRecord -> Text
lastModifiedBy} -> Text
lastModifiedBy) (\s :: IncidentRecord
s@IncidentRecord' {} Text
a -> IncidentRecord
s {$sel:lastModifiedBy:IncidentRecord' :: Text
lastModifiedBy = Text
a} :: IncidentRecord)
incidentRecord_lastModifiedTime :: Lens.Lens' IncidentRecord Prelude.UTCTime
incidentRecord_lastModifiedTime :: (UTCTime -> f UTCTime) -> IncidentRecord -> f IncidentRecord
incidentRecord_lastModifiedTime = (IncidentRecord -> POSIX)
-> (IncidentRecord -> POSIX -> IncidentRecord)
-> Lens IncidentRecord IncidentRecord POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {POSIX
lastModifiedTime :: POSIX
$sel:lastModifiedTime:IncidentRecord' :: IncidentRecord -> POSIX
lastModifiedTime} -> POSIX
lastModifiedTime) (\s :: IncidentRecord
s@IncidentRecord' {} POSIX
a -> IncidentRecord
s {$sel:lastModifiedTime:IncidentRecord' :: POSIX
lastModifiedTime = POSIX
a} :: IncidentRecord) ((POSIX -> f POSIX) -> IncidentRecord -> f IncidentRecord)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> IncidentRecord
-> f IncidentRecord
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
incidentRecord_status :: Lens.Lens' IncidentRecord IncidentRecordStatus
incidentRecord_status :: (IncidentRecordStatus -> f IncidentRecordStatus)
-> IncidentRecord -> f IncidentRecord
incidentRecord_status = (IncidentRecord -> IncidentRecordStatus)
-> (IncidentRecord -> IncidentRecordStatus -> IncidentRecord)
-> Lens
IncidentRecord
IncidentRecord
IncidentRecordStatus
IncidentRecordStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {IncidentRecordStatus
status :: IncidentRecordStatus
$sel:status:IncidentRecord' :: IncidentRecord -> IncidentRecordStatus
status} -> IncidentRecordStatus
status) (\s :: IncidentRecord
s@IncidentRecord' {} IncidentRecordStatus
a -> IncidentRecord
s {$sel:status:IncidentRecord' :: IncidentRecordStatus
status = IncidentRecordStatus
a} :: IncidentRecord)
incidentRecord_title :: Lens.Lens' IncidentRecord Prelude.Text
incidentRecord_title :: (Text -> f Text) -> IncidentRecord -> f IncidentRecord
incidentRecord_title = (IncidentRecord -> Text)
-> (IncidentRecord -> Text -> IncidentRecord)
-> Lens IncidentRecord IncidentRecord Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncidentRecord' {Text
title :: Text
$sel:title:IncidentRecord' :: IncidentRecord -> Text
title} -> Text
title) (\s :: IncidentRecord
s@IncidentRecord' {} Text
a -> IncidentRecord
s {$sel:title:IncidentRecord' :: Text
title = Text
a} :: IncidentRecord)
instance Core.FromJSON IncidentRecord where
parseJSON :: Value -> Parser IncidentRecord
parseJSON =
String
-> (Object -> Parser IncidentRecord)
-> Value
-> Parser IncidentRecord
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"IncidentRecord"
( \Object
x ->
Maybe Text
-> Maybe [NotificationTargetItem]
-> Maybe POSIX
-> Maybe ChatChannel
-> Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord
IncidentRecord'
(Maybe Text
-> Maybe [NotificationTargetItem]
-> Maybe POSIX
-> Maybe ChatChannel
-> Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
-> Parser (Maybe Text)
-> Parser
(Maybe [NotificationTargetItem]
-> Maybe POSIX
-> Maybe ChatChannel
-> Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
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
"summary")
Parser
(Maybe [NotificationTargetItem]
-> Maybe POSIX
-> Maybe ChatChannel
-> Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
-> Parser (Maybe [NotificationTargetItem])
-> Parser
(Maybe POSIX
-> Maybe ChatChannel
-> Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [NotificationTargetItem]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"notificationTargets"
Parser (Maybe (Maybe [NotificationTargetItem]))
-> Maybe [NotificationTargetItem]
-> Parser (Maybe [NotificationTargetItem])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [NotificationTargetItem]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe POSIX
-> Maybe ChatChannel
-> Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
-> Parser (Maybe POSIX)
-> Parser
(Maybe ChatChannel
-> Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
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
"resolvedTime")
Parser
(Maybe ChatChannel
-> Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
-> Parser (Maybe ChatChannel)
-> Parser
(Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChatChannel)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"chatChannel")
Parser
(Maybe [AutomationExecution]
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
-> Parser (Maybe [AutomationExecution])
-> Parser
(Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [AutomationExecution]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"automationExecutions"
Parser (Maybe (Maybe [AutomationExecution]))
-> Maybe [AutomationExecution]
-> Parser (Maybe [AutomationExecution])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AutomationExecution]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
-> Parser Text
-> Parser
(POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
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
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
-> Parser POSIX
-> Parser
(Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
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
"creationTime")
Parser
(Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
-> Parser Text
-> Parser
(Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
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
"dedupeString")
Parser
(Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord)
-> Parser Natural
-> Parser
(IncidentRecordSource
-> Text -> POSIX -> IncidentRecordStatus -> Text -> IncidentRecord)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"impact")
Parser
(IncidentRecordSource
-> Text -> POSIX -> IncidentRecordStatus -> Text -> IncidentRecord)
-> Parser IncidentRecordSource
-> Parser
(Text -> POSIX -> IncidentRecordStatus -> Text -> IncidentRecord)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser IncidentRecordSource
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"incidentRecordSource")
Parser
(Text -> POSIX -> IncidentRecordStatus -> Text -> IncidentRecord)
-> Parser Text
-> Parser (POSIX -> IncidentRecordStatus -> Text -> IncidentRecord)
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
"lastModifiedBy")
Parser (POSIX -> IncidentRecordStatus -> Text -> IncidentRecord)
-> Parser POSIX
-> Parser (IncidentRecordStatus -> Text -> IncidentRecord)
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
"lastModifiedTime")
Parser (IncidentRecordStatus -> Text -> IncidentRecord)
-> Parser IncidentRecordStatus -> Parser (Text -> IncidentRecord)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser IncidentRecordStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (Text -> IncidentRecord)
-> Parser Text -> Parser IncidentRecord
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
"title")
)
instance Prelude.Hashable IncidentRecord
instance Prelude.NFData IncidentRecord