{-# 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.MitigationActionParams
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoT.Types.MitigationActionParams where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoT.Types.AddThingsToThingGroupParams
import Amazonka.IoT.Types.EnableIoTLoggingParams
import Amazonka.IoT.Types.PublishFindingToSnsParams
import Amazonka.IoT.Types.ReplaceDefaultPolicyVersionParams
import Amazonka.IoT.Types.UpdateCACertificateParams
import Amazonka.IoT.Types.UpdateDeviceCertificateParams
import qualified Amazonka.Prelude as Prelude

-- | The set of parameters for this mitigation action. You can specify only
-- one type of parameter (in other words, you can apply only one action for
-- each defined mitigation action).
--
-- /See:/ 'newMitigationActionParams' smart constructor.
data MitigationActionParams = MitigationActionParams'
  { -- | Parameters to define a mitigation action that moves devices associated
    -- with a certificate to one or more specified thing groups, typically for
    -- quarantine.
    MitigationActionParams -> Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams :: Prelude.Maybe AddThingsToThingGroupParams,
    -- | Parameters to define a mitigation action that enables Amazon Web
    -- Services IoT Core logging at a specified level of detail.
    MitigationActionParams -> Maybe EnableIoTLoggingParams
enableIoTLoggingParams :: Prelude.Maybe EnableIoTLoggingParams,
    -- | Parameters to define a mitigation action that publishes findings to
    -- Amazon Simple Notification Service (Amazon SNS. You can implement your
    -- own custom actions in response to the Amazon SNS messages.
    MitigationActionParams -> Maybe PublishFindingToSnsParams
publishFindingToSnsParams :: Prelude.Maybe PublishFindingToSnsParams,
    -- | Parameters to define a mitigation action that adds a blank policy to
    -- restrict permissions.
    MitigationActionParams -> Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams :: Prelude.Maybe ReplaceDefaultPolicyVersionParams,
    -- | Parameters to define a mitigation action that changes the state of the
    -- CA certificate to inactive.
    MitigationActionParams -> Maybe UpdateCACertificateParams
updateCACertificateParams :: Prelude.Maybe UpdateCACertificateParams,
    -- | Parameters to define a mitigation action that changes the state of the
    -- device certificate to inactive.
    MitigationActionParams -> Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams :: Prelude.Maybe UpdateDeviceCertificateParams
  }
  deriving (MitigationActionParams -> MitigationActionParams -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MitigationActionParams -> MitigationActionParams -> Bool
$c/= :: MitigationActionParams -> MitigationActionParams -> Bool
== :: MitigationActionParams -> MitigationActionParams -> Bool
$c== :: MitigationActionParams -> MitigationActionParams -> Bool
Prelude.Eq, ReadPrec [MitigationActionParams]
ReadPrec MitigationActionParams
Int -> ReadS MitigationActionParams
ReadS [MitigationActionParams]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MitigationActionParams]
$creadListPrec :: ReadPrec [MitigationActionParams]
readPrec :: ReadPrec MitigationActionParams
$creadPrec :: ReadPrec MitigationActionParams
readList :: ReadS [MitigationActionParams]
$creadList :: ReadS [MitigationActionParams]
readsPrec :: Int -> ReadS MitigationActionParams
$creadsPrec :: Int -> ReadS MitigationActionParams
Prelude.Read, Int -> MitigationActionParams -> ShowS
[MitigationActionParams] -> ShowS
MitigationActionParams -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MitigationActionParams] -> ShowS
$cshowList :: [MitigationActionParams] -> ShowS
show :: MitigationActionParams -> String
$cshow :: MitigationActionParams -> String
showsPrec :: Int -> MitigationActionParams -> ShowS
$cshowsPrec :: Int -> MitigationActionParams -> ShowS
Prelude.Show, forall x. Rep MitigationActionParams x -> MitigationActionParams
forall x. MitigationActionParams -> Rep MitigationActionParams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MitigationActionParams x -> MitigationActionParams
$cfrom :: forall x. MitigationActionParams -> Rep MitigationActionParams x
Prelude.Generic)

-- |
-- Create a value of 'MitigationActionParams' 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:
--
-- 'addThingsToThingGroupParams', 'mitigationActionParams_addThingsToThingGroupParams' - Parameters to define a mitigation action that moves devices associated
-- with a certificate to one or more specified thing groups, typically for
-- quarantine.
--
-- 'enableIoTLoggingParams', 'mitigationActionParams_enableIoTLoggingParams' - Parameters to define a mitigation action that enables Amazon Web
-- Services IoT Core logging at a specified level of detail.
--
-- 'publishFindingToSnsParams', 'mitigationActionParams_publishFindingToSnsParams' - Parameters to define a mitigation action that publishes findings to
-- Amazon Simple Notification Service (Amazon SNS. You can implement your
-- own custom actions in response to the Amazon SNS messages.
--
-- 'replaceDefaultPolicyVersionParams', 'mitigationActionParams_replaceDefaultPolicyVersionParams' - Parameters to define a mitigation action that adds a blank policy to
-- restrict permissions.
--
-- 'updateCACertificateParams', 'mitigationActionParams_updateCACertificateParams' - Parameters to define a mitigation action that changes the state of the
-- CA certificate to inactive.
--
-- 'updateDeviceCertificateParams', 'mitigationActionParams_updateDeviceCertificateParams' - Parameters to define a mitigation action that changes the state of the
-- device certificate to inactive.
newMitigationActionParams ::
  MitigationActionParams
newMitigationActionParams :: MitigationActionParams
newMitigationActionParams =
  MitigationActionParams'
    { $sel:addThingsToThingGroupParams:MitigationActionParams' :: Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams =
        forall a. Maybe a
Prelude.Nothing,
      $sel:enableIoTLoggingParams:MitigationActionParams' :: Maybe EnableIoTLoggingParams
enableIoTLoggingParams = forall a. Maybe a
Prelude.Nothing,
      $sel:publishFindingToSnsParams:MitigationActionParams' :: Maybe PublishFindingToSnsParams
publishFindingToSnsParams = forall a. Maybe a
Prelude.Nothing,
      $sel:replaceDefaultPolicyVersionParams:MitigationActionParams' :: Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams = forall a. Maybe a
Prelude.Nothing,
      $sel:updateCACertificateParams:MitigationActionParams' :: Maybe UpdateCACertificateParams
updateCACertificateParams = forall a. Maybe a
Prelude.Nothing,
      $sel:updateDeviceCertificateParams:MitigationActionParams' :: Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams = forall a. Maybe a
Prelude.Nothing
    }

-- | Parameters to define a mitigation action that moves devices associated
-- with a certificate to one or more specified thing groups, typically for
-- quarantine.
mitigationActionParams_addThingsToThingGroupParams :: Lens.Lens' MitigationActionParams (Prelude.Maybe AddThingsToThingGroupParams)
mitigationActionParams_addThingsToThingGroupParams :: Lens' MitigationActionParams (Maybe AddThingsToThingGroupParams)
mitigationActionParams_addThingsToThingGroupParams = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MitigationActionParams' {Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams :: Maybe AddThingsToThingGroupParams
$sel:addThingsToThingGroupParams:MitigationActionParams' :: MitigationActionParams -> Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams} -> Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams) (\s :: MitigationActionParams
s@MitigationActionParams' {} Maybe AddThingsToThingGroupParams
a -> MitigationActionParams
s {$sel:addThingsToThingGroupParams:MitigationActionParams' :: Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams = Maybe AddThingsToThingGroupParams
a} :: MitigationActionParams)

-- | Parameters to define a mitigation action that enables Amazon Web
-- Services IoT Core logging at a specified level of detail.
mitigationActionParams_enableIoTLoggingParams :: Lens.Lens' MitigationActionParams (Prelude.Maybe EnableIoTLoggingParams)
mitigationActionParams_enableIoTLoggingParams :: Lens' MitigationActionParams (Maybe EnableIoTLoggingParams)
mitigationActionParams_enableIoTLoggingParams = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MitigationActionParams' {Maybe EnableIoTLoggingParams
enableIoTLoggingParams :: Maybe EnableIoTLoggingParams
$sel:enableIoTLoggingParams:MitigationActionParams' :: MitigationActionParams -> Maybe EnableIoTLoggingParams
enableIoTLoggingParams} -> Maybe EnableIoTLoggingParams
enableIoTLoggingParams) (\s :: MitigationActionParams
s@MitigationActionParams' {} Maybe EnableIoTLoggingParams
a -> MitigationActionParams
s {$sel:enableIoTLoggingParams:MitigationActionParams' :: Maybe EnableIoTLoggingParams
enableIoTLoggingParams = Maybe EnableIoTLoggingParams
a} :: MitigationActionParams)

-- | Parameters to define a mitigation action that publishes findings to
-- Amazon Simple Notification Service (Amazon SNS. You can implement your
-- own custom actions in response to the Amazon SNS messages.
mitigationActionParams_publishFindingToSnsParams :: Lens.Lens' MitigationActionParams (Prelude.Maybe PublishFindingToSnsParams)
mitigationActionParams_publishFindingToSnsParams :: Lens' MitigationActionParams (Maybe PublishFindingToSnsParams)
mitigationActionParams_publishFindingToSnsParams = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MitigationActionParams' {Maybe PublishFindingToSnsParams
publishFindingToSnsParams :: Maybe PublishFindingToSnsParams
$sel:publishFindingToSnsParams:MitigationActionParams' :: MitigationActionParams -> Maybe PublishFindingToSnsParams
publishFindingToSnsParams} -> Maybe PublishFindingToSnsParams
publishFindingToSnsParams) (\s :: MitigationActionParams
s@MitigationActionParams' {} Maybe PublishFindingToSnsParams
a -> MitigationActionParams
s {$sel:publishFindingToSnsParams:MitigationActionParams' :: Maybe PublishFindingToSnsParams
publishFindingToSnsParams = Maybe PublishFindingToSnsParams
a} :: MitigationActionParams)

-- | Parameters to define a mitigation action that adds a blank policy to
-- restrict permissions.
mitigationActionParams_replaceDefaultPolicyVersionParams :: Lens.Lens' MitigationActionParams (Prelude.Maybe ReplaceDefaultPolicyVersionParams)
mitigationActionParams_replaceDefaultPolicyVersionParams :: Lens'
  MitigationActionParams (Maybe ReplaceDefaultPolicyVersionParams)
mitigationActionParams_replaceDefaultPolicyVersionParams = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MitigationActionParams' {Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams :: Maybe ReplaceDefaultPolicyVersionParams
$sel:replaceDefaultPolicyVersionParams:MitigationActionParams' :: MitigationActionParams -> Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams} -> Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams) (\s :: MitigationActionParams
s@MitigationActionParams' {} Maybe ReplaceDefaultPolicyVersionParams
a -> MitigationActionParams
s {$sel:replaceDefaultPolicyVersionParams:MitigationActionParams' :: Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams = Maybe ReplaceDefaultPolicyVersionParams
a} :: MitigationActionParams)

-- | Parameters to define a mitigation action that changes the state of the
-- CA certificate to inactive.
mitigationActionParams_updateCACertificateParams :: Lens.Lens' MitigationActionParams (Prelude.Maybe UpdateCACertificateParams)
mitigationActionParams_updateCACertificateParams :: Lens' MitigationActionParams (Maybe UpdateCACertificateParams)
mitigationActionParams_updateCACertificateParams = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MitigationActionParams' {Maybe UpdateCACertificateParams
updateCACertificateParams :: Maybe UpdateCACertificateParams
$sel:updateCACertificateParams:MitigationActionParams' :: MitigationActionParams -> Maybe UpdateCACertificateParams
updateCACertificateParams} -> Maybe UpdateCACertificateParams
updateCACertificateParams) (\s :: MitigationActionParams
s@MitigationActionParams' {} Maybe UpdateCACertificateParams
a -> MitigationActionParams
s {$sel:updateCACertificateParams:MitigationActionParams' :: Maybe UpdateCACertificateParams
updateCACertificateParams = Maybe UpdateCACertificateParams
a} :: MitigationActionParams)

-- | Parameters to define a mitigation action that changes the state of the
-- device certificate to inactive.
mitigationActionParams_updateDeviceCertificateParams :: Lens.Lens' MitigationActionParams (Prelude.Maybe UpdateDeviceCertificateParams)
mitigationActionParams_updateDeviceCertificateParams :: Lens' MitigationActionParams (Maybe UpdateDeviceCertificateParams)
mitigationActionParams_updateDeviceCertificateParams = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MitigationActionParams' {Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams :: Maybe UpdateDeviceCertificateParams
$sel:updateDeviceCertificateParams:MitigationActionParams' :: MitigationActionParams -> Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams} -> Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams) (\s :: MitigationActionParams
s@MitigationActionParams' {} Maybe UpdateDeviceCertificateParams
a -> MitigationActionParams
s {$sel:updateDeviceCertificateParams:MitigationActionParams' :: Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams = Maybe UpdateDeviceCertificateParams
a} :: MitigationActionParams)

instance Data.FromJSON MitigationActionParams where
  parseJSON :: Value -> Parser MitigationActionParams
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"MitigationActionParams"
      ( \Object
x ->
          Maybe AddThingsToThingGroupParams
-> Maybe EnableIoTLoggingParams
-> Maybe PublishFindingToSnsParams
-> Maybe ReplaceDefaultPolicyVersionParams
-> Maybe UpdateCACertificateParams
-> Maybe UpdateDeviceCertificateParams
-> MitigationActionParams
MitigationActionParams'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"addThingsToThingGroupParams")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"enableIoTLoggingParams")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"publishFindingToSnsParams")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"replaceDefaultPolicyVersionParams")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"updateCACertificateParams")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"updateDeviceCertificateParams")
      )

instance Prelude.Hashable MitigationActionParams where
  hashWithSalt :: Int -> MitigationActionParams -> Int
hashWithSalt Int
_salt MitigationActionParams' {Maybe AddThingsToThingGroupParams
Maybe EnableIoTLoggingParams
Maybe PublishFindingToSnsParams
Maybe ReplaceDefaultPolicyVersionParams
Maybe UpdateCACertificateParams
Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams :: Maybe UpdateDeviceCertificateParams
updateCACertificateParams :: Maybe UpdateCACertificateParams
replaceDefaultPolicyVersionParams :: Maybe ReplaceDefaultPolicyVersionParams
publishFindingToSnsParams :: Maybe PublishFindingToSnsParams
enableIoTLoggingParams :: Maybe EnableIoTLoggingParams
addThingsToThingGroupParams :: Maybe AddThingsToThingGroupParams
$sel:updateDeviceCertificateParams:MitigationActionParams' :: MitigationActionParams -> Maybe UpdateDeviceCertificateParams
$sel:updateCACertificateParams:MitigationActionParams' :: MitigationActionParams -> Maybe UpdateCACertificateParams
$sel:replaceDefaultPolicyVersionParams:MitigationActionParams' :: MitigationActionParams -> Maybe ReplaceDefaultPolicyVersionParams
$sel:publishFindingToSnsParams:MitigationActionParams' :: MitigationActionParams -> Maybe PublishFindingToSnsParams
$sel:enableIoTLoggingParams:MitigationActionParams' :: MitigationActionParams -> Maybe EnableIoTLoggingParams
$sel:addThingsToThingGroupParams:MitigationActionParams' :: MitigationActionParams -> Maybe AddThingsToThingGroupParams
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EnableIoTLoggingParams
enableIoTLoggingParams
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PublishFindingToSnsParams
publishFindingToSnsParams
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UpdateCACertificateParams
updateCACertificateParams
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams

instance Prelude.NFData MitigationActionParams where
  rnf :: MitigationActionParams -> ()
rnf MitigationActionParams' {Maybe AddThingsToThingGroupParams
Maybe EnableIoTLoggingParams
Maybe PublishFindingToSnsParams
Maybe ReplaceDefaultPolicyVersionParams
Maybe UpdateCACertificateParams
Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams :: Maybe UpdateDeviceCertificateParams
updateCACertificateParams :: Maybe UpdateCACertificateParams
replaceDefaultPolicyVersionParams :: Maybe ReplaceDefaultPolicyVersionParams
publishFindingToSnsParams :: Maybe PublishFindingToSnsParams
enableIoTLoggingParams :: Maybe EnableIoTLoggingParams
addThingsToThingGroupParams :: Maybe AddThingsToThingGroupParams
$sel:updateDeviceCertificateParams:MitigationActionParams' :: MitigationActionParams -> Maybe UpdateDeviceCertificateParams
$sel:updateCACertificateParams:MitigationActionParams' :: MitigationActionParams -> Maybe UpdateCACertificateParams
$sel:replaceDefaultPolicyVersionParams:MitigationActionParams' :: MitigationActionParams -> Maybe ReplaceDefaultPolicyVersionParams
$sel:publishFindingToSnsParams:MitigationActionParams' :: MitigationActionParams -> Maybe PublishFindingToSnsParams
$sel:enableIoTLoggingParams:MitigationActionParams' :: MitigationActionParams -> Maybe EnableIoTLoggingParams
$sel:addThingsToThingGroupParams:MitigationActionParams' :: MitigationActionParams -> Maybe AddThingsToThingGroupParams
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EnableIoTLoggingParams
enableIoTLoggingParams
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PublishFindingToSnsParams
publishFindingToSnsParams
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UpdateCACertificateParams
updateCACertificateParams
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams

instance Data.ToJSON MitigationActionParams where
  toJSON :: MitigationActionParams -> Value
toJSON MitigationActionParams' {Maybe AddThingsToThingGroupParams
Maybe EnableIoTLoggingParams
Maybe PublishFindingToSnsParams
Maybe ReplaceDefaultPolicyVersionParams
Maybe UpdateCACertificateParams
Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams :: Maybe UpdateDeviceCertificateParams
updateCACertificateParams :: Maybe UpdateCACertificateParams
replaceDefaultPolicyVersionParams :: Maybe ReplaceDefaultPolicyVersionParams
publishFindingToSnsParams :: Maybe PublishFindingToSnsParams
enableIoTLoggingParams :: Maybe EnableIoTLoggingParams
addThingsToThingGroupParams :: Maybe AddThingsToThingGroupParams
$sel:updateDeviceCertificateParams:MitigationActionParams' :: MitigationActionParams -> Maybe UpdateDeviceCertificateParams
$sel:updateCACertificateParams:MitigationActionParams' :: MitigationActionParams -> Maybe UpdateCACertificateParams
$sel:replaceDefaultPolicyVersionParams:MitigationActionParams' :: MitigationActionParams -> Maybe ReplaceDefaultPolicyVersionParams
$sel:publishFindingToSnsParams:MitigationActionParams' :: MitigationActionParams -> Maybe PublishFindingToSnsParams
$sel:enableIoTLoggingParams:MitigationActionParams' :: MitigationActionParams -> Maybe EnableIoTLoggingParams
$sel:addThingsToThingGroupParams:MitigationActionParams' :: MitigationActionParams -> Maybe AddThingsToThingGroupParams
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"addThingsToThingGroupParams" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams,
            (Key
"enableIoTLoggingParams" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EnableIoTLoggingParams
enableIoTLoggingParams,
            (Key
"publishFindingToSnsParams" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PublishFindingToSnsParams
publishFindingToSnsParams,
            (Key
"replaceDefaultPolicyVersionParams" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams,
            (Key
"updateCACertificateParams" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateCACertificateParams
updateCACertificateParams,
            (Key
"updateDeviceCertificateParams" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateDeviceCertificateParams
updateDeviceCertificateParams
          ]
      )