{-# 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.AuditMitigationActionsTaskTarget where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AuditMitigationActionsTaskTarget = AuditMitigationActionsTaskTarget'
{
AuditMitigationActionsTaskTarget -> Maybe Text
auditTaskId :: Prelude.Maybe Prelude.Text,
AuditMitigationActionsTaskTarget -> Maybe (NonEmpty Text)
findingIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
AuditMitigationActionsTaskTarget
-> Maybe (HashMap Text (NonEmpty Text))
auditCheckToReasonCodeFilter :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.NonEmpty Prelude.Text))
}
deriving (AuditMitigationActionsTaskTarget
-> AuditMitigationActionsTaskTarget -> Bool
(AuditMitigationActionsTaskTarget
-> AuditMitigationActionsTaskTarget -> Bool)
-> (AuditMitigationActionsTaskTarget
-> AuditMitigationActionsTaskTarget -> Bool)
-> Eq AuditMitigationActionsTaskTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuditMitigationActionsTaskTarget
-> AuditMitigationActionsTaskTarget -> Bool
$c/= :: AuditMitigationActionsTaskTarget
-> AuditMitigationActionsTaskTarget -> Bool
== :: AuditMitigationActionsTaskTarget
-> AuditMitigationActionsTaskTarget -> Bool
$c== :: AuditMitigationActionsTaskTarget
-> AuditMitigationActionsTaskTarget -> Bool
Prelude.Eq, ReadPrec [AuditMitigationActionsTaskTarget]
ReadPrec AuditMitigationActionsTaskTarget
Int -> ReadS AuditMitigationActionsTaskTarget
ReadS [AuditMitigationActionsTaskTarget]
(Int -> ReadS AuditMitigationActionsTaskTarget)
-> ReadS [AuditMitigationActionsTaskTarget]
-> ReadPrec AuditMitigationActionsTaskTarget
-> ReadPrec [AuditMitigationActionsTaskTarget]
-> Read AuditMitigationActionsTaskTarget
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AuditMitigationActionsTaskTarget]
$creadListPrec :: ReadPrec [AuditMitigationActionsTaskTarget]
readPrec :: ReadPrec AuditMitigationActionsTaskTarget
$creadPrec :: ReadPrec AuditMitigationActionsTaskTarget
readList :: ReadS [AuditMitigationActionsTaskTarget]
$creadList :: ReadS [AuditMitigationActionsTaskTarget]
readsPrec :: Int -> ReadS AuditMitigationActionsTaskTarget
$creadsPrec :: Int -> ReadS AuditMitigationActionsTaskTarget
Prelude.Read, Int -> AuditMitigationActionsTaskTarget -> ShowS
[AuditMitigationActionsTaskTarget] -> ShowS
AuditMitigationActionsTaskTarget -> String
(Int -> AuditMitigationActionsTaskTarget -> ShowS)
-> (AuditMitigationActionsTaskTarget -> String)
-> ([AuditMitigationActionsTaskTarget] -> ShowS)
-> Show AuditMitigationActionsTaskTarget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuditMitigationActionsTaskTarget] -> ShowS
$cshowList :: [AuditMitigationActionsTaskTarget] -> ShowS
show :: AuditMitigationActionsTaskTarget -> String
$cshow :: AuditMitigationActionsTaskTarget -> String
showsPrec :: Int -> AuditMitigationActionsTaskTarget -> ShowS
$cshowsPrec :: Int -> AuditMitigationActionsTaskTarget -> ShowS
Prelude.Show, (forall x.
AuditMitigationActionsTaskTarget
-> Rep AuditMitigationActionsTaskTarget x)
-> (forall x.
Rep AuditMitigationActionsTaskTarget x
-> AuditMitigationActionsTaskTarget)
-> Generic AuditMitigationActionsTaskTarget
forall x.
Rep AuditMitigationActionsTaskTarget x
-> AuditMitigationActionsTaskTarget
forall x.
AuditMitigationActionsTaskTarget
-> Rep AuditMitigationActionsTaskTarget x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AuditMitigationActionsTaskTarget x
-> AuditMitigationActionsTaskTarget
$cfrom :: forall x.
AuditMitigationActionsTaskTarget
-> Rep AuditMitigationActionsTaskTarget x
Prelude.Generic)
newAuditMitigationActionsTaskTarget ::
AuditMitigationActionsTaskTarget
newAuditMitigationActionsTaskTarget :: AuditMitigationActionsTaskTarget
newAuditMitigationActionsTaskTarget =
AuditMitigationActionsTaskTarget' :: Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe (HashMap Text (NonEmpty Text))
-> AuditMitigationActionsTaskTarget
AuditMitigationActionsTaskTarget'
{ $sel:auditTaskId:AuditMitigationActionsTaskTarget' :: Maybe Text
auditTaskId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:findingIds:AuditMitigationActionsTaskTarget' :: Maybe (NonEmpty Text)
findingIds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:auditCheckToReasonCodeFilter:AuditMitigationActionsTaskTarget' :: Maybe (HashMap Text (NonEmpty Text))
auditCheckToReasonCodeFilter =
Maybe (HashMap Text (NonEmpty Text))
forall a. Maybe a
Prelude.Nothing
}
auditMitigationActionsTaskTarget_auditTaskId :: Lens.Lens' AuditMitigationActionsTaskTarget (Prelude.Maybe Prelude.Text)
auditMitigationActionsTaskTarget_auditTaskId :: (Maybe Text -> f (Maybe Text))
-> AuditMitigationActionsTaskTarget
-> f AuditMitigationActionsTaskTarget
auditMitigationActionsTaskTarget_auditTaskId = (AuditMitigationActionsTaskTarget -> Maybe Text)
-> (AuditMitigationActionsTaskTarget
-> Maybe Text -> AuditMitigationActionsTaskTarget)
-> Lens
AuditMitigationActionsTaskTarget
AuditMitigationActionsTaskTarget
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionsTaskTarget' {Maybe Text
auditTaskId :: Maybe Text
$sel:auditTaskId:AuditMitigationActionsTaskTarget' :: AuditMitigationActionsTaskTarget -> Maybe Text
auditTaskId} -> Maybe Text
auditTaskId) (\s :: AuditMitigationActionsTaskTarget
s@AuditMitigationActionsTaskTarget' {} Maybe Text
a -> AuditMitigationActionsTaskTarget
s {$sel:auditTaskId:AuditMitigationActionsTaskTarget' :: Maybe Text
auditTaskId = Maybe Text
a} :: AuditMitigationActionsTaskTarget)
auditMitigationActionsTaskTarget_findingIds :: Lens.Lens' AuditMitigationActionsTaskTarget (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
auditMitigationActionsTaskTarget_findingIds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AuditMitigationActionsTaskTarget
-> f AuditMitigationActionsTaskTarget
auditMitigationActionsTaskTarget_findingIds = (AuditMitigationActionsTaskTarget -> Maybe (NonEmpty Text))
-> (AuditMitigationActionsTaskTarget
-> Maybe (NonEmpty Text) -> AuditMitigationActionsTaskTarget)
-> Lens
AuditMitigationActionsTaskTarget
AuditMitigationActionsTaskTarget
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionsTaskTarget' {Maybe (NonEmpty Text)
findingIds :: Maybe (NonEmpty Text)
$sel:findingIds:AuditMitigationActionsTaskTarget' :: AuditMitigationActionsTaskTarget -> Maybe (NonEmpty Text)
findingIds} -> Maybe (NonEmpty Text)
findingIds) (\s :: AuditMitigationActionsTaskTarget
s@AuditMitigationActionsTaskTarget' {} Maybe (NonEmpty Text)
a -> AuditMitigationActionsTaskTarget
s {$sel:findingIds:AuditMitigationActionsTaskTarget' :: Maybe (NonEmpty Text)
findingIds = Maybe (NonEmpty Text)
a} :: AuditMitigationActionsTaskTarget) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AuditMitigationActionsTaskTarget
-> f AuditMitigationActionsTaskTarget)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AuditMitigationActionsTaskTarget
-> f AuditMitigationActionsTaskTarget
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
auditMitigationActionsTaskTarget_auditCheckToReasonCodeFilter :: Lens.Lens' AuditMitigationActionsTaskTarget (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.NonEmpty Prelude.Text)))
auditMitigationActionsTaskTarget_auditCheckToReasonCodeFilter :: (Maybe (HashMap Text (NonEmpty Text))
-> f (Maybe (HashMap Text (NonEmpty Text))))
-> AuditMitigationActionsTaskTarget
-> f AuditMitigationActionsTaskTarget
auditMitigationActionsTaskTarget_auditCheckToReasonCodeFilter = (AuditMitigationActionsTaskTarget
-> Maybe (HashMap Text (NonEmpty Text)))
-> (AuditMitigationActionsTaskTarget
-> Maybe (HashMap Text (NonEmpty Text))
-> AuditMitigationActionsTaskTarget)
-> Lens
AuditMitigationActionsTaskTarget
AuditMitigationActionsTaskTarget
(Maybe (HashMap Text (NonEmpty Text)))
(Maybe (HashMap Text (NonEmpty Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditMitigationActionsTaskTarget' {Maybe (HashMap Text (NonEmpty Text))
auditCheckToReasonCodeFilter :: Maybe (HashMap Text (NonEmpty Text))
$sel:auditCheckToReasonCodeFilter:AuditMitigationActionsTaskTarget' :: AuditMitigationActionsTaskTarget
-> Maybe (HashMap Text (NonEmpty Text))
auditCheckToReasonCodeFilter} -> Maybe (HashMap Text (NonEmpty Text))
auditCheckToReasonCodeFilter) (\s :: AuditMitigationActionsTaskTarget
s@AuditMitigationActionsTaskTarget' {} Maybe (HashMap Text (NonEmpty Text))
a -> AuditMitigationActionsTaskTarget
s {$sel:auditCheckToReasonCodeFilter:AuditMitigationActionsTaskTarget' :: Maybe (HashMap Text (NonEmpty Text))
auditCheckToReasonCodeFilter = Maybe (HashMap Text (NonEmpty Text))
a} :: AuditMitigationActionsTaskTarget) ((Maybe (HashMap Text (NonEmpty Text))
-> f (Maybe (HashMap Text (NonEmpty Text))))
-> AuditMitigationActionsTaskTarget
-> f AuditMitigationActionsTaskTarget)
-> ((Maybe (HashMap Text (NonEmpty Text))
-> f (Maybe (HashMap Text (NonEmpty Text))))
-> Maybe (HashMap Text (NonEmpty Text))
-> f (Maybe (HashMap Text (NonEmpty Text))))
-> (Maybe (HashMap Text (NonEmpty Text))
-> f (Maybe (HashMap Text (NonEmpty Text))))
-> AuditMitigationActionsTaskTarget
-> f AuditMitigationActionsTaskTarget
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text (NonEmpty Text))
(HashMap Text (NonEmpty Text))
(HashMap Text (NonEmpty Text))
(HashMap Text (NonEmpty Text))
-> Iso
(Maybe (HashMap Text (NonEmpty Text)))
(Maybe (HashMap Text (NonEmpty Text)))
(Maybe (HashMap Text (NonEmpty Text)))
(Maybe (HashMap Text (NonEmpty Text)))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text (NonEmpty Text))
(HashMap Text (NonEmpty Text))
(HashMap Text (NonEmpty Text))
(HashMap Text (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
AuditMitigationActionsTaskTarget
where
parseJSON :: Value -> Parser AuditMitigationActionsTaskTarget
parseJSON =
String
-> (Object -> Parser AuditMitigationActionsTaskTarget)
-> Value
-> Parser AuditMitigationActionsTaskTarget
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AuditMitigationActionsTaskTarget"
( \Object
x ->
Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe (HashMap Text (NonEmpty Text))
-> AuditMitigationActionsTaskTarget
AuditMitigationActionsTaskTarget'
(Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe (HashMap Text (NonEmpty Text))
-> AuditMitigationActionsTaskTarget)
-> Parser (Maybe Text)
-> Parser
(Maybe (NonEmpty Text)
-> Maybe (HashMap Text (NonEmpty Text))
-> AuditMitigationActionsTaskTarget)
forall (f :: * -> *) a b. Functor 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
"auditTaskId")
Parser
(Maybe (NonEmpty Text)
-> Maybe (HashMap Text (NonEmpty Text))
-> AuditMitigationActionsTaskTarget)
-> Parser (Maybe (NonEmpty Text))
-> Parser
(Maybe (HashMap Text (NonEmpty Text))
-> AuditMitigationActionsTaskTarget)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"findingIds")
Parser
(Maybe (HashMap Text (NonEmpty Text))
-> AuditMitigationActionsTaskTarget)
-> Parser (Maybe (HashMap Text (NonEmpty Text)))
-> Parser AuditMitigationActionsTaskTarget
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe (HashMap Text (NonEmpty Text))))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"auditCheckToReasonCodeFilter"
Parser (Maybe (Maybe (HashMap Text (NonEmpty Text))))
-> Maybe (HashMap Text (NonEmpty Text))
-> Parser (Maybe (HashMap Text (NonEmpty Text)))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text (NonEmpty Text))
forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
AuditMitigationActionsTaskTarget
instance
Prelude.NFData
AuditMitigationActionsTaskTarget
instance Core.ToJSON AuditMitigationActionsTaskTarget where
toJSON :: AuditMitigationActionsTaskTarget -> Value
toJSON AuditMitigationActionsTaskTarget' {Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text (NonEmpty Text))
auditCheckToReasonCodeFilter :: Maybe (HashMap Text (NonEmpty Text))
findingIds :: Maybe (NonEmpty Text)
auditTaskId :: Maybe Text
$sel:auditCheckToReasonCodeFilter:AuditMitigationActionsTaskTarget' :: AuditMitigationActionsTaskTarget
-> Maybe (HashMap Text (NonEmpty Text))
$sel:findingIds:AuditMitigationActionsTaskTarget' :: AuditMitigationActionsTaskTarget -> Maybe (NonEmpty Text)
$sel:auditTaskId:AuditMitigationActionsTaskTarget' :: AuditMitigationActionsTaskTarget -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"auditTaskId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
auditTaskId,
(Text
"findingIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
findingIds,
(Text
"auditCheckToReasonCodeFilter" Text -> HashMap Text (NonEmpty Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text (NonEmpty Text) -> Pair)
-> Maybe (HashMap Text (NonEmpty Text)) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text (NonEmpty Text))
auditCheckToReasonCodeFilter
]
)