{-# 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.IoT.Types.AuditMitigationActionExecutionMetadata
-- 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.IoT.Types.AuditMitigationActionExecutionMetadata where

import qualified Amazonka.Core as Core
import Amazonka.IoT.Types.AuditMitigationActionsExecutionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Returned by ListAuditMitigationActionsTask, this object contains
-- information that describes a mitigation action that has been started.
--
-- /See:/ 'newAuditMitigationActionExecutionMetadata' smart constructor.
data AuditMitigationActionExecutionMetadata = AuditMitigationActionExecutionMetadata'
  { -- | The current status of the task being executed.
    AuditMitigationActionExecutionMetadata
-> Maybe AuditMitigationActionsExecutionStatus
status :: Prelude.Maybe AuditMitigationActionsExecutionStatus,
    -- | The date and time when the task was started.
    AuditMitigationActionExecutionMetadata -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | The unique identifier for the task that applies the mitigation action.
    AuditMitigationActionExecutionMetadata -> Maybe Text
taskId :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the mitigation action being applied by the
    -- task.
    AuditMitigationActionExecutionMetadata -> Maybe Text
actionId :: Prelude.Maybe Prelude.Text,
    -- | The friendly name of the mitigation action being applied by the task.
    AuditMitigationActionExecutionMetadata -> Maybe Text
actionName :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the task was completed or canceled. Blank if the
    -- task is still running.
    AuditMitigationActionExecutionMetadata -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
    -- | If an error occurred, the code that indicates which type of error
    -- occurred.
    AuditMitigationActionExecutionMetadata -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the findings to which the task and associated
    -- mitigation action are applied.
    AuditMitigationActionExecutionMetadata -> Maybe Text
findingId :: Prelude.Maybe Prelude.Text,
    -- | If an error occurred, a message that describes the error.
    AuditMitigationActionExecutionMetadata -> Maybe Text
message :: Prelude.Maybe Prelude.Text
  }
  deriving (AuditMitigationActionExecutionMetadata
-> AuditMitigationActionExecutionMetadata -> Bool
(AuditMitigationActionExecutionMetadata
 -> AuditMitigationActionExecutionMetadata -> Bool)
-> (AuditMitigationActionExecutionMetadata
    -> AuditMitigationActionExecutionMetadata -> Bool)
-> Eq AuditMitigationActionExecutionMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuditMitigationActionExecutionMetadata
-> AuditMitigationActionExecutionMetadata -> Bool
$c/= :: AuditMitigationActionExecutionMetadata
-> AuditMitigationActionExecutionMetadata -> Bool
== :: AuditMitigationActionExecutionMetadata
-> AuditMitigationActionExecutionMetadata -> Bool
$c== :: AuditMitigationActionExecutionMetadata
-> AuditMitigationActionExecutionMetadata -> Bool
Prelude.Eq, ReadPrec [AuditMitigationActionExecutionMetadata]
ReadPrec AuditMitigationActionExecutionMetadata
Int -> ReadS AuditMitigationActionExecutionMetadata
ReadS [AuditMitigationActionExecutionMetadata]
(Int -> ReadS AuditMitigationActionExecutionMetadata)
-> ReadS [AuditMitigationActionExecutionMetadata]
-> ReadPrec AuditMitigationActionExecutionMetadata
-> ReadPrec [AuditMitigationActionExecutionMetadata]
-> Read AuditMitigationActionExecutionMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AuditMitigationActionExecutionMetadata]
$creadListPrec :: ReadPrec [AuditMitigationActionExecutionMetadata]
readPrec :: ReadPrec AuditMitigationActionExecutionMetadata
$creadPrec :: ReadPrec AuditMitigationActionExecutionMetadata
readList :: ReadS [AuditMitigationActionExecutionMetadata]
$creadList :: ReadS [AuditMitigationActionExecutionMetadata]
readsPrec :: Int -> ReadS AuditMitigationActionExecutionMetadata
$creadsPrec :: Int -> ReadS AuditMitigationActionExecutionMetadata
Prelude.Read, Int -> AuditMitigationActionExecutionMetadata -> ShowS
[AuditMitigationActionExecutionMetadata] -> ShowS
AuditMitigationActionExecutionMetadata -> String
(Int -> AuditMitigationActionExecutionMetadata -> ShowS)
-> (AuditMitigationActionExecutionMetadata -> String)
-> ([AuditMitigationActionExecutionMetadata] -> ShowS)
-> Show AuditMitigationActionExecutionMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuditMitigationActionExecutionMetadata] -> ShowS
$cshowList :: [AuditMitigationActionExecutionMetadata] -> ShowS
show :: AuditMitigationActionExecutionMetadata -> String
$cshow :: AuditMitigationActionExecutionMetadata -> String
showsPrec :: Int -> AuditMitigationActionExecutionMetadata -> ShowS
$cshowsPrec :: Int -> AuditMitigationActionExecutionMetadata -> ShowS
Prelude.Show, (forall x.
 AuditMitigationActionExecutionMetadata
 -> Rep AuditMitigationActionExecutionMetadata x)
-> (forall x.
    Rep AuditMitigationActionExecutionMetadata x
    -> AuditMitigationActionExecutionMetadata)
-> Generic AuditMitigationActionExecutionMetadata
forall x.
Rep AuditMitigationActionExecutionMetadata x
-> AuditMitigationActionExecutionMetadata
forall x.
AuditMitigationActionExecutionMetadata
-> Rep AuditMitigationActionExecutionMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AuditMitigationActionExecutionMetadata x
-> AuditMitigationActionExecutionMetadata
$cfrom :: forall x.
AuditMitigationActionExecutionMetadata
-> Rep AuditMitigationActionExecutionMetadata x
Prelude.Generic)

-- |
-- Create a value of 'AuditMitigationActionExecutionMetadata' 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:
--
-- 'status', 'auditMitigationActionExecutionMetadata_status' - The current status of the task being executed.
--
-- 'startTime', 'auditMitigationActionExecutionMetadata_startTime' - The date and time when the task was started.
--
-- 'taskId', 'auditMitigationActionExecutionMetadata_taskId' - The unique identifier for the task that applies the mitigation action.
--
-- 'actionId', 'auditMitigationActionExecutionMetadata_actionId' - The unique identifier for the mitigation action being applied by the
-- task.
--
-- 'actionName', 'auditMitigationActionExecutionMetadata_actionName' - The friendly name of the mitigation action being applied by the task.
--
-- 'endTime', 'auditMitigationActionExecutionMetadata_endTime' - The date and time when the task was completed or canceled. Blank if the
-- task is still running.
--
-- 'errorCode', 'auditMitigationActionExecutionMetadata_errorCode' - If an error occurred, the code that indicates which type of error
-- occurred.
--
-- 'findingId', 'auditMitigationActionExecutionMetadata_findingId' - The unique identifier for the findings to which the task and associated
-- mitigation action are applied.
--
-- 'message', 'auditMitigationActionExecutionMetadata_message' - If an error occurred, a message that describes the error.
newAuditMitigationActionExecutionMetadata ::
  AuditMitigationActionExecutionMetadata
newAuditMitigationActionExecutionMetadata :: AuditMitigationActionExecutionMetadata
newAuditMitigationActionExecutionMetadata =
  AuditMitigationActionExecutionMetadata' :: Maybe AuditMitigationActionsExecutionStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AuditMitigationActionExecutionMetadata
AuditMitigationActionExecutionMetadata'
    { $sel:status:AuditMitigationActionExecutionMetadata' :: Maybe AuditMitigationActionsExecutionStatus
status =
        Maybe AuditMitigationActionsExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:AuditMitigationActionExecutionMetadata' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:taskId:AuditMitigationActionExecutionMetadata' :: Maybe Text
taskId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:actionId:AuditMitigationActionExecutionMetadata' :: Maybe Text
actionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:actionName:AuditMitigationActionExecutionMetadata' :: Maybe Text
actionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:AuditMitigationActionExecutionMetadata' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:errorCode:AuditMitigationActionExecutionMetadata' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:findingId:AuditMitigationActionExecutionMetadata' :: Maybe Text
findingId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:AuditMitigationActionExecutionMetadata' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The current status of the task being executed.
auditMitigationActionExecutionMetadata_status :: Lens.Lens' AuditMitigationActionExecutionMetadata (Prelude.Maybe AuditMitigationActionsExecutionStatus)
auditMitigationActionExecutionMetadata_status :: (Maybe AuditMitigationActionsExecutionStatus
 -> f (Maybe AuditMitigationActionsExecutionStatus))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
auditMitigationActionExecutionMetadata_status = (AuditMitigationActionExecutionMetadata
 -> Maybe AuditMitigationActionsExecutionStatus)
-> (AuditMitigationActionExecutionMetadata
    -> Maybe AuditMitigationActionsExecutionStatus
    -> AuditMitigationActionExecutionMetadata)
-> Lens
     AuditMitigationActionExecutionMetadata
     AuditMitigationActionExecutionMetadata
     (Maybe AuditMitigationActionsExecutionStatus)
     (Maybe AuditMitigationActionsExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionExecutionMetadata' {Maybe AuditMitigationActionsExecutionStatus
status :: Maybe AuditMitigationActionsExecutionStatus
$sel:status:AuditMitigationActionExecutionMetadata' :: AuditMitigationActionExecutionMetadata
-> Maybe AuditMitigationActionsExecutionStatus
status} -> Maybe AuditMitigationActionsExecutionStatus
status) (\s :: AuditMitigationActionExecutionMetadata
s@AuditMitigationActionExecutionMetadata' {} Maybe AuditMitigationActionsExecutionStatus
a -> AuditMitigationActionExecutionMetadata
s {$sel:status:AuditMitigationActionExecutionMetadata' :: Maybe AuditMitigationActionsExecutionStatus
status = Maybe AuditMitigationActionsExecutionStatus
a} :: AuditMitigationActionExecutionMetadata)

-- | The date and time when the task was started.
auditMitigationActionExecutionMetadata_startTime :: Lens.Lens' AuditMitigationActionExecutionMetadata (Prelude.Maybe Prelude.UTCTime)
auditMitigationActionExecutionMetadata_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
auditMitigationActionExecutionMetadata_startTime = (AuditMitigationActionExecutionMetadata -> Maybe POSIX)
-> (AuditMitigationActionExecutionMetadata
    -> Maybe POSIX -> AuditMitigationActionExecutionMetadata)
-> Lens
     AuditMitigationActionExecutionMetadata
     AuditMitigationActionExecutionMetadata
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionExecutionMetadata' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:AuditMitigationActionExecutionMetadata' :: AuditMitigationActionExecutionMetadata -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: AuditMitigationActionExecutionMetadata
s@AuditMitigationActionExecutionMetadata' {} Maybe POSIX
a -> AuditMitigationActionExecutionMetadata
s {$sel:startTime:AuditMitigationActionExecutionMetadata' :: Maybe POSIX
startTime = Maybe POSIX
a} :: AuditMitigationActionExecutionMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> AuditMitigationActionExecutionMetadata
 -> f AuditMitigationActionExecutionMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
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 unique identifier for the task that applies the mitigation action.
auditMitigationActionExecutionMetadata_taskId :: Lens.Lens' AuditMitigationActionExecutionMetadata (Prelude.Maybe Prelude.Text)
auditMitigationActionExecutionMetadata_taskId :: (Maybe Text -> f (Maybe Text))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
auditMitigationActionExecutionMetadata_taskId = (AuditMitigationActionExecutionMetadata -> Maybe Text)
-> (AuditMitigationActionExecutionMetadata
    -> Maybe Text -> AuditMitigationActionExecutionMetadata)
-> Lens
     AuditMitigationActionExecutionMetadata
     AuditMitigationActionExecutionMetadata
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionExecutionMetadata' {Maybe Text
taskId :: Maybe Text
$sel:taskId:AuditMitigationActionExecutionMetadata' :: AuditMitigationActionExecutionMetadata -> Maybe Text
taskId} -> Maybe Text
taskId) (\s :: AuditMitigationActionExecutionMetadata
s@AuditMitigationActionExecutionMetadata' {} Maybe Text
a -> AuditMitigationActionExecutionMetadata
s {$sel:taskId:AuditMitigationActionExecutionMetadata' :: Maybe Text
taskId = Maybe Text
a} :: AuditMitigationActionExecutionMetadata)

-- | The unique identifier for the mitigation action being applied by the
-- task.
auditMitigationActionExecutionMetadata_actionId :: Lens.Lens' AuditMitigationActionExecutionMetadata (Prelude.Maybe Prelude.Text)
auditMitigationActionExecutionMetadata_actionId :: (Maybe Text -> f (Maybe Text))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
auditMitigationActionExecutionMetadata_actionId = (AuditMitigationActionExecutionMetadata -> Maybe Text)
-> (AuditMitigationActionExecutionMetadata
    -> Maybe Text -> AuditMitigationActionExecutionMetadata)
-> Lens
     AuditMitigationActionExecutionMetadata
     AuditMitigationActionExecutionMetadata
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionExecutionMetadata' {Maybe Text
actionId :: Maybe Text
$sel:actionId:AuditMitigationActionExecutionMetadata' :: AuditMitigationActionExecutionMetadata -> Maybe Text
actionId} -> Maybe Text
actionId) (\s :: AuditMitigationActionExecutionMetadata
s@AuditMitigationActionExecutionMetadata' {} Maybe Text
a -> AuditMitigationActionExecutionMetadata
s {$sel:actionId:AuditMitigationActionExecutionMetadata' :: Maybe Text
actionId = Maybe Text
a} :: AuditMitigationActionExecutionMetadata)

-- | The friendly name of the mitigation action being applied by the task.
auditMitigationActionExecutionMetadata_actionName :: Lens.Lens' AuditMitigationActionExecutionMetadata (Prelude.Maybe Prelude.Text)
auditMitigationActionExecutionMetadata_actionName :: (Maybe Text -> f (Maybe Text))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
auditMitigationActionExecutionMetadata_actionName = (AuditMitigationActionExecutionMetadata -> Maybe Text)
-> (AuditMitigationActionExecutionMetadata
    -> Maybe Text -> AuditMitigationActionExecutionMetadata)
-> Lens
     AuditMitigationActionExecutionMetadata
     AuditMitigationActionExecutionMetadata
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionExecutionMetadata' {Maybe Text
actionName :: Maybe Text
$sel:actionName:AuditMitigationActionExecutionMetadata' :: AuditMitigationActionExecutionMetadata -> Maybe Text
actionName} -> Maybe Text
actionName) (\s :: AuditMitigationActionExecutionMetadata
s@AuditMitigationActionExecutionMetadata' {} Maybe Text
a -> AuditMitigationActionExecutionMetadata
s {$sel:actionName:AuditMitigationActionExecutionMetadata' :: Maybe Text
actionName = Maybe Text
a} :: AuditMitigationActionExecutionMetadata)

-- | The date and time when the task was completed or canceled. Blank if the
-- task is still running.
auditMitigationActionExecutionMetadata_endTime :: Lens.Lens' AuditMitigationActionExecutionMetadata (Prelude.Maybe Prelude.UTCTime)
auditMitigationActionExecutionMetadata_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
auditMitigationActionExecutionMetadata_endTime = (AuditMitigationActionExecutionMetadata -> Maybe POSIX)
-> (AuditMitigationActionExecutionMetadata
    -> Maybe POSIX -> AuditMitigationActionExecutionMetadata)
-> Lens
     AuditMitigationActionExecutionMetadata
     AuditMitigationActionExecutionMetadata
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionExecutionMetadata' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:AuditMitigationActionExecutionMetadata' :: AuditMitigationActionExecutionMetadata -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: AuditMitigationActionExecutionMetadata
s@AuditMitigationActionExecutionMetadata' {} Maybe POSIX
a -> AuditMitigationActionExecutionMetadata
s {$sel:endTime:AuditMitigationActionExecutionMetadata' :: Maybe POSIX
endTime = Maybe POSIX
a} :: AuditMitigationActionExecutionMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> AuditMitigationActionExecutionMetadata
 -> f AuditMitigationActionExecutionMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
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

-- | If an error occurred, the code that indicates which type of error
-- occurred.
auditMitigationActionExecutionMetadata_errorCode :: Lens.Lens' AuditMitigationActionExecutionMetadata (Prelude.Maybe Prelude.Text)
auditMitigationActionExecutionMetadata_errorCode :: (Maybe Text -> f (Maybe Text))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
auditMitigationActionExecutionMetadata_errorCode = (AuditMitigationActionExecutionMetadata -> Maybe Text)
-> (AuditMitigationActionExecutionMetadata
    -> Maybe Text -> AuditMitigationActionExecutionMetadata)
-> Lens
     AuditMitigationActionExecutionMetadata
     AuditMitigationActionExecutionMetadata
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionExecutionMetadata' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:AuditMitigationActionExecutionMetadata' :: AuditMitigationActionExecutionMetadata -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: AuditMitigationActionExecutionMetadata
s@AuditMitigationActionExecutionMetadata' {} Maybe Text
a -> AuditMitigationActionExecutionMetadata
s {$sel:errorCode:AuditMitigationActionExecutionMetadata' :: Maybe Text
errorCode = Maybe Text
a} :: AuditMitigationActionExecutionMetadata)

-- | The unique identifier for the findings to which the task and associated
-- mitigation action are applied.
auditMitigationActionExecutionMetadata_findingId :: Lens.Lens' AuditMitigationActionExecutionMetadata (Prelude.Maybe Prelude.Text)
auditMitigationActionExecutionMetadata_findingId :: (Maybe Text -> f (Maybe Text))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
auditMitigationActionExecutionMetadata_findingId = (AuditMitigationActionExecutionMetadata -> Maybe Text)
-> (AuditMitigationActionExecutionMetadata
    -> Maybe Text -> AuditMitigationActionExecutionMetadata)
-> Lens
     AuditMitigationActionExecutionMetadata
     AuditMitigationActionExecutionMetadata
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionExecutionMetadata' {Maybe Text
findingId :: Maybe Text
$sel:findingId:AuditMitigationActionExecutionMetadata' :: AuditMitigationActionExecutionMetadata -> Maybe Text
findingId} -> Maybe Text
findingId) (\s :: AuditMitigationActionExecutionMetadata
s@AuditMitigationActionExecutionMetadata' {} Maybe Text
a -> AuditMitigationActionExecutionMetadata
s {$sel:findingId:AuditMitigationActionExecutionMetadata' :: Maybe Text
findingId = Maybe Text
a} :: AuditMitigationActionExecutionMetadata)

-- | If an error occurred, a message that describes the error.
auditMitigationActionExecutionMetadata_message :: Lens.Lens' AuditMitigationActionExecutionMetadata (Prelude.Maybe Prelude.Text)
auditMitigationActionExecutionMetadata_message :: (Maybe Text -> f (Maybe Text))
-> AuditMitigationActionExecutionMetadata
-> f AuditMitigationActionExecutionMetadata
auditMitigationActionExecutionMetadata_message = (AuditMitigationActionExecutionMetadata -> Maybe Text)
-> (AuditMitigationActionExecutionMetadata
    -> Maybe Text -> AuditMitigationActionExecutionMetadata)
-> Lens
     AuditMitigationActionExecutionMetadata
     AuditMitigationActionExecutionMetadata
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionExecutionMetadata' {Maybe Text
message :: Maybe Text
$sel:message:AuditMitigationActionExecutionMetadata' :: AuditMitigationActionExecutionMetadata -> Maybe Text
message} -> Maybe Text
message) (\s :: AuditMitigationActionExecutionMetadata
s@AuditMitigationActionExecutionMetadata' {} Maybe Text
a -> AuditMitigationActionExecutionMetadata
s {$sel:message:AuditMitigationActionExecutionMetadata' :: Maybe Text
message = Maybe Text
a} :: AuditMitigationActionExecutionMetadata)

instance
  Core.FromJSON
    AuditMitigationActionExecutionMetadata
  where
  parseJSON :: Value -> Parser AuditMitigationActionExecutionMetadata
parseJSON =
    String
-> (Object -> Parser AuditMitigationActionExecutionMetadata)
-> Value
-> Parser AuditMitigationActionExecutionMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AuditMitigationActionExecutionMetadata"
      ( \Object
x ->
          Maybe AuditMitigationActionsExecutionStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AuditMitigationActionExecutionMetadata
AuditMitigationActionExecutionMetadata'
            (Maybe AuditMitigationActionsExecutionStatus
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> AuditMitigationActionExecutionMetadata)
-> Parser (Maybe AuditMitigationActionsExecutionStatus)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AuditMitigationActionExecutionMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Parser (Maybe AuditMitigationActionsExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AuditMitigationActionExecutionMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AuditMitigationActionExecutionMetadata)
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
"startTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AuditMitigationActionExecutionMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AuditMitigationActionExecutionMetadata)
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
"taskId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AuditMitigationActionExecutionMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AuditMitigationActionExecutionMetadata)
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
"actionId")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AuditMitigationActionExecutionMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AuditMitigationActionExecutionMetadata)
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
"actionName")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AuditMitigationActionExecutionMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AuditMitigationActionExecutionMetadata)
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
"endTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AuditMitigationActionExecutionMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> AuditMitigationActionExecutionMetadata)
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
"errorCode")
            Parser
  (Maybe Text
   -> Maybe Text -> AuditMitigationActionExecutionMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AuditMitigationActionExecutionMetadata)
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
"findingId")
            Parser (Maybe Text -> AuditMitigationActionExecutionMetadata)
-> Parser (Maybe Text)
-> Parser AuditMitigationActionExecutionMetadata
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
"message")
      )

instance
  Prelude.Hashable
    AuditMitigationActionExecutionMetadata

instance
  Prelude.NFData
    AuditMitigationActionExecutionMetadata