{-# 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.DetectMitigationActionExecution
-- 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.DetectMitigationActionExecution where

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

-- | Describes which mitigation actions should be executed.
--
-- /See:/ 'newDetectMitigationActionExecution' smart constructor.
data DetectMitigationActionExecution = DetectMitigationActionExecution'
  { -- | The status of a mitigation action.
    DetectMitigationActionExecution
-> Maybe DetectMitigationActionExecutionStatus
status :: Prelude.Maybe DetectMitigationActionExecutionStatus,
    -- | The unique identifier of the task.
    DetectMitigationActionExecution -> Maybe Text
taskId :: Prelude.Maybe Prelude.Text,
    -- | The friendly name that uniquely identifies the mitigation action.
    DetectMitigationActionExecution -> Maybe Text
actionName :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the violation.
    DetectMitigationActionExecution -> Maybe Text
violationId :: Prelude.Maybe Prelude.Text,
    -- | The error code of a mitigation action.
    DetectMitigationActionExecution -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
    -- | The message of a mitigation action.
    DetectMitigationActionExecution -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The name of the thing.
    DetectMitigationActionExecution -> Maybe Text
thingName :: Prelude.Maybe Prelude.Text,
    -- | The date a mitigation action was started.
    DetectMitigationActionExecution -> Maybe POSIX
executionStartDate :: Prelude.Maybe Core.POSIX,
    -- | The date a mitigation action ended.
    DetectMitigationActionExecution -> Maybe POSIX
executionEndDate :: Prelude.Maybe Core.POSIX
  }
  deriving (DetectMitigationActionExecution
-> DetectMitigationActionExecution -> Bool
(DetectMitigationActionExecution
 -> DetectMitigationActionExecution -> Bool)
-> (DetectMitigationActionExecution
    -> DetectMitigationActionExecution -> Bool)
-> Eq DetectMitigationActionExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectMitigationActionExecution
-> DetectMitigationActionExecution -> Bool
$c/= :: DetectMitigationActionExecution
-> DetectMitigationActionExecution -> Bool
== :: DetectMitigationActionExecution
-> DetectMitigationActionExecution -> Bool
$c== :: DetectMitigationActionExecution
-> DetectMitigationActionExecution -> Bool
Prelude.Eq, ReadPrec [DetectMitigationActionExecution]
ReadPrec DetectMitigationActionExecution
Int -> ReadS DetectMitigationActionExecution
ReadS [DetectMitigationActionExecution]
(Int -> ReadS DetectMitigationActionExecution)
-> ReadS [DetectMitigationActionExecution]
-> ReadPrec DetectMitigationActionExecution
-> ReadPrec [DetectMitigationActionExecution]
-> Read DetectMitigationActionExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectMitigationActionExecution]
$creadListPrec :: ReadPrec [DetectMitigationActionExecution]
readPrec :: ReadPrec DetectMitigationActionExecution
$creadPrec :: ReadPrec DetectMitigationActionExecution
readList :: ReadS [DetectMitigationActionExecution]
$creadList :: ReadS [DetectMitigationActionExecution]
readsPrec :: Int -> ReadS DetectMitigationActionExecution
$creadsPrec :: Int -> ReadS DetectMitigationActionExecution
Prelude.Read, Int -> DetectMitigationActionExecution -> ShowS
[DetectMitigationActionExecution] -> ShowS
DetectMitigationActionExecution -> String
(Int -> DetectMitigationActionExecution -> ShowS)
-> (DetectMitigationActionExecution -> String)
-> ([DetectMitigationActionExecution] -> ShowS)
-> Show DetectMitigationActionExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectMitigationActionExecution] -> ShowS
$cshowList :: [DetectMitigationActionExecution] -> ShowS
show :: DetectMitigationActionExecution -> String
$cshow :: DetectMitigationActionExecution -> String
showsPrec :: Int -> DetectMitigationActionExecution -> ShowS
$cshowsPrec :: Int -> DetectMitigationActionExecution -> ShowS
Prelude.Show, (forall x.
 DetectMitigationActionExecution
 -> Rep DetectMitigationActionExecution x)
-> (forall x.
    Rep DetectMitigationActionExecution x
    -> DetectMitigationActionExecution)
-> Generic DetectMitigationActionExecution
forall x.
Rep DetectMitigationActionExecution x
-> DetectMitigationActionExecution
forall x.
DetectMitigationActionExecution
-> Rep DetectMitigationActionExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetectMitigationActionExecution x
-> DetectMitigationActionExecution
$cfrom :: forall x.
DetectMitigationActionExecution
-> Rep DetectMitigationActionExecution x
Prelude.Generic)

-- |
-- Create a value of 'DetectMitigationActionExecution' 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', 'detectMitigationActionExecution_status' - The status of a mitigation action.
--
-- 'taskId', 'detectMitigationActionExecution_taskId' - The unique identifier of the task.
--
-- 'actionName', 'detectMitigationActionExecution_actionName' - The friendly name that uniquely identifies the mitigation action.
--
-- 'violationId', 'detectMitigationActionExecution_violationId' - The unique identifier of the violation.
--
-- 'errorCode', 'detectMitigationActionExecution_errorCode' - The error code of a mitigation action.
--
-- 'message', 'detectMitigationActionExecution_message' - The message of a mitigation action.
--
-- 'thingName', 'detectMitigationActionExecution_thingName' - The name of the thing.
--
-- 'executionStartDate', 'detectMitigationActionExecution_executionStartDate' - The date a mitigation action was started.
--
-- 'executionEndDate', 'detectMitigationActionExecution_executionEndDate' - The date a mitigation action ended.
newDetectMitigationActionExecution ::
  DetectMitigationActionExecution
newDetectMitigationActionExecution :: DetectMitigationActionExecution
newDetectMitigationActionExecution =
  DetectMitigationActionExecution' :: Maybe DetectMitigationActionExecutionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> DetectMitigationActionExecution
DetectMitigationActionExecution'
    { $sel:status:DetectMitigationActionExecution' :: Maybe DetectMitigationActionExecutionStatus
status =
        Maybe DetectMitigationActionExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:taskId:DetectMitigationActionExecution' :: Maybe Text
taskId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:actionName:DetectMitigationActionExecution' :: Maybe Text
actionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:violationId:DetectMitigationActionExecution' :: Maybe Text
violationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorCode:DetectMitigationActionExecution' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:DetectMitigationActionExecution' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:thingName:DetectMitigationActionExecution' :: Maybe Text
thingName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:executionStartDate:DetectMitigationActionExecution' :: Maybe POSIX
executionStartDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:executionEndDate:DetectMitigationActionExecution' :: Maybe POSIX
executionEndDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of a mitigation action.
detectMitigationActionExecution_status :: Lens.Lens' DetectMitigationActionExecution (Prelude.Maybe DetectMitigationActionExecutionStatus)
detectMitigationActionExecution_status :: (Maybe DetectMitigationActionExecutionStatus
 -> f (Maybe DetectMitigationActionExecutionStatus))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
detectMitigationActionExecution_status = (DetectMitigationActionExecution
 -> Maybe DetectMitigationActionExecutionStatus)
-> (DetectMitigationActionExecution
    -> Maybe DetectMitigationActionExecutionStatus
    -> DetectMitigationActionExecution)
-> Lens
     DetectMitigationActionExecution
     DetectMitigationActionExecution
     (Maybe DetectMitigationActionExecutionStatus)
     (Maybe DetectMitigationActionExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionExecution' {Maybe DetectMitigationActionExecutionStatus
status :: Maybe DetectMitigationActionExecutionStatus
$sel:status:DetectMitigationActionExecution' :: DetectMitigationActionExecution
-> Maybe DetectMitigationActionExecutionStatus
status} -> Maybe DetectMitigationActionExecutionStatus
status) (\s :: DetectMitigationActionExecution
s@DetectMitigationActionExecution' {} Maybe DetectMitigationActionExecutionStatus
a -> DetectMitigationActionExecution
s {$sel:status:DetectMitigationActionExecution' :: Maybe DetectMitigationActionExecutionStatus
status = Maybe DetectMitigationActionExecutionStatus
a} :: DetectMitigationActionExecution)

-- | The unique identifier of the task.
detectMitigationActionExecution_taskId :: Lens.Lens' DetectMitigationActionExecution (Prelude.Maybe Prelude.Text)
detectMitigationActionExecution_taskId :: (Maybe Text -> f (Maybe Text))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
detectMitigationActionExecution_taskId = (DetectMitigationActionExecution -> Maybe Text)
-> (DetectMitigationActionExecution
    -> Maybe Text -> DetectMitigationActionExecution)
-> Lens
     DetectMitigationActionExecution
     DetectMitigationActionExecution
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionExecution' {Maybe Text
taskId :: Maybe Text
$sel:taskId:DetectMitigationActionExecution' :: DetectMitigationActionExecution -> Maybe Text
taskId} -> Maybe Text
taskId) (\s :: DetectMitigationActionExecution
s@DetectMitigationActionExecution' {} Maybe Text
a -> DetectMitigationActionExecution
s {$sel:taskId:DetectMitigationActionExecution' :: Maybe Text
taskId = Maybe Text
a} :: DetectMitigationActionExecution)

-- | The friendly name that uniquely identifies the mitigation action.
detectMitigationActionExecution_actionName :: Lens.Lens' DetectMitigationActionExecution (Prelude.Maybe Prelude.Text)
detectMitigationActionExecution_actionName :: (Maybe Text -> f (Maybe Text))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
detectMitigationActionExecution_actionName = (DetectMitigationActionExecution -> Maybe Text)
-> (DetectMitigationActionExecution
    -> Maybe Text -> DetectMitigationActionExecution)
-> Lens
     DetectMitigationActionExecution
     DetectMitigationActionExecution
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionExecution' {Maybe Text
actionName :: Maybe Text
$sel:actionName:DetectMitigationActionExecution' :: DetectMitigationActionExecution -> Maybe Text
actionName} -> Maybe Text
actionName) (\s :: DetectMitigationActionExecution
s@DetectMitigationActionExecution' {} Maybe Text
a -> DetectMitigationActionExecution
s {$sel:actionName:DetectMitigationActionExecution' :: Maybe Text
actionName = Maybe Text
a} :: DetectMitigationActionExecution)

-- | The unique identifier of the violation.
detectMitigationActionExecution_violationId :: Lens.Lens' DetectMitigationActionExecution (Prelude.Maybe Prelude.Text)
detectMitigationActionExecution_violationId :: (Maybe Text -> f (Maybe Text))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
detectMitigationActionExecution_violationId = (DetectMitigationActionExecution -> Maybe Text)
-> (DetectMitigationActionExecution
    -> Maybe Text -> DetectMitigationActionExecution)
-> Lens
     DetectMitigationActionExecution
     DetectMitigationActionExecution
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionExecution' {Maybe Text
violationId :: Maybe Text
$sel:violationId:DetectMitigationActionExecution' :: DetectMitigationActionExecution -> Maybe Text
violationId} -> Maybe Text
violationId) (\s :: DetectMitigationActionExecution
s@DetectMitigationActionExecution' {} Maybe Text
a -> DetectMitigationActionExecution
s {$sel:violationId:DetectMitigationActionExecution' :: Maybe Text
violationId = Maybe Text
a} :: DetectMitigationActionExecution)

-- | The error code of a mitigation action.
detectMitigationActionExecution_errorCode :: Lens.Lens' DetectMitigationActionExecution (Prelude.Maybe Prelude.Text)
detectMitigationActionExecution_errorCode :: (Maybe Text -> f (Maybe Text))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
detectMitigationActionExecution_errorCode = (DetectMitigationActionExecution -> Maybe Text)
-> (DetectMitigationActionExecution
    -> Maybe Text -> DetectMitigationActionExecution)
-> Lens
     DetectMitigationActionExecution
     DetectMitigationActionExecution
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionExecution' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:DetectMitigationActionExecution' :: DetectMitigationActionExecution -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: DetectMitigationActionExecution
s@DetectMitigationActionExecution' {} Maybe Text
a -> DetectMitigationActionExecution
s {$sel:errorCode:DetectMitigationActionExecution' :: Maybe Text
errorCode = Maybe Text
a} :: DetectMitigationActionExecution)

-- | The message of a mitigation action.
detectMitigationActionExecution_message :: Lens.Lens' DetectMitigationActionExecution (Prelude.Maybe Prelude.Text)
detectMitigationActionExecution_message :: (Maybe Text -> f (Maybe Text))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
detectMitigationActionExecution_message = (DetectMitigationActionExecution -> Maybe Text)
-> (DetectMitigationActionExecution
    -> Maybe Text -> DetectMitigationActionExecution)
-> Lens
     DetectMitigationActionExecution
     DetectMitigationActionExecution
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionExecution' {Maybe Text
message :: Maybe Text
$sel:message:DetectMitigationActionExecution' :: DetectMitigationActionExecution -> Maybe Text
message} -> Maybe Text
message) (\s :: DetectMitigationActionExecution
s@DetectMitigationActionExecution' {} Maybe Text
a -> DetectMitigationActionExecution
s {$sel:message:DetectMitigationActionExecution' :: Maybe Text
message = Maybe Text
a} :: DetectMitigationActionExecution)

-- | The name of the thing.
detectMitigationActionExecution_thingName :: Lens.Lens' DetectMitigationActionExecution (Prelude.Maybe Prelude.Text)
detectMitigationActionExecution_thingName :: (Maybe Text -> f (Maybe Text))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
detectMitigationActionExecution_thingName = (DetectMitigationActionExecution -> Maybe Text)
-> (DetectMitigationActionExecution
    -> Maybe Text -> DetectMitigationActionExecution)
-> Lens
     DetectMitigationActionExecution
     DetectMitigationActionExecution
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionExecution' {Maybe Text
thingName :: Maybe Text
$sel:thingName:DetectMitigationActionExecution' :: DetectMitigationActionExecution -> Maybe Text
thingName} -> Maybe Text
thingName) (\s :: DetectMitigationActionExecution
s@DetectMitigationActionExecution' {} Maybe Text
a -> DetectMitigationActionExecution
s {$sel:thingName:DetectMitigationActionExecution' :: Maybe Text
thingName = Maybe Text
a} :: DetectMitigationActionExecution)

-- | The date a mitigation action was started.
detectMitigationActionExecution_executionStartDate :: Lens.Lens' DetectMitigationActionExecution (Prelude.Maybe Prelude.UTCTime)
detectMitigationActionExecution_executionStartDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
detectMitigationActionExecution_executionStartDate = (DetectMitigationActionExecution -> Maybe POSIX)
-> (DetectMitigationActionExecution
    -> Maybe POSIX -> DetectMitigationActionExecution)
-> Lens
     DetectMitigationActionExecution
     DetectMitigationActionExecution
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionExecution' {Maybe POSIX
executionStartDate :: Maybe POSIX
$sel:executionStartDate:DetectMitigationActionExecution' :: DetectMitigationActionExecution -> Maybe POSIX
executionStartDate} -> Maybe POSIX
executionStartDate) (\s :: DetectMitigationActionExecution
s@DetectMitigationActionExecution' {} Maybe POSIX
a -> DetectMitigationActionExecution
s {$sel:executionStartDate:DetectMitigationActionExecution' :: Maybe POSIX
executionStartDate = Maybe POSIX
a} :: DetectMitigationActionExecution) ((Maybe POSIX -> f (Maybe POSIX))
 -> DetectMitigationActionExecution
 -> f DetectMitigationActionExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
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 date a mitigation action ended.
detectMitigationActionExecution_executionEndDate :: Lens.Lens' DetectMitigationActionExecution (Prelude.Maybe Prelude.UTCTime)
detectMitigationActionExecution_executionEndDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
detectMitigationActionExecution_executionEndDate = (DetectMitigationActionExecution -> Maybe POSIX)
-> (DetectMitigationActionExecution
    -> Maybe POSIX -> DetectMitigationActionExecution)
-> Lens
     DetectMitigationActionExecution
     DetectMitigationActionExecution
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionExecution' {Maybe POSIX
executionEndDate :: Maybe POSIX
$sel:executionEndDate:DetectMitigationActionExecution' :: DetectMitigationActionExecution -> Maybe POSIX
executionEndDate} -> Maybe POSIX
executionEndDate) (\s :: DetectMitigationActionExecution
s@DetectMitigationActionExecution' {} Maybe POSIX
a -> DetectMitigationActionExecution
s {$sel:executionEndDate:DetectMitigationActionExecution' :: Maybe POSIX
executionEndDate = Maybe POSIX
a} :: DetectMitigationActionExecution) ((Maybe POSIX -> f (Maybe POSIX))
 -> DetectMitigationActionExecution
 -> f DetectMitigationActionExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectMitigationActionExecution
-> f DetectMitigationActionExecution
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
    DetectMitigationActionExecution
  where
  parseJSON :: Value -> Parser DetectMitigationActionExecution
parseJSON =
    String
-> (Object -> Parser DetectMitigationActionExecution)
-> Value
-> Parser DetectMitigationActionExecution
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DetectMitigationActionExecution"
      ( \Object
x ->
          Maybe DetectMitigationActionExecutionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> DetectMitigationActionExecution
DetectMitigationActionExecution'
            (Maybe DetectMitigationActionExecutionStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> DetectMitigationActionExecution)
-> Parser (Maybe DetectMitigationActionExecutionStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> DetectMitigationActionExecution)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Parser (Maybe DetectMitigationActionExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> DetectMitigationActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> DetectMitigationActionExecution)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> DetectMitigationActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> DetectMitigationActionExecution)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> DetectMitigationActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> DetectMitigationActionExecution)
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
"violationId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> DetectMitigationActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> DetectMitigationActionExecution)
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
   -> Maybe POSIX
   -> Maybe POSIX
   -> DetectMitigationActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX -> Maybe POSIX -> DetectMitigationActionExecution)
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")
            Parser
  (Maybe Text
   -> Maybe POSIX -> Maybe POSIX -> DetectMitigationActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX -> Maybe POSIX -> DetectMitigationActionExecution)
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
"thingName")
            Parser
  (Maybe POSIX -> Maybe POSIX -> DetectMitigationActionExecution)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> DetectMitigationActionExecution)
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
"executionStartDate")
            Parser (Maybe POSIX -> DetectMitigationActionExecution)
-> Parser (Maybe POSIX) -> Parser DetectMitigationActionExecution
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
"executionEndDate")
      )

instance
  Prelude.Hashable
    DetectMitigationActionExecution

instance
  Prelude.NFData
    DetectMitigationActionExecution