{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:name:SqlInjectionMatchSet' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:sqlInjectionMatchSetId:SqlInjectionMatchSet' :: Text
sqlInjectionMatchSetId = Text
pSqlInjectionMatchSetId_,
$sel:sqlInjectionMatchTuples:SqlInjectionMatchSet' :: [SqlInjectionMatchTuple]
sqlInjectionMatchTuples = forall a. Monoid a => a
Prelude.mempty
}
sqlInjectionMatchSet_name :: Lens.Lens' SqlInjectionMatchSet (Prelude.Maybe Prelude.Text)
sqlInjectionMatchSet_name :: Lens' SqlInjectionMatchSet (Maybe Text)
sqlInjectionMatchSet_name = 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 :: Lens' SqlInjectionMatchSet Text
sqlInjectionMatchSet_sqlInjectionMatchSetId = 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 :: Lens' SqlInjectionMatchSet [SqlInjectionMatchTuple]
sqlInjectionMatchSet_sqlInjectionMatchTuples = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON SqlInjectionMatchSet where
parseJSON :: Value -> Parser SqlInjectionMatchSet
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SqlInjectionMatchSet"
( \Object
x ->
Maybe Text
-> Text -> [SqlInjectionMatchTuple] -> SqlInjectionMatchSet
SqlInjectionMatchSet'
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
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SqlInjectionMatchSetId")
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
"SqlInjectionMatchTuples"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable SqlInjectionMatchSet where
hashWithSalt :: Int -> SqlInjectionMatchSet -> Int
hashWithSalt Int
_salt SqlInjectionMatchSet' {[SqlInjectionMatchTuple]
Maybe Text
Text
sqlInjectionMatchTuples :: [SqlInjectionMatchTuple]
sqlInjectionMatchSetId :: Text
name :: Maybe Text
$sel:sqlInjectionMatchTuples:SqlInjectionMatchSet' :: SqlInjectionMatchSet -> [SqlInjectionMatchTuple]
$sel:sqlInjectionMatchSetId:SqlInjectionMatchSet' :: SqlInjectionMatchSet -> Text
$sel:name:SqlInjectionMatchSet' :: SqlInjectionMatchSet -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sqlInjectionMatchSetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [SqlInjectionMatchTuple]
sqlInjectionMatchTuples
instance Prelude.NFData SqlInjectionMatchSet where
rnf :: SqlInjectionMatchSet -> ()
rnf SqlInjectionMatchSet' {[SqlInjectionMatchTuple]
Maybe Text
Text
sqlInjectionMatchTuples :: [SqlInjectionMatchTuple]
sqlInjectionMatchSetId :: Text
name :: Maybe Text
$sel:sqlInjectionMatchTuples:SqlInjectionMatchSet' :: SqlInjectionMatchSet -> [SqlInjectionMatchTuple]
$sel:sqlInjectionMatchSetId:SqlInjectionMatchSet' :: SqlInjectionMatchSet -> Text
$sel:name:SqlInjectionMatchSet' :: SqlInjectionMatchSet -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sqlInjectionMatchSetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [SqlInjectionMatchTuple]
sqlInjectionMatchTuples