{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SSMIncidents.Types.IncidentRecord
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SSMIncidents.Types.IncidentRecord where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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

-- | The record of the incident that\'s created when an incident occurs.
--
-- /See:/ 'newIncidentRecord' smart constructor.
data IncidentRecord = IncidentRecord'
  { -- | The runbook, or automation document, that\'s run at the beginning of the
    -- incident.
    IncidentRecord -> Maybe [AutomationExecution]
automationExecutions :: Prelude.Maybe [AutomationExecution],
    -- | The chat channel used for collaboration during an incident.
    IncidentRecord -> Maybe ChatChannel
chatChannel :: Prelude.Maybe ChatChannel,
    -- | The Amazon SNS targets that are notified when updates are made to an
    -- incident.
    IncidentRecord -> Maybe [NotificationTargetItem]
notificationTargets :: Prelude.Maybe [NotificationTargetItem],
    -- | The time at which the incident was resolved. This appears as a timeline
    -- event.
    IncidentRecord -> Maybe POSIX
resolvedTime :: Prelude.Maybe Data.POSIX,
    -- | The summary of the incident. The summary is a brief synopsis of what
    -- occurred, what\'s currently happening, and context of the incident.
    IncidentRecord -> Maybe Text
summary :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the incident record.
    IncidentRecord -> Text
arn :: Prelude.Text,
    -- | The time that Incident Manager created the incident record.
    IncidentRecord -> POSIX
creationTime :: Data.POSIX,
    -- | The string Incident Manager uses to prevent duplicate incidents from
    -- being created by the same incident in the same account.
    IncidentRecord -> Text
dedupeString :: Prelude.Text,
    -- | The impact of the incident on customers and applications.
    IncidentRecord -> Natural
impact :: Prelude.Natural,
    -- | Details about the action that started the incident.
    IncidentRecord -> IncidentRecordSource
incidentRecordSource :: IncidentRecordSource,
    -- | Who modified the incident most recently.
    IncidentRecord -> Text
lastModifiedBy :: Prelude.Text,
    -- | The time at which the incident was most recently modified.
    IncidentRecord -> POSIX
lastModifiedTime :: Data.POSIX,
    -- | The current status of the incident.
    IncidentRecord -> IncidentRecordStatus
status :: IncidentRecordStatus,
    -- | The title of the incident.
    IncidentRecord -> Text
title :: Prelude.Text
  }
  deriving (IncidentRecord -> IncidentRecord -> Bool
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]
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
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. 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)

-- |
-- Create a value of 'IncidentRecord' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'automationExecutions', 'incidentRecord_automationExecutions' - The runbook, or automation document, that\'s run at the beginning of the
-- incident.
--
-- 'chatChannel', 'incidentRecord_chatChannel' - The chat channel used for collaboration during an incident.
--
-- 'notificationTargets', 'incidentRecord_notificationTargets' - The Amazon SNS targets that are notified when updates are made to an
-- incident.
--
-- 'resolvedTime', 'incidentRecord_resolvedTime' - The time at which the incident was resolved. This appears as a timeline
-- event.
--
-- 'summary', 'incidentRecord_summary' - The summary of the incident. The summary is a brief synopsis of what
-- occurred, what\'s currently happening, and context of the incident.
--
-- 'arn', 'incidentRecord_arn' - The Amazon Resource Name (ARN) of the incident record.
--
-- 'creationTime', 'incidentRecord_creationTime' - The time that Incident Manager created the incident record.
--
-- 'dedupeString', 'incidentRecord_dedupeString' - The string Incident Manager uses to prevent duplicate incidents from
-- being created by the same incident in the same account.
--
-- 'impact', 'incidentRecord_impact' - The impact of the incident on customers and applications.
--
-- 'incidentRecordSource', 'incidentRecord_incidentRecordSource' - Details about the action that started the incident.
--
-- 'lastModifiedBy', 'incidentRecord_lastModifiedBy' - Who modified the incident most recently.
--
-- 'lastModifiedTime', 'incidentRecord_lastModifiedTime' - The time at which the incident was most recently modified.
--
-- 'status', 'incidentRecord_status' - The current status of the incident.
--
-- 'title', 'incidentRecord_title' - The title of the incident.
newIncidentRecord ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'dedupeString'
  Prelude.Text ->
  -- | 'impact'
  Prelude.Natural ->
  -- | 'incidentRecordSource'
  IncidentRecordSource ->
  -- | 'lastModifiedBy'
  Prelude.Text ->
  -- | 'lastModifiedTime'
  Prelude.UTCTime ->
  -- | 'status'
  IncidentRecordStatus ->
  -- | 'title'
  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'
      { $sel:automationExecutions:IncidentRecord' :: Maybe [AutomationExecution]
automationExecutions =
          forall a. Maybe a
Prelude.Nothing,
        $sel:chatChannel:IncidentRecord' :: Maybe ChatChannel
chatChannel = forall a. Maybe a
Prelude.Nothing,
        $sel:notificationTargets:IncidentRecord' :: Maybe [NotificationTargetItem]
notificationTargets = forall a. Maybe a
Prelude.Nothing,
        $sel:resolvedTime:IncidentRecord' :: Maybe POSIX
resolvedTime = forall a. Maybe a
Prelude.Nothing,
        $sel:summary:IncidentRecord' :: Maybe Text
summary = forall a. Maybe a
Prelude.Nothing,
        $sel:arn:IncidentRecord' :: Text
arn = Text
pArn_,
        $sel:creationTime:IncidentRecord' :: POSIX
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time 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 =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time 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_
      }

-- | The runbook, or automation document, that\'s run at the beginning of the
-- incident.
incidentRecord_automationExecutions :: Lens.Lens' IncidentRecord (Prelude.Maybe [AutomationExecution])
incidentRecord_automationExecutions :: Lens' IncidentRecord (Maybe [AutomationExecution])
incidentRecord_automationExecutions = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The chat channel used for collaboration during an incident.
incidentRecord_chatChannel :: Lens.Lens' IncidentRecord (Prelude.Maybe ChatChannel)
incidentRecord_chatChannel :: Lens' IncidentRecord (Maybe ChatChannel)
incidentRecord_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)

-- | The Amazon SNS targets that are notified when updates are made to an
-- incident.
incidentRecord_notificationTargets :: Lens.Lens' IncidentRecord (Prelude.Maybe [NotificationTargetItem])
incidentRecord_notificationTargets :: Lens' IncidentRecord (Maybe [NotificationTargetItem])
incidentRecord_notificationTargets = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time at which the incident was resolved. This appears as a timeline
-- event.
incidentRecord_resolvedTime :: Lens.Lens' IncidentRecord (Prelude.Maybe Prelude.UTCTime)
incidentRecord_resolvedTime :: Lens' IncidentRecord (Maybe UTCTime)
incidentRecord_resolvedTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The summary of the incident. The summary is a brief synopsis of what
-- occurred, what\'s currently happening, and context of the incident.
incidentRecord_summary :: Lens.Lens' IncidentRecord (Prelude.Maybe Prelude.Text)
incidentRecord_summary :: Lens' IncidentRecord (Maybe Text)
incidentRecord_summary = 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)

-- | The Amazon Resource Name (ARN) of the incident record.
incidentRecord_arn :: Lens.Lens' IncidentRecord Prelude.Text
incidentRecord_arn :: Lens' IncidentRecord Text
incidentRecord_arn = 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)

-- | The time that Incident Manager created the incident record.
incidentRecord_creationTime :: Lens.Lens' IncidentRecord Prelude.UTCTime
incidentRecord_creationTime :: Lens' IncidentRecord UTCTime
incidentRecord_creationTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The string Incident Manager uses to prevent duplicate incidents from
-- being created by the same incident in the same account.
incidentRecord_dedupeString :: Lens.Lens' IncidentRecord Prelude.Text
incidentRecord_dedupeString :: Lens' IncidentRecord Text
incidentRecord_dedupeString = 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)

-- | The impact of the incident on customers and applications.
incidentRecord_impact :: Lens.Lens' IncidentRecord Prelude.Natural
incidentRecord_impact :: Lens' IncidentRecord Natural
incidentRecord_impact = 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)

-- | Details about the action that started the incident.
incidentRecord_incidentRecordSource :: Lens.Lens' IncidentRecord IncidentRecordSource
incidentRecord_incidentRecordSource :: Lens' IncidentRecord IncidentRecordSource
incidentRecord_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)

-- | Who modified the incident most recently.
incidentRecord_lastModifiedBy :: Lens.Lens' IncidentRecord Prelude.Text
incidentRecord_lastModifiedBy :: Lens' IncidentRecord Text
incidentRecord_lastModifiedBy = 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)

-- | The time at which the incident was most recently modified.
incidentRecord_lastModifiedTime :: Lens.Lens' IncidentRecord Prelude.UTCTime
incidentRecord_lastModifiedTime :: Lens' IncidentRecord UTCTime
incidentRecord_lastModifiedTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The current status of the incident.
incidentRecord_status :: Lens.Lens' IncidentRecord IncidentRecordStatus
incidentRecord_status :: Lens' IncidentRecord IncidentRecordStatus
incidentRecord_status = 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)

-- | The title of the incident.
incidentRecord_title :: Lens.Lens' IncidentRecord Prelude.Text
incidentRecord_title :: Lens' IncidentRecord Text
incidentRecord_title = 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 Data.FromJSON IncidentRecord where
  parseJSON :: Value -> Parser IncidentRecord
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"IncidentRecord"
      ( \Object
x ->
          Maybe [AutomationExecution]
-> Maybe ChatChannel
-> Maybe [NotificationTargetItem]
-> Maybe POSIX
-> Maybe Text
-> Text
-> POSIX
-> Text
-> Natural
-> IncidentRecordSource
-> Text
-> POSIX
-> IncidentRecordStatus
-> Text
-> IncidentRecord
IncidentRecord'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"automationExecutions"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"chatChannel")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"notificationTargets"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"resolvedTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"summary")
            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
"creationTime")
            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
"dedupeString")
            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
"impact")
            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
"incidentRecordSource")
            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
"lastModifiedBy")
            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
"lastModifiedTime")
            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
"status")
            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
"title")
      )

instance Prelude.Hashable IncidentRecord where
  hashWithSalt :: Int -> IncidentRecord -> Int
hashWithSalt Int
_salt IncidentRecord' {Natural
Maybe [AutomationExecution]
Maybe [NotificationTargetItem]
Maybe Text
Maybe POSIX
Maybe ChatChannel
Text
POSIX
IncidentRecordSource
IncidentRecordStatus
title :: Text
status :: IncidentRecordStatus
lastModifiedTime :: POSIX
lastModifiedBy :: Text
incidentRecordSource :: IncidentRecordSource
impact :: Natural
dedupeString :: Text
creationTime :: POSIX
arn :: Text
summary :: Maybe Text
resolvedTime :: Maybe POSIX
notificationTargets :: Maybe [NotificationTargetItem]
chatChannel :: Maybe ChatChannel
automationExecutions :: Maybe [AutomationExecution]
$sel:title:IncidentRecord' :: IncidentRecord -> Text
$sel:status:IncidentRecord' :: IncidentRecord -> IncidentRecordStatus
$sel:lastModifiedTime:IncidentRecord' :: IncidentRecord -> POSIX
$sel:lastModifiedBy:IncidentRecord' :: IncidentRecord -> Text
$sel:incidentRecordSource:IncidentRecord' :: IncidentRecord -> IncidentRecordSource
$sel:impact:IncidentRecord' :: IncidentRecord -> Natural
$sel:dedupeString:IncidentRecord' :: IncidentRecord -> Text
$sel:creationTime:IncidentRecord' :: IncidentRecord -> POSIX
$sel:arn:IncidentRecord' :: IncidentRecord -> Text
$sel:summary:IncidentRecord' :: IncidentRecord -> Maybe Text
$sel:resolvedTime:IncidentRecord' :: IncidentRecord -> Maybe POSIX
$sel:notificationTargets:IncidentRecord' :: IncidentRecord -> Maybe [NotificationTargetItem]
$sel:chatChannel:IncidentRecord' :: IncidentRecord -> Maybe ChatChannel
$sel:automationExecutions:IncidentRecord' :: IncidentRecord -> Maybe [AutomationExecution]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AutomationExecution]
automationExecutions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChatChannel
chatChannel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [NotificationTargetItem]
notificationTargets
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
resolvedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
summary
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dedupeString
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
impact
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` IncidentRecordSource
incidentRecordSource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lastModifiedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastModifiedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` IncidentRecordStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
title

instance Prelude.NFData IncidentRecord where
  rnf :: IncidentRecord -> ()
rnf IncidentRecord' {Natural
Maybe [AutomationExecution]
Maybe [NotificationTargetItem]
Maybe Text
Maybe POSIX
Maybe ChatChannel
Text
POSIX
IncidentRecordSource
IncidentRecordStatus
title :: Text
status :: IncidentRecordStatus
lastModifiedTime :: POSIX
lastModifiedBy :: Text
incidentRecordSource :: IncidentRecordSource
impact :: Natural
dedupeString :: Text
creationTime :: POSIX
arn :: Text
summary :: Maybe Text
resolvedTime :: Maybe POSIX
notificationTargets :: Maybe [NotificationTargetItem]
chatChannel :: Maybe ChatChannel
automationExecutions :: Maybe [AutomationExecution]
$sel:title:IncidentRecord' :: IncidentRecord -> Text
$sel:status:IncidentRecord' :: IncidentRecord -> IncidentRecordStatus
$sel:lastModifiedTime:IncidentRecord' :: IncidentRecord -> POSIX
$sel:lastModifiedBy:IncidentRecord' :: IncidentRecord -> Text
$sel:incidentRecordSource:IncidentRecord' :: IncidentRecord -> IncidentRecordSource
$sel:impact:IncidentRecord' :: IncidentRecord -> Natural
$sel:dedupeString:IncidentRecord' :: IncidentRecord -> Text
$sel:creationTime:IncidentRecord' :: IncidentRecord -> POSIX
$sel:arn:IncidentRecord' :: IncidentRecord -> Text
$sel:summary:IncidentRecord' :: IncidentRecord -> Maybe Text
$sel:resolvedTime:IncidentRecord' :: IncidentRecord -> Maybe POSIX
$sel:notificationTargets:IncidentRecord' :: IncidentRecord -> Maybe [NotificationTargetItem]
$sel:chatChannel:IncidentRecord' :: IncidentRecord -> Maybe ChatChannel
$sel:automationExecutions:IncidentRecord' :: IncidentRecord -> Maybe [AutomationExecution]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [AutomationExecution]
automationExecutions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ChatChannel
chatChannel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [NotificationTargetItem]
notificationTargets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
resolvedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
summary
      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 POSIX
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dedupeString
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
impact
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf IncidentRecordSource
incidentRecordSource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lastModifiedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastModifiedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf IncidentRecordStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
title