{-# 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.SqlInjectionMatchSet where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WAF.Types.SqlInjectionMatchTuple
data SqlInjectionMatchSet = SqlInjectionMatchSet'
{
SqlInjectionMatchSet -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
SqlInjectionMatchSet -> Text
sqlInjectionMatchSetId :: Prelude.Text,
SqlInjectionMatchSet -> [SqlInjectionMatchTuple]
sqlInjectionMatchTuples :: [SqlInjectionMatchTuple]
}
deriving (SqlInjectionMatchSet -> SqlInjectionMatchSet -> Bool
(SqlInjectionMatchSet -> SqlInjectionMatchSet -> Bool)
-> (SqlInjectionMatchSet -> SqlInjectionMatchSet -> Bool)
-> Eq SqlInjectionMatchSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SqlInjectionMatchSet -> SqlInjectionMatchSet -> Bool
$c/= :: SqlInjectionMatchSet -> SqlInjectionMatchSet -> Bool
== :: SqlInjectionMatchSet -> SqlInjectionMatchSet -> Bool
$c== :: SqlInjectionMatchSet -> SqlInjectionMatchSet -> Bool
Prelude.Eq, ReadPrec [SqlInjectionMatchSet]
ReadPrec SqlInjectionMatchSet
Int -> ReadS SqlInjectionMatchSet
ReadS [SqlInjectionMatchSet]
(Int -> ReadS SqlInjectionMatchSet)
-> ReadS [SqlInjectionMatchSet]
-> ReadPrec SqlInjectionMatchSet
-> ReadPrec [SqlInjectionMatchSet]
-> Read SqlInjectionMatchSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SqlInjectionMatchSet]
$creadListPrec :: ReadPrec [SqlInjectionMatchSet]
readPrec :: ReadPrec SqlInjectionMatchSet
$creadPrec :: ReadPrec SqlInjectionMatchSet
readList :: ReadS [SqlInjectionMatchSet]
$creadList :: ReadS [SqlInjectionMatchSet]
readsPrec :: Int -> ReadS SqlInjectionMatchSet
$creadsPrec :: Int -> ReadS SqlInjectionMatchSet
Prelude.Read, Int -> SqlInjectionMatchSet -> ShowS
[SqlInjectionMatchSet] -> ShowS
SqlInjectionMatchSet -> String
(Int -> SqlInjectionMatchSet -> ShowS)
-> (SqlInjectionMatchSet -> String)
-> ([SqlInjectionMatchSet] -> ShowS)
-> Show SqlInjectionMatchSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SqlInjectionMatchSet] -> ShowS
$cshowList :: [SqlInjectionMatchSet] -> ShowS
show :: SqlInjectionMatchSet -> String
$cshow :: SqlInjectionMatchSet -> String
showsPrec :: Int -> SqlInjectionMatchSet -> ShowS
$cshowsPrec :: Int -> SqlInjectionMatchSet -> ShowS
Prelude.Show, (forall x. SqlInjectionMatchSet -> Rep SqlInjectionMatchSet x)
-> (forall x. Rep SqlInjectionMatchSet x -> SqlInjectionMatchSet)
-> Generic SqlInjectionMatchSet
forall x. Rep SqlInjectionMatchSet x -> SqlInjectionMatchSet
forall x. SqlInjectionMatchSet -> Rep SqlInjectionMatchSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SqlInjectionMatchSet x -> SqlInjectionMatchSet
$cfrom :: forall x. SqlInjectionMatchSet -> Rep SqlInjectionMatchSet x
Prelude.Generic)
newSqlInjectionMatchSet ::
Prelude.Text ->
SqlInjectionMatchSet
newSqlInjectionMatchSet :: Text -> SqlInjectionMatchSet
newSqlInjectionMatchSet Text
pSqlInjectionMatchSetId_ =
SqlInjectionMatchSet' :: Maybe Text
-> Text -> [SqlInjectionMatchTuple] -> SqlInjectionMatchSet
SqlInjectionMatchSet'
{ $sel:name:SqlInjectionMatchSet' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sqlInjectionMatchSetId:SqlInjectionMatchSet' :: Text
sqlInjectionMatchSetId = Text
pSqlInjectionMatchSetId_,
$sel:sqlInjectionMatchTuples:SqlInjectionMatchSet' :: [SqlInjectionMatchTuple]
sqlInjectionMatchTuples = [SqlInjectionMatchTuple]
forall a. Monoid a => a
Prelude.mempty
}
sqlInjectionMatchSet_name :: Lens.Lens' SqlInjectionMatchSet (Prelude.Maybe Prelude.Text)
sqlInjectionMatchSet_name :: (Maybe Text -> f (Maybe Text))
-> SqlInjectionMatchSet -> f SqlInjectionMatchSet
sqlInjectionMatchSet_name = (SqlInjectionMatchSet -> Maybe Text)
-> (SqlInjectionMatchSet -> Maybe Text -> SqlInjectionMatchSet)
-> Lens
SqlInjectionMatchSet SqlInjectionMatchSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlInjectionMatchSet' {Maybe Text
name :: Maybe Text
$sel:name:SqlInjectionMatchSet' :: SqlInjectionMatchSet -> Maybe Text
name} -> Maybe Text
name) (\s :: SqlInjectionMatchSet
s@SqlInjectionMatchSet' {} Maybe Text
a -> SqlInjectionMatchSet
s {$sel:name:SqlInjectionMatchSet' :: Maybe Text
name = Maybe Text
a} :: SqlInjectionMatchSet)
sqlInjectionMatchSet_sqlInjectionMatchSetId :: Lens.Lens' SqlInjectionMatchSet Prelude.Text
sqlInjectionMatchSet_sqlInjectionMatchSetId :: (Text -> f Text) -> SqlInjectionMatchSet -> f SqlInjectionMatchSet
sqlInjectionMatchSet_sqlInjectionMatchSetId = (SqlInjectionMatchSet -> Text)
-> (SqlInjectionMatchSet -> Text -> SqlInjectionMatchSet)
-> Lens SqlInjectionMatchSet SqlInjectionMatchSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlInjectionMatchSet' {Text
sqlInjectionMatchSetId :: Text
$sel:sqlInjectionMatchSetId:SqlInjectionMatchSet' :: SqlInjectionMatchSet -> Text
sqlInjectionMatchSetId} -> Text
sqlInjectionMatchSetId) (\s :: SqlInjectionMatchSet
s@SqlInjectionMatchSet' {} Text
a -> SqlInjectionMatchSet
s {$sel:sqlInjectionMatchSetId:SqlInjectionMatchSet' :: Text
sqlInjectionMatchSetId = Text
a} :: SqlInjectionMatchSet)
sqlInjectionMatchSet_sqlInjectionMatchTuples :: Lens.Lens' SqlInjectionMatchSet [SqlInjectionMatchTuple]
sqlInjectionMatchSet_sqlInjectionMatchTuples :: ([SqlInjectionMatchTuple] -> f [SqlInjectionMatchTuple])
-> SqlInjectionMatchSet -> f SqlInjectionMatchSet
sqlInjectionMatchSet_sqlInjectionMatchTuples = (SqlInjectionMatchSet -> [SqlInjectionMatchTuple])
-> (SqlInjectionMatchSet
-> [SqlInjectionMatchTuple] -> SqlInjectionMatchSet)
-> Lens
SqlInjectionMatchSet
SqlInjectionMatchSet
[SqlInjectionMatchTuple]
[SqlInjectionMatchTuple]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlInjectionMatchSet' {[SqlInjectionMatchTuple]
sqlInjectionMatchTuples :: [SqlInjectionMatchTuple]
$sel:sqlInjectionMatchTuples:SqlInjectionMatchSet' :: SqlInjectionMatchSet -> [SqlInjectionMatchTuple]
sqlInjectionMatchTuples} -> [SqlInjectionMatchTuple]
sqlInjectionMatchTuples) (\s :: SqlInjectionMatchSet
s@SqlInjectionMatchSet' {} [SqlInjectionMatchTuple]
a -> SqlInjectionMatchSet
s {$sel:sqlInjectionMatchTuples:SqlInjectionMatchSet' :: [SqlInjectionMatchTuple]
sqlInjectionMatchTuples = [SqlInjectionMatchTuple]
a} :: SqlInjectionMatchSet) (([SqlInjectionMatchTuple] -> f [SqlInjectionMatchTuple])
-> SqlInjectionMatchSet -> f SqlInjectionMatchSet)
-> (([SqlInjectionMatchTuple] -> f [SqlInjectionMatchTuple])
-> [SqlInjectionMatchTuple] -> f [SqlInjectionMatchTuple])
-> ([SqlInjectionMatchTuple] -> f [SqlInjectionMatchTuple])
-> SqlInjectionMatchSet
-> f SqlInjectionMatchSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SqlInjectionMatchTuple] -> f [SqlInjectionMatchTuple])
-> [SqlInjectionMatchTuple] -> f [SqlInjectionMatchTuple]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON SqlInjectionMatchSet where
parseJSON :: Value -> Parser SqlInjectionMatchSet
parseJSON =
String
-> (Object -> Parser SqlInjectionMatchSet)
-> Value
-> Parser SqlInjectionMatchSet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SqlInjectionMatchSet"
( \Object
x ->
Maybe Text
-> Text -> [SqlInjectionMatchTuple] -> SqlInjectionMatchSet
SqlInjectionMatchSet'
(Maybe Text
-> Text -> [SqlInjectionMatchTuple] -> SqlInjectionMatchSet)
-> Parser (Maybe Text)
-> Parser
(Text -> [SqlInjectionMatchTuple] -> SqlInjectionMatchSet)
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
"Name")
Parser (Text -> [SqlInjectionMatchTuple] -> SqlInjectionMatchSet)
-> Parser Text
-> Parser ([SqlInjectionMatchTuple] -> SqlInjectionMatchSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SqlInjectionMatchSetId")
Parser ([SqlInjectionMatchTuple] -> SqlInjectionMatchSet)
-> Parser [SqlInjectionMatchTuple] -> Parser SqlInjectionMatchSet
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe [SqlInjectionMatchTuple])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SqlInjectionMatchTuples"
Parser (Maybe [SqlInjectionMatchTuple])
-> [SqlInjectionMatchTuple] -> Parser [SqlInjectionMatchTuple]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [SqlInjectionMatchTuple]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable SqlInjectionMatchSet
instance Prelude.NFData SqlInjectionMatchSet