{-# 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 #-}
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
data MitigationActionParams = MitigationActionParams'
{
MitigationActionParams -> Maybe AddThingsToThingGroupParams
addThingsToThingGroupParams :: Prelude.Maybe AddThingsToThingGroupParams,
MitigationActionParams -> Maybe EnableIoTLoggingParams
enableIoTLoggingParams :: Prelude.Maybe EnableIoTLoggingParams,
MitigationActionParams -> Maybe PublishFindingToSnsParams
publishFindingToSnsParams :: Prelude.Maybe PublishFindingToSnsParams,
MitigationActionParams -> Maybe ReplaceDefaultPolicyVersionParams
replaceDefaultPolicyVersionParams :: Prelude.Maybe ReplaceDefaultPolicyVersionParams,
MitigationActionParams -> Maybe UpdateCACertificateParams
updateCACertificateParams :: Prelude.Maybe UpdateCACertificateParams,
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)
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
}
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)
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)
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)
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)
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)
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
]
)