{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.WAFRegional.ListSqlInjectionMatchSets
(
ListSqlInjectionMatchSets (..),
newListSqlInjectionMatchSets,
listSqlInjectionMatchSets_limit,
listSqlInjectionMatchSets_nextMarker,
ListSqlInjectionMatchSetsResponse (..),
newListSqlInjectionMatchSetsResponse,
listSqlInjectionMatchSetsResponse_nextMarker,
listSqlInjectionMatchSetsResponse_sqlInjectionMatchSets,
listSqlInjectionMatchSetsResponse_httpStatus,
)
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WAFRegional.Types
data ListSqlInjectionMatchSets = ListSqlInjectionMatchSets'
{
ListSqlInjectionMatchSets -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
ListSqlInjectionMatchSets -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text
}
deriving (ListSqlInjectionMatchSets -> ListSqlInjectionMatchSets -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSqlInjectionMatchSets -> ListSqlInjectionMatchSets -> Bool
$c/= :: ListSqlInjectionMatchSets -> ListSqlInjectionMatchSets -> Bool
== :: ListSqlInjectionMatchSets -> ListSqlInjectionMatchSets -> Bool
$c== :: ListSqlInjectionMatchSets -> ListSqlInjectionMatchSets -> Bool
Prelude.Eq, ReadPrec [ListSqlInjectionMatchSets]
ReadPrec ListSqlInjectionMatchSets
Int -> ReadS ListSqlInjectionMatchSets
ReadS [ListSqlInjectionMatchSets]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSqlInjectionMatchSets]
$creadListPrec :: ReadPrec [ListSqlInjectionMatchSets]
readPrec :: ReadPrec ListSqlInjectionMatchSets
$creadPrec :: ReadPrec ListSqlInjectionMatchSets
readList :: ReadS [ListSqlInjectionMatchSets]
$creadList :: ReadS [ListSqlInjectionMatchSets]
readsPrec :: Int -> ReadS ListSqlInjectionMatchSets
$creadsPrec :: Int -> ReadS ListSqlInjectionMatchSets
Prelude.Read, Int -> ListSqlInjectionMatchSets -> ShowS
[ListSqlInjectionMatchSets] -> ShowS
ListSqlInjectionMatchSets -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSqlInjectionMatchSets] -> ShowS
$cshowList :: [ListSqlInjectionMatchSets] -> ShowS
show :: ListSqlInjectionMatchSets -> String
$cshow :: ListSqlInjectionMatchSets -> String
showsPrec :: Int -> ListSqlInjectionMatchSets -> ShowS
$cshowsPrec :: Int -> ListSqlInjectionMatchSets -> ShowS
Prelude.Show, forall x.
Rep ListSqlInjectionMatchSets x -> ListSqlInjectionMatchSets
forall x.
ListSqlInjectionMatchSets -> Rep ListSqlInjectionMatchSets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSqlInjectionMatchSets x -> ListSqlInjectionMatchSets
$cfrom :: forall x.
ListSqlInjectionMatchSets -> Rep ListSqlInjectionMatchSets x
Prelude.Generic)
newListSqlInjectionMatchSets ::
ListSqlInjectionMatchSets
newListSqlInjectionMatchSets :: ListSqlInjectionMatchSets
newListSqlInjectionMatchSets =
ListSqlInjectionMatchSets'
{ $sel:limit:ListSqlInjectionMatchSets' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
$sel:nextMarker:ListSqlInjectionMatchSets' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing
}
listSqlInjectionMatchSets_limit :: Lens.Lens' ListSqlInjectionMatchSets (Prelude.Maybe Prelude.Natural)
listSqlInjectionMatchSets_limit :: Lens' ListSqlInjectionMatchSets (Maybe Natural)
listSqlInjectionMatchSets_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSqlInjectionMatchSets' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListSqlInjectionMatchSets' :: ListSqlInjectionMatchSets -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListSqlInjectionMatchSets
s@ListSqlInjectionMatchSets' {} Maybe Natural
a -> ListSqlInjectionMatchSets
s {$sel:limit:ListSqlInjectionMatchSets' :: Maybe Natural
limit = Maybe Natural
a} :: ListSqlInjectionMatchSets)
listSqlInjectionMatchSets_nextMarker :: Lens.Lens' ListSqlInjectionMatchSets (Prelude.Maybe Prelude.Text)
listSqlInjectionMatchSets_nextMarker :: Lens' ListSqlInjectionMatchSets (Maybe Text)
listSqlInjectionMatchSets_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSqlInjectionMatchSets' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListSqlInjectionMatchSets' :: ListSqlInjectionMatchSets -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListSqlInjectionMatchSets
s@ListSqlInjectionMatchSets' {} Maybe Text
a -> ListSqlInjectionMatchSets
s {$sel:nextMarker:ListSqlInjectionMatchSets' :: Maybe Text
nextMarker = Maybe Text
a} :: ListSqlInjectionMatchSets)
instance Core.AWSRequest ListSqlInjectionMatchSets where
type
AWSResponse ListSqlInjectionMatchSets =
ListSqlInjectionMatchSetsResponse
request :: (Service -> Service)
-> ListSqlInjectionMatchSets -> Request ListSqlInjectionMatchSets
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListSqlInjectionMatchSets
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListSqlInjectionMatchSets)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe [SqlInjectionMatchSetSummary]
-> Int
-> ListSqlInjectionMatchSetsResponse
ListSqlInjectionMatchSetsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextMarker")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SqlInjectionMatchSets"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListSqlInjectionMatchSets where
hashWithSalt :: Int -> ListSqlInjectionMatchSets -> Int
hashWithSalt Int
_salt ListSqlInjectionMatchSets' {Maybe Natural
Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:nextMarker:ListSqlInjectionMatchSets' :: ListSqlInjectionMatchSets -> Maybe Text
$sel:limit:ListSqlInjectionMatchSets' :: ListSqlInjectionMatchSets -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextMarker
instance Prelude.NFData ListSqlInjectionMatchSets where
rnf :: ListSqlInjectionMatchSets -> ()
rnf ListSqlInjectionMatchSets' {Maybe Natural
Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:nextMarker:ListSqlInjectionMatchSets' :: ListSqlInjectionMatchSets -> Maybe Text
$sel:limit:ListSqlInjectionMatchSets' :: ListSqlInjectionMatchSets -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextMarker
instance Data.ToHeaders ListSqlInjectionMatchSets where
toHeaders :: ListSqlInjectionMatchSets -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSWAF_Regional_20161128.ListSqlInjectionMatchSets" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON ListSqlInjectionMatchSets where
toJSON :: ListSqlInjectionMatchSets -> Value
toJSON ListSqlInjectionMatchSets' {Maybe Natural
Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:nextMarker:ListSqlInjectionMatchSets' :: ListSqlInjectionMatchSets -> Maybe Text
$sel:limit:ListSqlInjectionMatchSets' :: ListSqlInjectionMatchSets -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Limit" 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 Natural
limit,
(Key
"NextMarker" 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 Text
nextMarker
]
)
instance Data.ToPath ListSqlInjectionMatchSets where
toPath :: ListSqlInjectionMatchSets -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ListSqlInjectionMatchSets where
toQuery :: ListSqlInjectionMatchSets -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListSqlInjectionMatchSetsResponse = ListSqlInjectionMatchSetsResponse'
{
ListSqlInjectionMatchSetsResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
ListSqlInjectionMatchSetsResponse
-> Maybe [SqlInjectionMatchSetSummary]
sqlInjectionMatchSets :: Prelude.Maybe [SqlInjectionMatchSetSummary],
ListSqlInjectionMatchSetsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListSqlInjectionMatchSetsResponse
-> ListSqlInjectionMatchSetsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSqlInjectionMatchSetsResponse
-> ListSqlInjectionMatchSetsResponse -> Bool
$c/= :: ListSqlInjectionMatchSetsResponse
-> ListSqlInjectionMatchSetsResponse -> Bool
== :: ListSqlInjectionMatchSetsResponse
-> ListSqlInjectionMatchSetsResponse -> Bool
$c== :: ListSqlInjectionMatchSetsResponse
-> ListSqlInjectionMatchSetsResponse -> Bool
Prelude.Eq, ReadPrec [ListSqlInjectionMatchSetsResponse]
ReadPrec ListSqlInjectionMatchSetsResponse
Int -> ReadS ListSqlInjectionMatchSetsResponse
ReadS [ListSqlInjectionMatchSetsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSqlInjectionMatchSetsResponse]
$creadListPrec :: ReadPrec [ListSqlInjectionMatchSetsResponse]
readPrec :: ReadPrec ListSqlInjectionMatchSetsResponse
$creadPrec :: ReadPrec ListSqlInjectionMatchSetsResponse
readList :: ReadS [ListSqlInjectionMatchSetsResponse]
$creadList :: ReadS [ListSqlInjectionMatchSetsResponse]
readsPrec :: Int -> ReadS ListSqlInjectionMatchSetsResponse
$creadsPrec :: Int -> ReadS ListSqlInjectionMatchSetsResponse
Prelude.Read, Int -> ListSqlInjectionMatchSetsResponse -> ShowS
[ListSqlInjectionMatchSetsResponse] -> ShowS
ListSqlInjectionMatchSetsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSqlInjectionMatchSetsResponse] -> ShowS
$cshowList :: [ListSqlInjectionMatchSetsResponse] -> ShowS
show :: ListSqlInjectionMatchSetsResponse -> String
$cshow :: ListSqlInjectionMatchSetsResponse -> String
showsPrec :: Int -> ListSqlInjectionMatchSetsResponse -> ShowS
$cshowsPrec :: Int -> ListSqlInjectionMatchSetsResponse -> ShowS
Prelude.Show, forall x.
Rep ListSqlInjectionMatchSetsResponse x
-> ListSqlInjectionMatchSetsResponse
forall x.
ListSqlInjectionMatchSetsResponse
-> Rep ListSqlInjectionMatchSetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSqlInjectionMatchSetsResponse x
-> ListSqlInjectionMatchSetsResponse
$cfrom :: forall x.
ListSqlInjectionMatchSetsResponse
-> Rep ListSqlInjectionMatchSetsResponse x
Prelude.Generic)
newListSqlInjectionMatchSetsResponse ::
Prelude.Int ->
ListSqlInjectionMatchSetsResponse
newListSqlInjectionMatchSetsResponse :: Int -> ListSqlInjectionMatchSetsResponse
newListSqlInjectionMatchSetsResponse Int
pHttpStatus_ =
ListSqlInjectionMatchSetsResponse'
{ $sel:nextMarker:ListSqlInjectionMatchSetsResponse' :: Maybe Text
nextMarker =
forall a. Maybe a
Prelude.Nothing,
$sel:sqlInjectionMatchSets:ListSqlInjectionMatchSetsResponse' :: Maybe [SqlInjectionMatchSetSummary]
sqlInjectionMatchSets = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListSqlInjectionMatchSetsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listSqlInjectionMatchSetsResponse_nextMarker :: Lens.Lens' ListSqlInjectionMatchSetsResponse (Prelude.Maybe Prelude.Text)
listSqlInjectionMatchSetsResponse_nextMarker :: Lens' ListSqlInjectionMatchSetsResponse (Maybe Text)
listSqlInjectionMatchSetsResponse_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSqlInjectionMatchSetsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListSqlInjectionMatchSetsResponse' :: ListSqlInjectionMatchSetsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListSqlInjectionMatchSetsResponse
s@ListSqlInjectionMatchSetsResponse' {} Maybe Text
a -> ListSqlInjectionMatchSetsResponse
s {$sel:nextMarker:ListSqlInjectionMatchSetsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListSqlInjectionMatchSetsResponse)
listSqlInjectionMatchSetsResponse_sqlInjectionMatchSets :: Lens.Lens' ListSqlInjectionMatchSetsResponse (Prelude.Maybe [SqlInjectionMatchSetSummary])
listSqlInjectionMatchSetsResponse_sqlInjectionMatchSets :: Lens'
ListSqlInjectionMatchSetsResponse
(Maybe [SqlInjectionMatchSetSummary])
listSqlInjectionMatchSetsResponse_sqlInjectionMatchSets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSqlInjectionMatchSetsResponse' {Maybe [SqlInjectionMatchSetSummary]
sqlInjectionMatchSets :: Maybe [SqlInjectionMatchSetSummary]
$sel:sqlInjectionMatchSets:ListSqlInjectionMatchSetsResponse' :: ListSqlInjectionMatchSetsResponse
-> Maybe [SqlInjectionMatchSetSummary]
sqlInjectionMatchSets} -> Maybe [SqlInjectionMatchSetSummary]
sqlInjectionMatchSets) (\s :: ListSqlInjectionMatchSetsResponse
s@ListSqlInjectionMatchSetsResponse' {} Maybe [SqlInjectionMatchSetSummary]
a -> ListSqlInjectionMatchSetsResponse
s {$sel:sqlInjectionMatchSets:ListSqlInjectionMatchSetsResponse' :: Maybe [SqlInjectionMatchSetSummary]
sqlInjectionMatchSets = Maybe [SqlInjectionMatchSetSummary]
a} :: ListSqlInjectionMatchSetsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listSqlInjectionMatchSetsResponse_httpStatus :: Lens.Lens' ListSqlInjectionMatchSetsResponse Prelude.Int
listSqlInjectionMatchSetsResponse_httpStatus :: Lens' ListSqlInjectionMatchSetsResponse Int
listSqlInjectionMatchSetsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSqlInjectionMatchSetsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListSqlInjectionMatchSetsResponse' :: ListSqlInjectionMatchSetsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListSqlInjectionMatchSetsResponse
s@ListSqlInjectionMatchSetsResponse' {} Int
a -> ListSqlInjectionMatchSetsResponse
s {$sel:httpStatus:ListSqlInjectionMatchSetsResponse' :: Int
httpStatus = Int
a} :: ListSqlInjectionMatchSetsResponse)
instance
Prelude.NFData
ListSqlInjectionMatchSetsResponse
where
rnf :: ListSqlInjectionMatchSetsResponse -> ()
rnf ListSqlInjectionMatchSetsResponse' {Int
Maybe [SqlInjectionMatchSetSummary]
Maybe Text
httpStatus :: Int
sqlInjectionMatchSets :: Maybe [SqlInjectionMatchSetSummary]
nextMarker :: Maybe Text
$sel:httpStatus:ListSqlInjectionMatchSetsResponse' :: ListSqlInjectionMatchSetsResponse -> Int
$sel:sqlInjectionMatchSets:ListSqlInjectionMatchSetsResponse' :: ListSqlInjectionMatchSetsResponse
-> Maybe [SqlInjectionMatchSetSummary]
$sel:nextMarker:ListSqlInjectionMatchSetsResponse' :: ListSqlInjectionMatchSetsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextMarker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SqlInjectionMatchSetSummary]
sqlInjectionMatchSets
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus