{-# 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.OpsItem
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SSM.Types.OpsItem where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.OpsItemDataValue
import Amazonka.SSM.Types.OpsItemNotification
import Amazonka.SSM.Types.OpsItemStatus
import Amazonka.SSM.Types.RelatedOpsItem

-- | Operations engineers and IT professionals use Amazon Web Services
-- Systems Manager OpsCenter to view, investigate, and remediate
-- operational work items (OpsItems) impacting the performance and health
-- of their Amazon Web Services resources. OpsCenter is integrated with
-- Amazon EventBridge and Amazon CloudWatch. This means you can configure
-- these services to automatically create an OpsItem in OpsCenter when a
-- CloudWatch alarm enters the ALARM state or when EventBridge processes an
-- event from any Amazon Web Services service that publishes events.
-- Configuring Amazon CloudWatch alarms and EventBridge events to
-- automatically create OpsItems allows you to quickly diagnose and
-- remediate issues with Amazon Web Services resources from a single
-- console.
--
-- To help you diagnose issues, each OpsItem includes contextually relevant
-- information such as the name and ID of the Amazon Web Services resource
-- that generated the OpsItem, alarm or event details, alarm history, and
-- an alarm timeline graph. For the Amazon Web Services resource, OpsCenter
-- aggregates information from Config, CloudTrail logs, and EventBridge, so
-- you don\'t have to navigate across multiple console pages during your
-- investigation. For more information, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html OpsCenter>
-- in the /Amazon Web Services Systems Manager User Guide/.
--
-- /See:/ 'newOpsItem' smart constructor.
data OpsItem = OpsItem'
  { -- | The time a runbook workflow ended. Currently reported only for the
    -- OpsItem type @\/aws\/changerequest@.
    OpsItem -> Maybe POSIX
actualEndTime :: Prelude.Maybe Core.POSIX,
    -- | The ID of the OpsItem.
    OpsItem -> Maybe Text
opsItemId :: Prelude.Maybe Prelude.Text,
    -- | The OpsItem status. Status can be @Open@, @In Progress@, or @Resolved@.
    -- For more information, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html Editing OpsItem details>
    -- in the /Amazon Web Services Systems Manager User Guide/.
    OpsItem -> Maybe OpsItemStatus
status :: Prelude.Maybe OpsItemStatus,
    -- | The importance of this OpsItem in relation to other OpsItems in the
    -- system.
    OpsItem -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
    -- | The date and time the OpsItem was created.
    OpsItem -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | An OpsItem category. Category options include: Availability, Cost,
    -- Performance, Recovery, Security.
    OpsItem -> Maybe Text
category :: Prelude.Maybe Prelude.Text,
    -- | The severity of the OpsItem. Severity options range from 1 to 4.
    OpsItem -> Maybe Text
severity :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the Amazon Web Services account that created the OpsItem.
    OpsItem -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The date and time the OpsItem was last updated.
    OpsItem -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The type of OpsItem. Currently, the only valid values are
    -- @\/aws\/changerequest@ and @\/aws\/issue@.
    OpsItem -> Maybe Text
opsItemType :: Prelude.Maybe Prelude.Text,
    -- | The version of this OpsItem. Each time the OpsItem is edited the version
    -- number increments by one.
    OpsItem -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The origin of the OpsItem, such as Amazon EC2 or Systems Manager. The
    -- impacted resource is a subset of source.
    OpsItem -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
    -- | One or more OpsItems that share something in common with the current
    -- OpsItem. For example, related OpsItems can include OpsItems with similar
    -- error messages, impacted resources, or statuses for the impacted
    -- resource.
    OpsItem -> Maybe [RelatedOpsItem]
relatedOpsItems :: Prelude.Maybe [RelatedOpsItem],
    -- | A short heading that describes the nature of the OpsItem and the
    -- impacted resource.
    OpsItem -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the Amazon Web Services account that last updated the
    -- OpsItem.
    OpsItem -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | Operational data is custom data that provides useful reference details
    -- about the OpsItem. For example, you can specify log files, error
    -- strings, license keys, troubleshooting tips, or other relevant data. You
    -- enter operational data as key-value pairs. The key has a maximum length
    -- of 128 characters. The value has a maximum size of 20 KB.
    --
    -- Operational data keys /can\'t/ begin with the following: @amazon@,
    -- @aws@, @amzn@, @ssm@, @\/amazon@, @\/aws@, @\/amzn@, @\/ssm@.
    --
    -- You can choose to make the data searchable by other users in the account
    -- or you can restrict search access. Searchable data means that all users
    -- with access to the OpsItem Overview page (as provided by the
    -- DescribeOpsItems API operation) can view and search on the specified
    -- data. Operational data that isn\'t searchable is only viewable by users
    -- who have access to the OpsItem (as provided by the GetOpsItem API
    -- operation).
    --
    -- Use the @\/aws\/resources@ key in OperationalData to specify a related
    -- resource in the request. Use the @\/aws\/automations@ key in
    -- OperationalData to associate an Automation runbook with the OpsItem. To
    -- view Amazon Web Services CLI example commands that use these keys, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems Creating OpsItems manually>
    -- in the /Amazon Web Services Systems Manager User Guide/.
    OpsItem -> Maybe (HashMap Text OpsItemDataValue)
operationalData :: Prelude.Maybe (Prelude.HashMap Prelude.Text OpsItemDataValue),
    -- | The time a runbook workflow started. Currently reported only for the
    -- OpsItem type @\/aws\/changerequest@.
    OpsItem -> Maybe POSIX
actualStartTime :: Prelude.Maybe Core.POSIX,
    -- | The OpsItem description.
    OpsItem -> Maybe Text
description :: 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@.
    OpsItem -> Maybe POSIX
plannedEndTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of an Amazon Simple Notification Service
    -- (Amazon SNS) topic where notifications are sent when this OpsItem is
    -- edited or changed.
    OpsItem -> Maybe [OpsItemNotification]
notifications :: Prelude.Maybe [OpsItemNotification],
    -- | The time specified in a change request for a runbook workflow to start.
    -- Currently supported only for the OpsItem type @\/aws\/changerequest@.
    OpsItem -> Maybe POSIX
plannedStartTime :: Prelude.Maybe Core.POSIX
  }
  deriving (OpsItem -> OpsItem -> Bool
(OpsItem -> OpsItem -> Bool)
-> (OpsItem -> OpsItem -> Bool) -> Eq OpsItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpsItem -> OpsItem -> Bool
$c/= :: OpsItem -> OpsItem -> Bool
== :: OpsItem -> OpsItem -> Bool
$c== :: OpsItem -> OpsItem -> Bool
Prelude.Eq, ReadPrec [OpsItem]
ReadPrec OpsItem
Int -> ReadS OpsItem
ReadS [OpsItem]
(Int -> ReadS OpsItem)
-> ReadS [OpsItem]
-> ReadPrec OpsItem
-> ReadPrec [OpsItem]
-> Read OpsItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OpsItem]
$creadListPrec :: ReadPrec [OpsItem]
readPrec :: ReadPrec OpsItem
$creadPrec :: ReadPrec OpsItem
readList :: ReadS [OpsItem]
$creadList :: ReadS [OpsItem]
readsPrec :: Int -> ReadS OpsItem
$creadsPrec :: Int -> ReadS OpsItem
Prelude.Read, Int -> OpsItem -> ShowS
[OpsItem] -> ShowS
OpsItem -> String
(Int -> OpsItem -> ShowS)
-> (OpsItem -> String) -> ([OpsItem] -> ShowS) -> Show OpsItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpsItem] -> ShowS
$cshowList :: [OpsItem] -> ShowS
show :: OpsItem -> String
$cshow :: OpsItem -> String
showsPrec :: Int -> OpsItem -> ShowS
$cshowsPrec :: Int -> OpsItem -> ShowS
Prelude.Show, (forall x. OpsItem -> Rep OpsItem x)
-> (forall x. Rep OpsItem x -> OpsItem) -> Generic OpsItem
forall x. Rep OpsItem x -> OpsItem
forall x. OpsItem -> Rep OpsItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OpsItem x -> OpsItem
$cfrom :: forall x. OpsItem -> Rep OpsItem x
Prelude.Generic)

-- |
-- Create a value of 'OpsItem' 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', 'opsItem_actualEndTime' - The time a runbook workflow ended. Currently reported only for the
-- OpsItem type @\/aws\/changerequest@.
--
-- 'opsItemId', 'opsItem_opsItemId' - The ID of the OpsItem.
--
-- 'status', 'opsItem_status' - The OpsItem status. Status can be @Open@, @In Progress@, or @Resolved@.
-- For more information, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html Editing OpsItem details>
-- in the /Amazon Web Services Systems Manager User Guide/.
--
-- 'priority', 'opsItem_priority' - The importance of this OpsItem in relation to other OpsItems in the
-- system.
--
-- 'createdTime', 'opsItem_createdTime' - The date and time the OpsItem was created.
--
-- 'category', 'opsItem_category' - An OpsItem category. Category options include: Availability, Cost,
-- Performance, Recovery, Security.
--
-- 'severity', 'opsItem_severity' - The severity of the OpsItem. Severity options range from 1 to 4.
--
-- 'createdBy', 'opsItem_createdBy' - The ARN of the Amazon Web Services account that created the OpsItem.
--
-- 'lastModifiedTime', 'opsItem_lastModifiedTime' - The date and time the OpsItem was last updated.
--
-- 'opsItemType', 'opsItem_opsItemType' - The type of OpsItem. Currently, the only valid values are
-- @\/aws\/changerequest@ and @\/aws\/issue@.
--
-- 'version', 'opsItem_version' - The version of this OpsItem. Each time the OpsItem is edited the version
-- number increments by one.
--
-- 'source', 'opsItem_source' - The origin of the OpsItem, such as Amazon EC2 or Systems Manager. The
-- impacted resource is a subset of source.
--
-- 'relatedOpsItems', 'opsItem_relatedOpsItems' - One or more OpsItems that share something in common with the current
-- OpsItem. For example, related OpsItems can include OpsItems with similar
-- error messages, impacted resources, or statuses for the impacted
-- resource.
--
-- 'title', 'opsItem_title' - A short heading that describes the nature of the OpsItem and the
-- impacted resource.
--
-- 'lastModifiedBy', 'opsItem_lastModifiedBy' - The ARN of the Amazon Web Services account that last updated the
-- OpsItem.
--
-- 'operationalData', 'opsItem_operationalData' - Operational data is custom data that provides useful reference details
-- about the OpsItem. For example, you can specify log files, error
-- strings, license keys, troubleshooting tips, or other relevant data. You
-- enter operational data as key-value pairs. The key has a maximum length
-- of 128 characters. The value has a maximum size of 20 KB.
--
-- Operational data keys /can\'t/ begin with the following: @amazon@,
-- @aws@, @amzn@, @ssm@, @\/amazon@, @\/aws@, @\/amzn@, @\/ssm@.
--
-- You can choose to make the data searchable by other users in the account
-- or you can restrict search access. Searchable data means that all users
-- with access to the OpsItem Overview page (as provided by the
-- DescribeOpsItems API operation) can view and search on the specified
-- data. Operational data that isn\'t searchable is only viewable by users
-- who have access to the OpsItem (as provided by the GetOpsItem API
-- operation).
--
-- Use the @\/aws\/resources@ key in OperationalData to specify a related
-- resource in the request. Use the @\/aws\/automations@ key in
-- OperationalData to associate an Automation runbook with the OpsItem. To
-- view Amazon Web Services CLI example commands that use these keys, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems Creating OpsItems manually>
-- in the /Amazon Web Services Systems Manager User Guide/.
--
-- 'actualStartTime', 'opsItem_actualStartTime' - The time a runbook workflow started. Currently reported only for the
-- OpsItem type @\/aws\/changerequest@.
--
-- 'description', 'opsItem_description' - The OpsItem description.
--
-- 'plannedEndTime', 'opsItem_plannedEndTime' - The time specified in a change request for a runbook workflow to end.
-- Currently supported only for the OpsItem type @\/aws\/changerequest@.
--
-- 'notifications', 'opsItem_notifications' - The Amazon Resource Name (ARN) of an Amazon Simple Notification Service
-- (Amazon SNS) topic where notifications are sent when this OpsItem is
-- edited or changed.
--
-- 'plannedStartTime', 'opsItem_plannedStartTime' - The time specified in a change request for a runbook workflow to start.
-- Currently supported only for the OpsItem type @\/aws\/changerequest@.
newOpsItem ::
  OpsItem
newOpsItem :: OpsItem
newOpsItem =
  OpsItem' :: Maybe POSIX
-> Maybe Text
-> Maybe OpsItemStatus
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [RelatedOpsItem]
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text OpsItemDataValue)
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe [OpsItemNotification]
-> Maybe POSIX
-> OpsItem
OpsItem'
    { $sel:actualEndTime:OpsItem' :: Maybe POSIX
actualEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:opsItemId:OpsItem' :: Maybe Text
opsItemId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:OpsItem' :: Maybe OpsItemStatus
status = Maybe OpsItemStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:priority:OpsItem' :: Maybe Natural
priority = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:OpsItem' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:category:OpsItem' :: Maybe Text
category = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:severity:OpsItem' :: Maybe Text
severity = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:OpsItem' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:OpsItem' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:opsItemType:OpsItem' :: Maybe Text
opsItemType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:OpsItem' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:OpsItem' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:relatedOpsItems:OpsItem' :: Maybe [RelatedOpsItem]
relatedOpsItems = Maybe [RelatedOpsItem]
forall a. Maybe a
Prelude.Nothing,
      $sel:title:OpsItem' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:OpsItem' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operationalData:OpsItem' :: Maybe (HashMap Text OpsItemDataValue)
operationalData = Maybe (HashMap Text OpsItemDataValue)
forall a. Maybe a
Prelude.Nothing,
      $sel:actualStartTime:OpsItem' :: Maybe POSIX
actualStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:OpsItem' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:plannedEndTime:OpsItem' :: Maybe POSIX
plannedEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:notifications:OpsItem' :: Maybe [OpsItemNotification]
notifications = Maybe [OpsItemNotification]
forall a. Maybe a
Prelude.Nothing,
      $sel:plannedStartTime:OpsItem' :: Maybe POSIX
plannedStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The ID of the OpsItem.
opsItem_opsItemId :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Text)
opsItem_opsItemId :: (Maybe Text -> f (Maybe Text)) -> OpsItem -> f OpsItem
opsItem_opsItemId = (OpsItem -> Maybe Text)
-> (OpsItem -> Maybe Text -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Text
opsItemId :: Maybe Text
$sel:opsItemId:OpsItem' :: OpsItem -> Maybe Text
opsItemId} -> Maybe Text
opsItemId) (\s :: OpsItem
s@OpsItem' {} Maybe Text
a -> OpsItem
s {$sel:opsItemId:OpsItem' :: Maybe Text
opsItemId = Maybe Text
a} :: OpsItem)

-- | The OpsItem status. Status can be @Open@, @In Progress@, or @Resolved@.
-- For more information, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html Editing OpsItem details>
-- in the /Amazon Web Services Systems Manager User Guide/.
opsItem_status :: Lens.Lens' OpsItem (Prelude.Maybe OpsItemStatus)
opsItem_status :: (Maybe OpsItemStatus -> f (Maybe OpsItemStatus))
-> OpsItem -> f OpsItem
opsItem_status = (OpsItem -> Maybe OpsItemStatus)
-> (OpsItem -> Maybe OpsItemStatus -> OpsItem)
-> Lens OpsItem OpsItem (Maybe OpsItemStatus) (Maybe OpsItemStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe OpsItemStatus
status :: Maybe OpsItemStatus
$sel:status:OpsItem' :: OpsItem -> Maybe OpsItemStatus
status} -> Maybe OpsItemStatus
status) (\s :: OpsItem
s@OpsItem' {} Maybe OpsItemStatus
a -> OpsItem
s {$sel:status:OpsItem' :: Maybe OpsItemStatus
status = Maybe OpsItemStatus
a} :: OpsItem)

-- | The importance of this OpsItem in relation to other OpsItems in the
-- system.
opsItem_priority :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Natural)
opsItem_priority :: (Maybe Natural -> f (Maybe Natural)) -> OpsItem -> f OpsItem
opsItem_priority = (OpsItem -> Maybe Natural)
-> (OpsItem -> Maybe Natural -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Natural
priority :: Maybe Natural
$sel:priority:OpsItem' :: OpsItem -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: OpsItem
s@OpsItem' {} Maybe Natural
a -> OpsItem
s {$sel:priority:OpsItem' :: Maybe Natural
priority = Maybe Natural
a} :: OpsItem)

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

-- | An OpsItem category. Category options include: Availability, Cost,
-- Performance, Recovery, Security.
opsItem_category :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Text)
opsItem_category :: (Maybe Text -> f (Maybe Text)) -> OpsItem -> f OpsItem
opsItem_category = (OpsItem -> Maybe Text)
-> (OpsItem -> Maybe Text -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Text
category :: Maybe Text
$sel:category:OpsItem' :: OpsItem -> Maybe Text
category} -> Maybe Text
category) (\s :: OpsItem
s@OpsItem' {} Maybe Text
a -> OpsItem
s {$sel:category:OpsItem' :: Maybe Text
category = Maybe Text
a} :: OpsItem)

-- | The severity of the OpsItem. Severity options range from 1 to 4.
opsItem_severity :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Text)
opsItem_severity :: (Maybe Text -> f (Maybe Text)) -> OpsItem -> f OpsItem
opsItem_severity = (OpsItem -> Maybe Text)
-> (OpsItem -> Maybe Text -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Text
severity :: Maybe Text
$sel:severity:OpsItem' :: OpsItem -> Maybe Text
severity} -> Maybe Text
severity) (\s :: OpsItem
s@OpsItem' {} Maybe Text
a -> OpsItem
s {$sel:severity:OpsItem' :: Maybe Text
severity = Maybe Text
a} :: OpsItem)

-- | The ARN of the Amazon Web Services account that created the OpsItem.
opsItem_createdBy :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Text)
opsItem_createdBy :: (Maybe Text -> f (Maybe Text)) -> OpsItem -> f OpsItem
opsItem_createdBy = (OpsItem -> Maybe Text)
-> (OpsItem -> Maybe Text -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:OpsItem' :: OpsItem -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: OpsItem
s@OpsItem' {} Maybe Text
a -> OpsItem
s {$sel:createdBy:OpsItem' :: Maybe Text
createdBy = Maybe Text
a} :: OpsItem)

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

-- | The type of OpsItem. Currently, the only valid values are
-- @\/aws\/changerequest@ and @\/aws\/issue@.
opsItem_opsItemType :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Text)
opsItem_opsItemType :: (Maybe Text -> f (Maybe Text)) -> OpsItem -> f OpsItem
opsItem_opsItemType = (OpsItem -> Maybe Text)
-> (OpsItem -> Maybe Text -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Text
opsItemType :: Maybe Text
$sel:opsItemType:OpsItem' :: OpsItem -> Maybe Text
opsItemType} -> Maybe Text
opsItemType) (\s :: OpsItem
s@OpsItem' {} Maybe Text
a -> OpsItem
s {$sel:opsItemType:OpsItem' :: Maybe Text
opsItemType = Maybe Text
a} :: OpsItem)

-- | The version of this OpsItem. Each time the OpsItem is edited the version
-- number increments by one.
opsItem_version :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Text)
opsItem_version :: (Maybe Text -> f (Maybe Text)) -> OpsItem -> f OpsItem
opsItem_version = (OpsItem -> Maybe Text)
-> (OpsItem -> Maybe Text -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Text
version :: Maybe Text
$sel:version:OpsItem' :: OpsItem -> Maybe Text
version} -> Maybe Text
version) (\s :: OpsItem
s@OpsItem' {} Maybe Text
a -> OpsItem
s {$sel:version:OpsItem' :: Maybe Text
version = Maybe Text
a} :: OpsItem)

-- | The origin of the OpsItem, such as Amazon EC2 or Systems Manager. The
-- impacted resource is a subset of source.
opsItem_source :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Text)
opsItem_source :: (Maybe Text -> f (Maybe Text)) -> OpsItem -> f OpsItem
opsItem_source = (OpsItem -> Maybe Text)
-> (OpsItem -> Maybe Text -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Text
source :: Maybe Text
$sel:source:OpsItem' :: OpsItem -> Maybe Text
source} -> Maybe Text
source) (\s :: OpsItem
s@OpsItem' {} Maybe Text
a -> OpsItem
s {$sel:source:OpsItem' :: Maybe Text
source = Maybe Text
a} :: OpsItem)

-- | One or more OpsItems that share something in common with the current
-- OpsItem. For example, related OpsItems can include OpsItems with similar
-- error messages, impacted resources, or statuses for the impacted
-- resource.
opsItem_relatedOpsItems :: Lens.Lens' OpsItem (Prelude.Maybe [RelatedOpsItem])
opsItem_relatedOpsItems :: (Maybe [RelatedOpsItem] -> f (Maybe [RelatedOpsItem]))
-> OpsItem -> f OpsItem
opsItem_relatedOpsItems = (OpsItem -> Maybe [RelatedOpsItem])
-> (OpsItem -> Maybe [RelatedOpsItem] -> OpsItem)
-> Lens
     OpsItem OpsItem (Maybe [RelatedOpsItem]) (Maybe [RelatedOpsItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe [RelatedOpsItem]
relatedOpsItems :: Maybe [RelatedOpsItem]
$sel:relatedOpsItems:OpsItem' :: OpsItem -> Maybe [RelatedOpsItem]
relatedOpsItems} -> Maybe [RelatedOpsItem]
relatedOpsItems) (\s :: OpsItem
s@OpsItem' {} Maybe [RelatedOpsItem]
a -> OpsItem
s {$sel:relatedOpsItems:OpsItem' :: Maybe [RelatedOpsItem]
relatedOpsItems = Maybe [RelatedOpsItem]
a} :: OpsItem) ((Maybe [RelatedOpsItem] -> f (Maybe [RelatedOpsItem]))
 -> OpsItem -> f OpsItem)
-> ((Maybe [RelatedOpsItem] -> f (Maybe [RelatedOpsItem]))
    -> Maybe [RelatedOpsItem] -> f (Maybe [RelatedOpsItem]))
-> (Maybe [RelatedOpsItem] -> f (Maybe [RelatedOpsItem]))
-> OpsItem
-> f OpsItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RelatedOpsItem] [RelatedOpsItem] [RelatedOpsItem] [RelatedOpsItem]
-> Iso
     (Maybe [RelatedOpsItem])
     (Maybe [RelatedOpsItem])
     (Maybe [RelatedOpsItem])
     (Maybe [RelatedOpsItem])
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
  [RelatedOpsItem] [RelatedOpsItem] [RelatedOpsItem] [RelatedOpsItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The ARN of the Amazon Web Services account that last updated the
-- OpsItem.
opsItem_lastModifiedBy :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Text)
opsItem_lastModifiedBy :: (Maybe Text -> f (Maybe Text)) -> OpsItem -> f OpsItem
opsItem_lastModifiedBy = (OpsItem -> Maybe Text)
-> (OpsItem -> Maybe Text -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:OpsItem' :: OpsItem -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: OpsItem
s@OpsItem' {} Maybe Text
a -> OpsItem
s {$sel:lastModifiedBy:OpsItem' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: OpsItem)

-- | Operational data is custom data that provides useful reference details
-- about the OpsItem. For example, you can specify log files, error
-- strings, license keys, troubleshooting tips, or other relevant data. You
-- enter operational data as key-value pairs. The key has a maximum length
-- of 128 characters. The value has a maximum size of 20 KB.
--
-- Operational data keys /can\'t/ begin with the following: @amazon@,
-- @aws@, @amzn@, @ssm@, @\/amazon@, @\/aws@, @\/amzn@, @\/ssm@.
--
-- You can choose to make the data searchable by other users in the account
-- or you can restrict search access. Searchable data means that all users
-- with access to the OpsItem Overview page (as provided by the
-- DescribeOpsItems API operation) can view and search on the specified
-- data. Operational data that isn\'t searchable is only viewable by users
-- who have access to the OpsItem (as provided by the GetOpsItem API
-- operation).
--
-- Use the @\/aws\/resources@ key in OperationalData to specify a related
-- resource in the request. Use the @\/aws\/automations@ key in
-- OperationalData to associate an Automation runbook with the OpsItem. To
-- view Amazon Web Services CLI example commands that use these keys, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems Creating OpsItems manually>
-- in the /Amazon Web Services Systems Manager User Guide/.
opsItem_operationalData :: Lens.Lens' OpsItem (Prelude.Maybe (Prelude.HashMap Prelude.Text OpsItemDataValue))
opsItem_operationalData :: (Maybe (HashMap Text OpsItemDataValue)
 -> f (Maybe (HashMap Text OpsItemDataValue)))
-> OpsItem -> f OpsItem
opsItem_operationalData = (OpsItem -> Maybe (HashMap Text OpsItemDataValue))
-> (OpsItem -> Maybe (HashMap Text OpsItemDataValue) -> OpsItem)
-> Lens
     OpsItem
     OpsItem
     (Maybe (HashMap Text OpsItemDataValue))
     (Maybe (HashMap Text OpsItemDataValue))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe (HashMap Text OpsItemDataValue)
operationalData :: Maybe (HashMap Text OpsItemDataValue)
$sel:operationalData:OpsItem' :: OpsItem -> Maybe (HashMap Text OpsItemDataValue)
operationalData} -> Maybe (HashMap Text OpsItemDataValue)
operationalData) (\s :: OpsItem
s@OpsItem' {} Maybe (HashMap Text OpsItemDataValue)
a -> OpsItem
s {$sel:operationalData:OpsItem' :: Maybe (HashMap Text OpsItemDataValue)
operationalData = Maybe (HashMap Text OpsItemDataValue)
a} :: OpsItem) ((Maybe (HashMap Text OpsItemDataValue)
  -> f (Maybe (HashMap Text OpsItemDataValue)))
 -> OpsItem -> f OpsItem)
-> ((Maybe (HashMap Text OpsItemDataValue)
     -> f (Maybe (HashMap Text OpsItemDataValue)))
    -> Maybe (HashMap Text OpsItemDataValue)
    -> f (Maybe (HashMap Text OpsItemDataValue)))
-> (Maybe (HashMap Text OpsItemDataValue)
    -> f (Maybe (HashMap Text OpsItemDataValue)))
-> OpsItem
-> f OpsItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text OpsItemDataValue)
  (HashMap Text OpsItemDataValue)
  (HashMap Text OpsItemDataValue)
  (HashMap Text OpsItemDataValue)
-> Iso
     (Maybe (HashMap Text OpsItemDataValue))
     (Maybe (HashMap Text OpsItemDataValue))
     (Maybe (HashMap Text OpsItemDataValue))
     (Maybe (HashMap Text OpsItemDataValue))
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
  (HashMap Text OpsItemDataValue)
  (HashMap Text OpsItemDataValue)
  (HashMap Text OpsItemDataValue)
  (HashMap Text OpsItemDataValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The OpsItem description.
opsItem_description :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.Text)
opsItem_description :: (Maybe Text -> f (Maybe Text)) -> OpsItem -> f OpsItem
opsItem_description = (OpsItem -> Maybe Text)
-> (OpsItem -> Maybe Text -> OpsItem)
-> Lens OpsItem OpsItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe Text
description :: Maybe Text
$sel:description:OpsItem' :: OpsItem -> Maybe Text
description} -> Maybe Text
description) (\s :: OpsItem
s@OpsItem' {} Maybe Text
a -> OpsItem
s {$sel:description:OpsItem' :: Maybe Text
description = Maybe Text
a} :: OpsItem)

-- | The time specified in a change request for a runbook workflow to end.
-- Currently supported only for the OpsItem type @\/aws\/changerequest@.
opsItem_plannedEndTime :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.UTCTime)
opsItem_plannedEndTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> OpsItem -> f OpsItem
opsItem_plannedEndTime = (OpsItem -> Maybe POSIX)
-> (OpsItem -> Maybe POSIX -> OpsItem)
-> Lens OpsItem OpsItem (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe POSIX
plannedEndTime :: Maybe POSIX
$sel:plannedEndTime:OpsItem' :: OpsItem -> Maybe POSIX
plannedEndTime} -> Maybe POSIX
plannedEndTime) (\s :: OpsItem
s@OpsItem' {} Maybe POSIX
a -> OpsItem
s {$sel:plannedEndTime:OpsItem' :: Maybe POSIX
plannedEndTime = Maybe POSIX
a} :: OpsItem) ((Maybe POSIX -> f (Maybe POSIX)) -> OpsItem -> f OpsItem)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> OpsItem
-> f OpsItem
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

-- | The Amazon Resource Name (ARN) of an Amazon Simple Notification Service
-- (Amazon SNS) topic where notifications are sent when this OpsItem is
-- edited or changed.
opsItem_notifications :: Lens.Lens' OpsItem (Prelude.Maybe [OpsItemNotification])
opsItem_notifications :: (Maybe [OpsItemNotification] -> f (Maybe [OpsItemNotification]))
-> OpsItem -> f OpsItem
opsItem_notifications = (OpsItem -> Maybe [OpsItemNotification])
-> (OpsItem -> Maybe [OpsItemNotification] -> OpsItem)
-> Lens
     OpsItem
     OpsItem
     (Maybe [OpsItemNotification])
     (Maybe [OpsItemNotification])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe [OpsItemNotification]
notifications :: Maybe [OpsItemNotification]
$sel:notifications:OpsItem' :: OpsItem -> Maybe [OpsItemNotification]
notifications} -> Maybe [OpsItemNotification]
notifications) (\s :: OpsItem
s@OpsItem' {} Maybe [OpsItemNotification]
a -> OpsItem
s {$sel:notifications:OpsItem' :: Maybe [OpsItemNotification]
notifications = Maybe [OpsItemNotification]
a} :: OpsItem) ((Maybe [OpsItemNotification] -> f (Maybe [OpsItemNotification]))
 -> OpsItem -> f OpsItem)
-> ((Maybe [OpsItemNotification]
     -> f (Maybe [OpsItemNotification]))
    -> Maybe [OpsItemNotification] -> f (Maybe [OpsItemNotification]))
-> (Maybe [OpsItemNotification] -> f (Maybe [OpsItemNotification]))
-> OpsItem
-> f OpsItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OpsItemNotification]
  [OpsItemNotification]
  [OpsItemNotification]
  [OpsItemNotification]
-> Iso
     (Maybe [OpsItemNotification])
     (Maybe [OpsItemNotification])
     (Maybe [OpsItemNotification])
     (Maybe [OpsItemNotification])
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
  [OpsItemNotification]
  [OpsItemNotification]
  [OpsItemNotification]
  [OpsItemNotification]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time specified in a change request for a runbook workflow to start.
-- Currently supported only for the OpsItem type @\/aws\/changerequest@.
opsItem_plannedStartTime :: Lens.Lens' OpsItem (Prelude.Maybe Prelude.UTCTime)
opsItem_plannedStartTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> OpsItem -> f OpsItem
opsItem_plannedStartTime = (OpsItem -> Maybe POSIX)
-> (OpsItem -> Maybe POSIX -> OpsItem)
-> Lens OpsItem OpsItem (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsItem' {Maybe POSIX
plannedStartTime :: Maybe POSIX
$sel:plannedStartTime:OpsItem' :: OpsItem -> Maybe POSIX
plannedStartTime} -> Maybe POSIX
plannedStartTime) (\s :: OpsItem
s@OpsItem' {} Maybe POSIX
a -> OpsItem
s {$sel:plannedStartTime:OpsItem' :: Maybe POSIX
plannedStartTime = Maybe POSIX
a} :: OpsItem) ((Maybe POSIX -> f (Maybe POSIX)) -> OpsItem -> f OpsItem)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> OpsItem
-> f OpsItem
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

instance Core.FromJSON OpsItem where
  parseJSON :: Value -> Parser OpsItem
parseJSON =
    String -> (Object -> Parser OpsItem) -> Value -> Parser OpsItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"OpsItem"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe OpsItemStatus
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [RelatedOpsItem]
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text OpsItemDataValue)
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe [OpsItemNotification]
-> Maybe POSIX
-> OpsItem
OpsItem'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe OpsItemStatus
 -> Maybe Natural
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [RelatedOpsItem]
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text OpsItemDataValue)
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [OpsItemNotification]
 -> Maybe POSIX
 -> OpsItem)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe OpsItemStatus
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Functor 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
"ActualEndTime")
            Parser
  (Maybe Text
   -> Maybe OpsItemStatus
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe OpsItemStatus
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OpsItemId")
            Parser
  (Maybe OpsItemStatus
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe OpsItemStatus)
-> Parser
     (Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OpsItemStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Natural)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Priority")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Category")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Severity")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedBy")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
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
"LastModifiedTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OpsItemType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
            Parser
  (Maybe Text
   -> Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe [RelatedOpsItem]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Source")
            Parser
  (Maybe [RelatedOpsItem]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe [RelatedOpsItem])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [RelatedOpsItem]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RelatedOpsItems"
                            Parser (Maybe (Maybe [RelatedOpsItem]))
-> Maybe [RelatedOpsItem] -> Parser (Maybe [RelatedOpsItem])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [RelatedOpsItem]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Title")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text OpsItemDataValue)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedBy")
            Parser
  (Maybe (HashMap Text OpsItemDataValue)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe (HashMap Text OpsItemDataValue))
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe (HashMap Text OpsItemDataValue)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OperationalData"
                            Parser (Maybe (Maybe (HashMap Text OpsItemDataValue)))
-> Maybe (HashMap Text OpsItemDataValue)
-> Parser (Maybe (HashMap Text OpsItemDataValue))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text OpsItemDataValue)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe [OpsItemNotification]
      -> Maybe POSIX
      -> OpsItem)
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
"ActualStartTime")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe [OpsItemNotification]
   -> Maybe POSIX
   -> OpsItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe [OpsItemNotification] -> Maybe POSIX -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser
  (Maybe POSIX
   -> Maybe [OpsItemNotification] -> Maybe POSIX -> OpsItem)
-> Parser (Maybe POSIX)
-> Parser (Maybe [OpsItemNotification] -> Maybe POSIX -> OpsItem)
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
"PlannedEndTime")
            Parser (Maybe [OpsItemNotification] -> Maybe POSIX -> OpsItem)
-> Parser (Maybe [OpsItemNotification])
-> Parser (Maybe POSIX -> OpsItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [OpsItemNotification]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Notifications" Parser (Maybe (Maybe [OpsItemNotification]))
-> Maybe [OpsItemNotification]
-> Parser (Maybe [OpsItemNotification])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [OpsItemNotification]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe POSIX -> OpsItem)
-> Parser (Maybe POSIX) -> Parser OpsItem
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
"PlannedStartTime")
      )

instance Prelude.Hashable OpsItem

instance Prelude.NFData OpsItem