{-# 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.SSM.Types.OpsItemSummary
-- 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.SSM.Types.OpsItemSummary 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.SSM.Types.OpsItemDataValue
import Amazonka.SSM.Types.OpsItemStatus

-- | A count of OpsItems.
--
-- /See:/ 'newOpsItemSummary' smart constructor.
data OpsItemSummary = OpsItemSummary'
  { -- | The time a runbook workflow ended. Currently reported only for the
    -- OpsItem type @\/aws\/changerequest@.
    OpsItemSummary -> Maybe POSIX
actualEndTime :: Prelude.Maybe Data.POSIX,
    -- | The time a runbook workflow started. Currently reported only for the
    -- OpsItem type @\/aws\/changerequest@.
    OpsItemSummary -> Maybe POSIX
actualStartTime :: Prelude.Maybe Data.POSIX,
    -- | A list of OpsItems by category.
    OpsItemSummary -> Maybe Text
category :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the IAM entity that created the
    -- OpsItem.
    OpsItemSummary -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The date and time the OpsItem was created.
    OpsItemSummary -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Resource Name (ARN) of the IAM entity that created the
    -- OpsItem.
    OpsItemSummary -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | The date and time the OpsItem was last updated.
    OpsItemSummary -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
    -- | Operational data is custom data that provides useful reference details
    -- about the OpsItem.
    OpsItemSummary -> Maybe (HashMap Text OpsItemDataValue)
operationalData :: Prelude.Maybe (Prelude.HashMap Prelude.Text OpsItemDataValue),
    -- | The ID of the OpsItem.
    OpsItemSummary -> Maybe Text
opsItemId :: Prelude.Maybe Prelude.Text,
    -- | The type of OpsItem. Systems Manager supports the following types of
    -- OpsItems:
    --
    -- -   @\/aws\/issue@
    --
    --     This type of OpsItem is used for default OpsItems created by
    --     OpsCenter.
    --
    -- -   @\/aws\/changerequest@
    --
    --     This type of OpsItem is used by Change Manager for reviewing and
    --     approving or rejecting change requests.
    --
    -- -   @\/aws\/insights@
    --
    --     This type of OpsItem is used by OpsCenter for aggregating and
    --     reporting on duplicate OpsItems.
    OpsItemSummary -> Maybe Text
opsItemType :: Prelude.Maybe Prelude.Text,
    -- | The time specified in a change request for a runbook workflow to end.
    -- Currently supported only for the OpsItem type @\/aws\/changerequest@.
    OpsItemSummary -> Maybe POSIX
plannedEndTime :: Prelude.Maybe Data.POSIX,
    -- | The time specified in a change request for a runbook workflow to start.
    -- Currently supported only for the OpsItem type @\/aws\/changerequest@.
    OpsItemSummary -> Maybe POSIX
plannedStartTime :: Prelude.Maybe Data.POSIX,
    -- | The importance of this OpsItem in relation to other OpsItems in the
    -- system.
    OpsItemSummary -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
    -- | A list of OpsItems by severity.
    OpsItemSummary -> Maybe Text
severity :: Prelude.Maybe Prelude.Text,
    -- | The impacted Amazon Web Services resource.
    OpsItemSummary -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
    -- | The OpsItem status. Status can be @Open@, @In Progress@, or @Resolved@.
    OpsItemSummary -> Maybe OpsItemStatus
status :: Prelude.Maybe OpsItemStatus,
    -- | A short heading that describes the nature of the OpsItem and the
    -- impacted resource.
    OpsItemSummary -> Maybe Text
title :: Prelude.Maybe Prelude.Text
  }
  deriving (OpsItemSummary -> OpsItemSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpsItemSummary -> OpsItemSummary -> Bool
$c/= :: OpsItemSummary -> OpsItemSummary -> Bool
== :: OpsItemSummary -> OpsItemSummary -> Bool
$c== :: OpsItemSummary -> OpsItemSummary -> Bool
Prelude.Eq, ReadPrec [OpsItemSummary]
ReadPrec OpsItemSummary
Int -> ReadS OpsItemSummary
ReadS [OpsItemSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OpsItemSummary]
$creadListPrec :: ReadPrec [OpsItemSummary]
readPrec :: ReadPrec OpsItemSummary
$creadPrec :: ReadPrec OpsItemSummary
readList :: ReadS [OpsItemSummary]
$creadList :: ReadS [OpsItemSummary]
readsPrec :: Int -> ReadS OpsItemSummary
$creadsPrec :: Int -> ReadS OpsItemSummary
Prelude.Read, Int -> OpsItemSummary -> ShowS
[OpsItemSummary] -> ShowS
OpsItemSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpsItemSummary] -> ShowS
$cshowList :: [OpsItemSummary] -> ShowS
show :: OpsItemSummary -> String
$cshow :: OpsItemSummary -> String
showsPrec :: Int -> OpsItemSummary -> ShowS
$cshowsPrec :: Int -> OpsItemSummary -> ShowS
Prelude.Show, forall x. Rep OpsItemSummary x -> OpsItemSummary
forall x. OpsItemSummary -> Rep OpsItemSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OpsItemSummary x -> OpsItemSummary
$cfrom :: forall x. OpsItemSummary -> Rep OpsItemSummary x
Prelude.Generic)

-- |
-- Create a value of 'OpsItemSummary' 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:
--
-- 'actualEndTime', 'opsItemSummary_actualEndTime' - The time a runbook workflow ended. Currently reported only for the
-- OpsItem type @\/aws\/changerequest@.
--
-- 'actualStartTime', 'opsItemSummary_actualStartTime' - The time a runbook workflow started. Currently reported only for the
-- OpsItem type @\/aws\/changerequest@.
--
-- 'category', 'opsItemSummary_category' - A list of OpsItems by category.
--
-- 'createdBy', 'opsItemSummary_createdBy' - The Amazon Resource Name (ARN) of the IAM entity that created the
-- OpsItem.
--
-- 'createdTime', 'opsItemSummary_createdTime' - The date and time the OpsItem was created.
--
-- 'lastModifiedBy', 'opsItemSummary_lastModifiedBy' - The Amazon Resource Name (ARN) of the IAM entity that created the
-- OpsItem.
--
-- 'lastModifiedTime', 'opsItemSummary_lastModifiedTime' - The date and time the OpsItem was last updated.
--
-- 'operationalData', 'opsItemSummary_operationalData' - Operational data is custom data that provides useful reference details
-- about the OpsItem.
--
-- 'opsItemId', 'opsItemSummary_opsItemId' - The ID of the OpsItem.
--
-- 'opsItemType', 'opsItemSummary_opsItemType' - The type of OpsItem. Systems Manager supports the following types of
-- OpsItems:
--
-- -   @\/aws\/issue@
--
--     This type of OpsItem is used for default OpsItems created by
--     OpsCenter.
--
-- -   @\/aws\/changerequest@
--
--     This type of OpsItem is used by Change Manager for reviewing and
--     approving or rejecting change requests.
--
-- -   @\/aws\/insights@
--
--     This type of OpsItem is used by OpsCenter for aggregating and
--     reporting on duplicate OpsItems.
--
-- 'plannedEndTime', 'opsItemSummary_plannedEndTime' - The time specified in a change request for a runbook workflow to end.
-- Currently supported only for the OpsItem type @\/aws\/changerequest@.
--
-- 'plannedStartTime', 'opsItemSummary_plannedStartTime' - The time specified in a change request for a runbook workflow to start.
-- Currently supported only for the OpsItem type @\/aws\/changerequest@.
--
-- 'priority', 'opsItemSummary_priority' - The importance of this OpsItem in relation to other OpsItems in the
-- system.
--
-- 'severity', 'opsItemSummary_severity' - A list of OpsItems by severity.
--
-- 'source', 'opsItemSummary_source' - The impacted Amazon Web Services resource.
--
-- 'status', 'opsItemSummary_status' - The OpsItem status. Status can be @Open@, @In Progress@, or @Resolved@.
--
-- 'title', 'opsItemSummary_title' - A short heading that describes the nature of the OpsItem and the
-- impacted resource.
newOpsItemSummary ::
  OpsItemSummary
newOpsItemSummary :: OpsItemSummary
newOpsItemSummary =
  OpsItemSummary'
    { $sel:actualEndTime:OpsItemSummary' :: Maybe POSIX
actualEndTime = forall a. Maybe a
Prelude.Nothing,
      $sel:actualStartTime:OpsItemSummary' :: Maybe POSIX
actualStartTime = forall a. Maybe a
Prelude.Nothing,
      $sel:category:OpsItemSummary' :: Maybe Text
category = forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:OpsItemSummary' :: Maybe Text
createdBy = forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:OpsItemSummary' :: Maybe POSIX
createdTime = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:OpsItemSummary' :: Maybe Text
lastModifiedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:OpsItemSummary' :: Maybe POSIX
lastModifiedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:operationalData:OpsItemSummary' :: Maybe (HashMap Text OpsItemDataValue)
operationalData = forall a. Maybe a
Prelude.Nothing,
      $sel:opsItemId:OpsItemSummary' :: Maybe Text
opsItemId = forall a. Maybe a
Prelude.Nothing,
      $sel:opsItemType:OpsItemSummary' :: Maybe Text
opsItemType = forall a. Maybe a
Prelude.Nothing,
      $sel:plannedEndTime:OpsItemSummary' :: Maybe POSIX
plannedEndTime = forall a. Maybe a
Prelude.Nothing,
      $sel:plannedStartTime:OpsItemSummary' :: Maybe POSIX
plannedStartTime = forall a. Maybe a
Prelude.Nothing,
      $sel:priority:OpsItemSummary' :: Maybe Natural
priority = forall a. Maybe a
Prelude.Nothing,
      $sel:severity:OpsItemSummary' :: Maybe Text
severity = forall a. Maybe a
Prelude.Nothing,
      $sel:source:OpsItemSummary' :: Maybe Text
source = forall a. Maybe a
Prelude.Nothing,
      $sel:status:OpsItemSummary' :: Maybe OpsItemStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:title:OpsItemSummary' :: Maybe Text
title = forall a. Maybe a
Prelude.Nothing
    }

-- | The time a runbook workflow ended. Currently reported only for the
-- OpsItem type @\/aws\/changerequest@.
opsItemSummary_actualEndTime :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.UTCTime)
opsItemSummary_actualEndTime :: Lens' OpsItemSummary (Maybe UTCTime)
opsItemSummary_actualEndTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe POSIX
actualEndTime :: Maybe POSIX
$sel:actualEndTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
actualEndTime} -> Maybe POSIX
actualEndTime) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe POSIX
a -> OpsItemSummary
s {$sel:actualEndTime:OpsItemSummary' :: Maybe POSIX
actualEndTime = Maybe POSIX
a} :: OpsItemSummary) 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 time a runbook workflow started. Currently reported only for the
-- OpsItem type @\/aws\/changerequest@.
opsItemSummary_actualStartTime :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.UTCTime)
opsItemSummary_actualStartTime :: Lens' OpsItemSummary (Maybe UTCTime)
opsItemSummary_actualStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe POSIX
actualStartTime :: Maybe POSIX
$sel:actualStartTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
actualStartTime} -> Maybe POSIX
actualStartTime) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe POSIX
a -> OpsItemSummary
s {$sel:actualStartTime:OpsItemSummary' :: Maybe POSIX
actualStartTime = Maybe POSIX
a} :: OpsItemSummary) 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

-- | A list of OpsItems by category.
opsItemSummary_category :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.Text)
opsItemSummary_category :: Lens' OpsItemSummary (Maybe Text)
opsItemSummary_category = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe Text
category :: Maybe Text
$sel:category:OpsItemSummary' :: OpsItemSummary -> Maybe Text
category} -> Maybe Text
category) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe Text
a -> OpsItemSummary
s {$sel:category:OpsItemSummary' :: Maybe Text
category = Maybe Text
a} :: OpsItemSummary)

-- | The Amazon Resource Name (ARN) of the IAM entity that created the
-- OpsItem.
opsItemSummary_createdBy :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.Text)
opsItemSummary_createdBy :: Lens' OpsItemSummary (Maybe Text)
opsItemSummary_createdBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:OpsItemSummary' :: OpsItemSummary -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe Text
a -> OpsItemSummary
s {$sel:createdBy:OpsItemSummary' :: Maybe Text
createdBy = Maybe Text
a} :: OpsItemSummary)

-- | The date and time the OpsItem was created.
opsItemSummary_createdTime :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.UTCTime)
opsItemSummary_createdTime :: Lens' OpsItemSummary (Maybe UTCTime)
opsItemSummary_createdTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe POSIX
a -> OpsItemSummary
s {$sel:createdTime:OpsItemSummary' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: OpsItemSummary) 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 Amazon Resource Name (ARN) of the IAM entity that created the
-- OpsItem.
opsItemSummary_lastModifiedBy :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.Text)
opsItemSummary_lastModifiedBy :: Lens' OpsItemSummary (Maybe Text)
opsItemSummary_lastModifiedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:OpsItemSummary' :: OpsItemSummary -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe Text
a -> OpsItemSummary
s {$sel:lastModifiedBy:OpsItemSummary' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: OpsItemSummary)

-- | The date and time the OpsItem was last updated.
opsItemSummary_lastModifiedTime :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.UTCTime)
opsItemSummary_lastModifiedTime :: Lens' OpsItemSummary (Maybe UTCTime)
opsItemSummary_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe POSIX
a -> OpsItemSummary
s {$sel:lastModifiedTime:OpsItemSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: OpsItemSummary) 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

-- | Operational data is custom data that provides useful reference details
-- about the OpsItem.
opsItemSummary_operationalData :: Lens.Lens' OpsItemSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text OpsItemDataValue))
opsItemSummary_operationalData :: Lens' OpsItemSummary (Maybe (HashMap Text OpsItemDataValue))
opsItemSummary_operationalData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe (HashMap Text OpsItemDataValue)
operationalData :: Maybe (HashMap Text OpsItemDataValue)
$sel:operationalData:OpsItemSummary' :: OpsItemSummary -> Maybe (HashMap Text OpsItemDataValue)
operationalData} -> Maybe (HashMap Text OpsItemDataValue)
operationalData) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe (HashMap Text OpsItemDataValue)
a -> OpsItemSummary
s {$sel:operationalData:OpsItemSummary' :: Maybe (HashMap Text OpsItemDataValue)
operationalData = Maybe (HashMap Text OpsItemDataValue)
a} :: OpsItemSummary) 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 ID of the OpsItem.
opsItemSummary_opsItemId :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.Text)
opsItemSummary_opsItemId :: Lens' OpsItemSummary (Maybe Text)
opsItemSummary_opsItemId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe Text
opsItemId :: Maybe Text
$sel:opsItemId:OpsItemSummary' :: OpsItemSummary -> Maybe Text
opsItemId} -> Maybe Text
opsItemId) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe Text
a -> OpsItemSummary
s {$sel:opsItemId:OpsItemSummary' :: Maybe Text
opsItemId = Maybe Text
a} :: OpsItemSummary)

-- | The type of OpsItem. Systems Manager supports the following types of
-- OpsItems:
--
-- -   @\/aws\/issue@
--
--     This type of OpsItem is used for default OpsItems created by
--     OpsCenter.
--
-- -   @\/aws\/changerequest@
--
--     This type of OpsItem is used by Change Manager for reviewing and
--     approving or rejecting change requests.
--
-- -   @\/aws\/insights@
--
--     This type of OpsItem is used by OpsCenter for aggregating and
--     reporting on duplicate OpsItems.
opsItemSummary_opsItemType :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.Text)
opsItemSummary_opsItemType :: Lens' OpsItemSummary (Maybe Text)
opsItemSummary_opsItemType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe Text
opsItemType :: Maybe Text
$sel:opsItemType:OpsItemSummary' :: OpsItemSummary -> Maybe Text
opsItemType} -> Maybe Text
opsItemType) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe Text
a -> OpsItemSummary
s {$sel:opsItemType:OpsItemSummary' :: Maybe Text
opsItemType = Maybe Text
a} :: OpsItemSummary)

-- | The time specified in a change request for a runbook workflow to end.
-- Currently supported only for the OpsItem type @\/aws\/changerequest@.
opsItemSummary_plannedEndTime :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.UTCTime)
opsItemSummary_plannedEndTime :: Lens' OpsItemSummary (Maybe UTCTime)
opsItemSummary_plannedEndTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe POSIX
plannedEndTime :: Maybe POSIX
$sel:plannedEndTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
plannedEndTime} -> Maybe POSIX
plannedEndTime) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe POSIX
a -> OpsItemSummary
s {$sel:plannedEndTime:OpsItemSummary' :: Maybe POSIX
plannedEndTime = Maybe POSIX
a} :: OpsItemSummary) 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 time specified in a change request for a runbook workflow to start.
-- Currently supported only for the OpsItem type @\/aws\/changerequest@.
opsItemSummary_plannedStartTime :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.UTCTime)
opsItemSummary_plannedStartTime :: Lens' OpsItemSummary (Maybe UTCTime)
opsItemSummary_plannedStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe POSIX
plannedStartTime :: Maybe POSIX
$sel:plannedStartTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
plannedStartTime} -> Maybe POSIX
plannedStartTime) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe POSIX
a -> OpsItemSummary
s {$sel:plannedStartTime:OpsItemSummary' :: Maybe POSIX
plannedStartTime = Maybe POSIX
a} :: OpsItemSummary) 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 importance of this OpsItem in relation to other OpsItems in the
-- system.
opsItemSummary_priority :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.Natural)
opsItemSummary_priority :: Lens' OpsItemSummary (Maybe Natural)
opsItemSummary_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe Natural
priority :: Maybe Natural
$sel:priority:OpsItemSummary' :: OpsItemSummary -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe Natural
a -> OpsItemSummary
s {$sel:priority:OpsItemSummary' :: Maybe Natural
priority = Maybe Natural
a} :: OpsItemSummary)

-- | A list of OpsItems by severity.
opsItemSummary_severity :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.Text)
opsItemSummary_severity :: Lens' OpsItemSummary (Maybe Text)
opsItemSummary_severity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe Text
severity :: Maybe Text
$sel:severity:OpsItemSummary' :: OpsItemSummary -> Maybe Text
severity} -> Maybe Text
severity) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe Text
a -> OpsItemSummary
s {$sel:severity:OpsItemSummary' :: Maybe Text
severity = Maybe Text
a} :: OpsItemSummary)

-- | The impacted Amazon Web Services resource.
opsItemSummary_source :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.Text)
opsItemSummary_source :: Lens' OpsItemSummary (Maybe Text)
opsItemSummary_source = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe Text
source :: Maybe Text
$sel:source:OpsItemSummary' :: OpsItemSummary -> Maybe Text
source} -> Maybe Text
source) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe Text
a -> OpsItemSummary
s {$sel:source:OpsItemSummary' :: Maybe Text
source = Maybe Text
a} :: OpsItemSummary)

-- | The OpsItem status. Status can be @Open@, @In Progress@, or @Resolved@.
opsItemSummary_status :: Lens.Lens' OpsItemSummary (Prelude.Maybe OpsItemStatus)
opsItemSummary_status :: Lens' OpsItemSummary (Maybe OpsItemStatus)
opsItemSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe OpsItemStatus
status :: Maybe OpsItemStatus
$sel:status:OpsItemSummary' :: OpsItemSummary -> Maybe OpsItemStatus
status} -> Maybe OpsItemStatus
status) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe OpsItemStatus
a -> OpsItemSummary
s {$sel:status:OpsItemSummary' :: Maybe OpsItemStatus
status = Maybe OpsItemStatus
a} :: OpsItemSummary)

-- | A short heading that describes the nature of the OpsItem and the
-- impacted resource.
opsItemSummary_title :: Lens.Lens' OpsItemSummary (Prelude.Maybe Prelude.Text)
opsItemSummary_title :: Lens' OpsItemSummary (Maybe Text)
opsItemSummary_title = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItemSummary' {Maybe Text
title :: Maybe Text
$sel:title:OpsItemSummary' :: OpsItemSummary -> Maybe Text
title} -> Maybe Text
title) (\s :: OpsItemSummary
s@OpsItemSummary' {} Maybe Text
a -> OpsItemSummary
s {$sel:title:OpsItemSummary' :: Maybe Text
title = Maybe Text
a} :: OpsItemSummary)

instance Data.FromJSON OpsItemSummary where
  parseJSON :: Value -> Parser OpsItemSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"OpsItemSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text OpsItemDataValue)
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OpsItemStatus
-> Maybe Text
-> OpsItemSummary
OpsItemSummary'
            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
"ActualEndTime")
            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
"ActualStartTime")
            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
"Category")
            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
"CreatedBy")
            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
"CreatedTime")
            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
"LastModifiedBy")
            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
"LastModifiedTime")
            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
"OperationalData"
                            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
"OpsItemId")
            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
"OpsItemType")
            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
"PlannedEndTime")
            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
"PlannedStartTime")
            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
"Priority")
            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
"Severity")
            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
"Source")
            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
"Status")
            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
"Title")
      )

instance Prelude.Hashable OpsItemSummary where
  hashWithSalt :: Int -> OpsItemSummary -> Int
hashWithSalt Int
_salt OpsItemSummary' {Maybe Natural
Maybe Text
Maybe (HashMap Text OpsItemDataValue)
Maybe POSIX
Maybe OpsItemStatus
title :: Maybe Text
status :: Maybe OpsItemStatus
source :: Maybe Text
severity :: Maybe Text
priority :: Maybe Natural
plannedStartTime :: Maybe POSIX
plannedEndTime :: Maybe POSIX
opsItemType :: Maybe Text
opsItemId :: Maybe Text
operationalData :: Maybe (HashMap Text OpsItemDataValue)
lastModifiedTime :: Maybe POSIX
lastModifiedBy :: Maybe Text
createdTime :: Maybe POSIX
createdBy :: Maybe Text
category :: Maybe Text
actualStartTime :: Maybe POSIX
actualEndTime :: Maybe POSIX
$sel:title:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:status:OpsItemSummary' :: OpsItemSummary -> Maybe OpsItemStatus
$sel:source:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:severity:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:priority:OpsItemSummary' :: OpsItemSummary -> Maybe Natural
$sel:plannedStartTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:plannedEndTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:opsItemType:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:opsItemId:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:operationalData:OpsItemSummary' :: OpsItemSummary -> Maybe (HashMap Text OpsItemDataValue)
$sel:lastModifiedTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:lastModifiedBy:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:createdTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:createdBy:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:category:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:actualStartTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:actualEndTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
actualEndTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
actualStartTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
category
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createdBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastModifiedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text OpsItemDataValue)
operationalData
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
opsItemId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
opsItemType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
plannedEndTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
plannedStartTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
priority
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
severity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
source
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OpsItemStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
title

instance Prelude.NFData OpsItemSummary where
  rnf :: OpsItemSummary -> ()
rnf OpsItemSummary' {Maybe Natural
Maybe Text
Maybe (HashMap Text OpsItemDataValue)
Maybe POSIX
Maybe OpsItemStatus
title :: Maybe Text
status :: Maybe OpsItemStatus
source :: Maybe Text
severity :: Maybe Text
priority :: Maybe Natural
plannedStartTime :: Maybe POSIX
plannedEndTime :: Maybe POSIX
opsItemType :: Maybe Text
opsItemId :: Maybe Text
operationalData :: Maybe (HashMap Text OpsItemDataValue)
lastModifiedTime :: Maybe POSIX
lastModifiedBy :: Maybe Text
createdTime :: Maybe POSIX
createdBy :: Maybe Text
category :: Maybe Text
actualStartTime :: Maybe POSIX
actualEndTime :: Maybe POSIX
$sel:title:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:status:OpsItemSummary' :: OpsItemSummary -> Maybe OpsItemStatus
$sel:source:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:severity:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:priority:OpsItemSummary' :: OpsItemSummary -> Maybe Natural
$sel:plannedStartTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:plannedEndTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:opsItemType:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:opsItemId:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:operationalData:OpsItemSummary' :: OpsItemSummary -> Maybe (HashMap Text OpsItemDataValue)
$sel:lastModifiedTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:lastModifiedBy:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:createdTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:createdBy:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:category:OpsItemSummary' :: OpsItemSummary -> Maybe Text
$sel:actualStartTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
$sel:actualEndTime:OpsItemSummary' :: OpsItemSummary -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
actualEndTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
actualStartTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
category
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastModifiedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text OpsItemDataValue)
operationalData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
opsItemId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
opsItemType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
plannedEndTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
plannedStartTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
priority
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
severity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
source
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OpsItemStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
title