{-# 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.WAF.Types.SqlInjectionMatchSetUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WAF.Types.ChangeAction
import Amazonka.WAF.Types.SqlInjectionMatchTuple
data SqlInjectionMatchSetUpdate = SqlInjectionMatchSetUpdate'
{
SqlInjectionMatchSetUpdate -> ChangeAction
action :: ChangeAction,
SqlInjectionMatchSetUpdate -> SqlInjectionMatchTuple
sqlInjectionMatchTuple :: SqlInjectionMatchTuple
}
deriving (SqlInjectionMatchSetUpdate -> SqlInjectionMatchSetUpdate -> Bool
(SqlInjectionMatchSetUpdate -> SqlInjectionMatchSetUpdate -> Bool)
-> (SqlInjectionMatchSetUpdate
-> SqlInjectionMatchSetUpdate -> Bool)
-> Eq SqlInjectionMatchSetUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SqlInjectionMatchSetUpdate -> SqlInjectionMatchSetUpdate -> Bool
$c/= :: SqlInjectionMatchSetUpdate -> SqlInjectionMatchSetUpdate -> Bool
== :: SqlInjectionMatchSetUpdate -> SqlInjectionMatchSetUpdate -> Bool
$c== :: SqlInjectionMatchSetUpdate -> SqlInjectionMatchSetUpdate -> Bool
Prelude.Eq, ReadPrec [SqlInjectionMatchSetUpdate]
ReadPrec SqlInjectionMatchSetUpdate
Int -> ReadS SqlInjectionMatchSetUpdate
ReadS [SqlInjectionMatchSetUpdate]
(Int -> ReadS SqlInjectionMatchSetUpdate)
-> ReadS [SqlInjectionMatchSetUpdate]
-> ReadPrec SqlInjectionMatchSetUpdate
-> ReadPrec [SqlInjectionMatchSetUpdate]
-> Read SqlInjectionMatchSetUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SqlInjectionMatchSetUpdate]
$creadListPrec :: ReadPrec [SqlInjectionMatchSetUpdate]
readPrec :: ReadPrec SqlInjectionMatchSetUpdate
$creadPrec :: ReadPrec SqlInjectionMatchSetUpdate
readList :: ReadS [SqlInjectionMatchSetUpdate]
$creadList :: ReadS [SqlInjectionMatchSetUpdate]
readsPrec :: Int -> ReadS SqlInjectionMatchSetUpdate
$creadsPrec :: Int -> ReadS SqlInjectionMatchSetUpdate
Prelude.Read, Int -> SqlInjectionMatchSetUpdate -> ShowS
[SqlInjectionMatchSetUpdate] -> ShowS
SqlInjectionMatchSetUpdate -> String
(Int -> SqlInjectionMatchSetUpdate -> ShowS)
-> (SqlInjectionMatchSetUpdate -> String)
-> ([SqlInjectionMatchSetUpdate] -> ShowS)
-> Show SqlInjectionMatchSetUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SqlInjectionMatchSetUpdate] -> ShowS
$cshowList :: [SqlInjectionMatchSetUpdate] -> ShowS
show :: SqlInjectionMatchSetUpdate -> String
$cshow :: SqlInjectionMatchSetUpdate -> String
showsPrec :: Int -> SqlInjectionMatchSetUpdate -> ShowS
$cshowsPrec :: Int -> SqlInjectionMatchSetUpdate -> ShowS
Prelude.Show, (forall x.
SqlInjectionMatchSetUpdate -> Rep SqlInjectionMatchSetUpdate x)
-> (forall x.
Rep SqlInjectionMatchSetUpdate x -> SqlInjectionMatchSetUpdate)
-> Generic SqlInjectionMatchSetUpdate
forall x.
Rep SqlInjectionMatchSetUpdate x -> SqlInjectionMatchSetUpdate
forall x.
SqlInjectionMatchSetUpdate -> Rep SqlInjectionMatchSetUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SqlInjectionMatchSetUpdate x -> SqlInjectionMatchSetUpdate
$cfrom :: forall x.
SqlInjectionMatchSetUpdate -> Rep SqlInjectionMatchSetUpdate x
Prelude.Generic)
newSqlInjectionMatchSetUpdate ::
ChangeAction ->
SqlInjectionMatchTuple ->
SqlInjectionMatchSetUpdate
newSqlInjectionMatchSetUpdate :: ChangeAction
-> SqlInjectionMatchTuple -> SqlInjectionMatchSetUpdate
newSqlInjectionMatchSetUpdate
ChangeAction
pAction_
SqlInjectionMatchTuple
pSqlInjectionMatchTuple_ =
SqlInjectionMatchSetUpdate' :: ChangeAction
-> SqlInjectionMatchTuple -> SqlInjectionMatchSetUpdate
SqlInjectionMatchSetUpdate'
{ $sel:action:SqlInjectionMatchSetUpdate' :: ChangeAction
action = ChangeAction
pAction_,
$sel:sqlInjectionMatchTuple:SqlInjectionMatchSetUpdate' :: SqlInjectionMatchTuple
sqlInjectionMatchTuple =
SqlInjectionMatchTuple
pSqlInjectionMatchTuple_
}
sqlInjectionMatchSetUpdate_action :: Lens.Lens' SqlInjectionMatchSetUpdate ChangeAction
sqlInjectionMatchSetUpdate_action :: (ChangeAction -> f ChangeAction)
-> SqlInjectionMatchSetUpdate -> f SqlInjectionMatchSetUpdate
sqlInjectionMatchSetUpdate_action = (SqlInjectionMatchSetUpdate -> ChangeAction)
-> (SqlInjectionMatchSetUpdate
-> ChangeAction -> SqlInjectionMatchSetUpdate)
-> Lens
SqlInjectionMatchSetUpdate
SqlInjectionMatchSetUpdate
ChangeAction
ChangeAction
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlInjectionMatchSetUpdate' {ChangeAction
action :: ChangeAction
$sel:action:SqlInjectionMatchSetUpdate' :: SqlInjectionMatchSetUpdate -> ChangeAction
action} -> ChangeAction
action) (\s :: SqlInjectionMatchSetUpdate
s@SqlInjectionMatchSetUpdate' {} ChangeAction
a -> SqlInjectionMatchSetUpdate
s {$sel:action:SqlInjectionMatchSetUpdate' :: ChangeAction
action = ChangeAction
a} :: SqlInjectionMatchSetUpdate)
sqlInjectionMatchSetUpdate_sqlInjectionMatchTuple :: Lens.Lens' SqlInjectionMatchSetUpdate SqlInjectionMatchTuple
sqlInjectionMatchSetUpdate_sqlInjectionMatchTuple :: (SqlInjectionMatchTuple -> f SqlInjectionMatchTuple)
-> SqlInjectionMatchSetUpdate -> f SqlInjectionMatchSetUpdate
sqlInjectionMatchSetUpdate_sqlInjectionMatchTuple = (SqlInjectionMatchSetUpdate -> SqlInjectionMatchTuple)
-> (SqlInjectionMatchSetUpdate
-> SqlInjectionMatchTuple -> SqlInjectionMatchSetUpdate)
-> Lens
SqlInjectionMatchSetUpdate
SqlInjectionMatchSetUpdate
SqlInjectionMatchTuple
SqlInjectionMatchTuple
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlInjectionMatchSetUpdate' {SqlInjectionMatchTuple
sqlInjectionMatchTuple :: SqlInjectionMatchTuple
$sel:sqlInjectionMatchTuple:SqlInjectionMatchSetUpdate' :: SqlInjectionMatchSetUpdate -> SqlInjectionMatchTuple
sqlInjectionMatchTuple} -> SqlInjectionMatchTuple
sqlInjectionMatchTuple) (\s :: SqlInjectionMatchSetUpdate
s@SqlInjectionMatchSetUpdate' {} SqlInjectionMatchTuple
a -> SqlInjectionMatchSetUpdate
s {$sel:sqlInjectionMatchTuple:SqlInjectionMatchSetUpdate' :: SqlInjectionMatchTuple
sqlInjectionMatchTuple = SqlInjectionMatchTuple
a} :: SqlInjectionMatchSetUpdate)
instance Prelude.Hashable SqlInjectionMatchSetUpdate
instance Prelude.NFData SqlInjectionMatchSetUpdate
instance Core.ToJSON SqlInjectionMatchSetUpdate where
toJSON :: SqlInjectionMatchSetUpdate -> Value
toJSON SqlInjectionMatchSetUpdate' {ChangeAction
SqlInjectionMatchTuple
sqlInjectionMatchTuple :: SqlInjectionMatchTuple
action :: ChangeAction
$sel:sqlInjectionMatchTuple:SqlInjectionMatchSetUpdate' :: SqlInjectionMatchSetUpdate -> SqlInjectionMatchTuple
$sel:action:SqlInjectionMatchSetUpdate' :: SqlInjectionMatchSetUpdate -> ChangeAction
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Action" Text -> ChangeAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ChangeAction
action),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"SqlInjectionMatchTuple"
Text -> SqlInjectionMatchTuple -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= SqlInjectionMatchTuple
sqlInjectionMatchTuple
)
]
)