{-# 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.WAFV2.DeleteFirewallManagerRuleGroups
(
DeleteFirewallManagerRuleGroups (..),
newDeleteFirewallManagerRuleGroups,
deleteFirewallManagerRuleGroups_webACLArn,
deleteFirewallManagerRuleGroups_webACLLockToken,
DeleteFirewallManagerRuleGroupsResponse (..),
newDeleteFirewallManagerRuleGroupsResponse,
deleteFirewallManagerRuleGroupsResponse_nextWebACLLockToken,
deleteFirewallManagerRuleGroupsResponse_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.WAFV2.Types
data DeleteFirewallManagerRuleGroups = DeleteFirewallManagerRuleGroups'
{
DeleteFirewallManagerRuleGroups -> Text
webACLArn :: Prelude.Text,
DeleteFirewallManagerRuleGroups -> Text
webACLLockToken :: Prelude.Text
}
deriving (DeleteFirewallManagerRuleGroups
-> DeleteFirewallManagerRuleGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFirewallManagerRuleGroups
-> DeleteFirewallManagerRuleGroups -> Bool
$c/= :: DeleteFirewallManagerRuleGroups
-> DeleteFirewallManagerRuleGroups -> Bool
== :: DeleteFirewallManagerRuleGroups
-> DeleteFirewallManagerRuleGroups -> Bool
$c== :: DeleteFirewallManagerRuleGroups
-> DeleteFirewallManagerRuleGroups -> Bool
Prelude.Eq, ReadPrec [DeleteFirewallManagerRuleGroups]
ReadPrec DeleteFirewallManagerRuleGroups
Int -> ReadS DeleteFirewallManagerRuleGroups
ReadS [DeleteFirewallManagerRuleGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFirewallManagerRuleGroups]
$creadListPrec :: ReadPrec [DeleteFirewallManagerRuleGroups]
readPrec :: ReadPrec DeleteFirewallManagerRuleGroups
$creadPrec :: ReadPrec DeleteFirewallManagerRuleGroups
readList :: ReadS [DeleteFirewallManagerRuleGroups]
$creadList :: ReadS [DeleteFirewallManagerRuleGroups]
readsPrec :: Int -> ReadS DeleteFirewallManagerRuleGroups
$creadsPrec :: Int -> ReadS DeleteFirewallManagerRuleGroups
Prelude.Read, Int -> DeleteFirewallManagerRuleGroups -> ShowS
[DeleteFirewallManagerRuleGroups] -> ShowS
DeleteFirewallManagerRuleGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFirewallManagerRuleGroups] -> ShowS
$cshowList :: [DeleteFirewallManagerRuleGroups] -> ShowS
show :: DeleteFirewallManagerRuleGroups -> String
$cshow :: DeleteFirewallManagerRuleGroups -> String
showsPrec :: Int -> DeleteFirewallManagerRuleGroups -> ShowS
$cshowsPrec :: Int -> DeleteFirewallManagerRuleGroups -> ShowS
Prelude.Show, forall x.
Rep DeleteFirewallManagerRuleGroups x
-> DeleteFirewallManagerRuleGroups
forall x.
DeleteFirewallManagerRuleGroups
-> Rep DeleteFirewallManagerRuleGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteFirewallManagerRuleGroups x
-> DeleteFirewallManagerRuleGroups
$cfrom :: forall x.
DeleteFirewallManagerRuleGroups
-> Rep DeleteFirewallManagerRuleGroups x
Prelude.Generic)
newDeleteFirewallManagerRuleGroups ::
Prelude.Text ->
Prelude.Text ->
DeleteFirewallManagerRuleGroups
newDeleteFirewallManagerRuleGroups :: Text -> Text -> DeleteFirewallManagerRuleGroups
newDeleteFirewallManagerRuleGroups
Text
pWebACLArn_
Text
pWebACLLockToken_ =
DeleteFirewallManagerRuleGroups'
{ $sel:webACLArn:DeleteFirewallManagerRuleGroups' :: Text
webACLArn =
Text
pWebACLArn_,
$sel:webACLLockToken:DeleteFirewallManagerRuleGroups' :: Text
webACLLockToken = Text
pWebACLLockToken_
}
deleteFirewallManagerRuleGroups_webACLArn :: Lens.Lens' DeleteFirewallManagerRuleGroups Prelude.Text
deleteFirewallManagerRuleGroups_webACLArn :: Lens' DeleteFirewallManagerRuleGroups Text
deleteFirewallManagerRuleGroups_webACLArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFirewallManagerRuleGroups' {Text
webACLArn :: Text
$sel:webACLArn:DeleteFirewallManagerRuleGroups' :: DeleteFirewallManagerRuleGroups -> Text
webACLArn} -> Text
webACLArn) (\s :: DeleteFirewallManagerRuleGroups
s@DeleteFirewallManagerRuleGroups' {} Text
a -> DeleteFirewallManagerRuleGroups
s {$sel:webACLArn:DeleteFirewallManagerRuleGroups' :: Text
webACLArn = Text
a} :: DeleteFirewallManagerRuleGroups)
deleteFirewallManagerRuleGroups_webACLLockToken :: Lens.Lens' DeleteFirewallManagerRuleGroups Prelude.Text
deleteFirewallManagerRuleGroups_webACLLockToken :: Lens' DeleteFirewallManagerRuleGroups Text
deleteFirewallManagerRuleGroups_webACLLockToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFirewallManagerRuleGroups' {Text
webACLLockToken :: Text
$sel:webACLLockToken:DeleteFirewallManagerRuleGroups' :: DeleteFirewallManagerRuleGroups -> Text
webACLLockToken} -> Text
webACLLockToken) (\s :: DeleteFirewallManagerRuleGroups
s@DeleteFirewallManagerRuleGroups' {} Text
a -> DeleteFirewallManagerRuleGroups
s {$sel:webACLLockToken:DeleteFirewallManagerRuleGroups' :: Text
webACLLockToken = Text
a} :: DeleteFirewallManagerRuleGroups)
instance
Core.AWSRequest
DeleteFirewallManagerRuleGroups
where
type
AWSResponse DeleteFirewallManagerRuleGroups =
DeleteFirewallManagerRuleGroupsResponse
request :: (Service -> Service)
-> DeleteFirewallManagerRuleGroups
-> Request DeleteFirewallManagerRuleGroups
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 DeleteFirewallManagerRuleGroups
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteFirewallManagerRuleGroups)))
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 -> Int -> DeleteFirewallManagerRuleGroupsResponse
DeleteFirewallManagerRuleGroupsResponse'
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
"NextWebACLLockToken")
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
DeleteFirewallManagerRuleGroups
where
hashWithSalt :: Int -> DeleteFirewallManagerRuleGroups -> Int
hashWithSalt
Int
_salt
DeleteFirewallManagerRuleGroups' {Text
webACLLockToken :: Text
webACLArn :: Text
$sel:webACLLockToken:DeleteFirewallManagerRuleGroups' :: DeleteFirewallManagerRuleGroups -> Text
$sel:webACLArn:DeleteFirewallManagerRuleGroups' :: DeleteFirewallManagerRuleGroups -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
webACLArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
webACLLockToken
instance
Prelude.NFData
DeleteFirewallManagerRuleGroups
where
rnf :: DeleteFirewallManagerRuleGroups -> ()
rnf DeleteFirewallManagerRuleGroups' {Text
webACLLockToken :: Text
webACLArn :: Text
$sel:webACLLockToken:DeleteFirewallManagerRuleGroups' :: DeleteFirewallManagerRuleGroups -> Text
$sel:webACLArn:DeleteFirewallManagerRuleGroups' :: DeleteFirewallManagerRuleGroups -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
webACLArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
webACLLockToken
instance
Data.ToHeaders
DeleteFirewallManagerRuleGroups
where
toHeaders :: DeleteFirewallManagerRuleGroups -> 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_20190729.DeleteFirewallManagerRuleGroups" ::
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 DeleteFirewallManagerRuleGroups where
toJSON :: DeleteFirewallManagerRuleGroups -> Value
toJSON DeleteFirewallManagerRuleGroups' {Text
webACLLockToken :: Text
webACLArn :: Text
$sel:webACLLockToken:DeleteFirewallManagerRuleGroups' :: DeleteFirewallManagerRuleGroups -> Text
$sel:webACLArn:DeleteFirewallManagerRuleGroups' :: DeleteFirewallManagerRuleGroups -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"WebACLArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
webACLArn),
forall a. a -> Maybe a
Prelude.Just
(Key
"WebACLLockToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
webACLLockToken)
]
)
instance Data.ToPath DeleteFirewallManagerRuleGroups where
toPath :: DeleteFirewallManagerRuleGroups -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteFirewallManagerRuleGroups where
toQuery :: DeleteFirewallManagerRuleGroups -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteFirewallManagerRuleGroupsResponse = DeleteFirewallManagerRuleGroupsResponse'
{
DeleteFirewallManagerRuleGroupsResponse -> Maybe Text
nextWebACLLockToken :: Prelude.Maybe Prelude.Text,
DeleteFirewallManagerRuleGroupsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteFirewallManagerRuleGroupsResponse
-> DeleteFirewallManagerRuleGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFirewallManagerRuleGroupsResponse
-> DeleteFirewallManagerRuleGroupsResponse -> Bool
$c/= :: DeleteFirewallManagerRuleGroupsResponse
-> DeleteFirewallManagerRuleGroupsResponse -> Bool
== :: DeleteFirewallManagerRuleGroupsResponse
-> DeleteFirewallManagerRuleGroupsResponse -> Bool
$c== :: DeleteFirewallManagerRuleGroupsResponse
-> DeleteFirewallManagerRuleGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteFirewallManagerRuleGroupsResponse]
ReadPrec DeleteFirewallManagerRuleGroupsResponse
Int -> ReadS DeleteFirewallManagerRuleGroupsResponse
ReadS [DeleteFirewallManagerRuleGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFirewallManagerRuleGroupsResponse]
$creadListPrec :: ReadPrec [DeleteFirewallManagerRuleGroupsResponse]
readPrec :: ReadPrec DeleteFirewallManagerRuleGroupsResponse
$creadPrec :: ReadPrec DeleteFirewallManagerRuleGroupsResponse
readList :: ReadS [DeleteFirewallManagerRuleGroupsResponse]
$creadList :: ReadS [DeleteFirewallManagerRuleGroupsResponse]
readsPrec :: Int -> ReadS DeleteFirewallManagerRuleGroupsResponse
$creadsPrec :: Int -> ReadS DeleteFirewallManagerRuleGroupsResponse
Prelude.Read, Int -> DeleteFirewallManagerRuleGroupsResponse -> ShowS
[DeleteFirewallManagerRuleGroupsResponse] -> ShowS
DeleteFirewallManagerRuleGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFirewallManagerRuleGroupsResponse] -> ShowS
$cshowList :: [DeleteFirewallManagerRuleGroupsResponse] -> ShowS
show :: DeleteFirewallManagerRuleGroupsResponse -> String
$cshow :: DeleteFirewallManagerRuleGroupsResponse -> String
showsPrec :: Int -> DeleteFirewallManagerRuleGroupsResponse -> ShowS
$cshowsPrec :: Int -> DeleteFirewallManagerRuleGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteFirewallManagerRuleGroupsResponse x
-> DeleteFirewallManagerRuleGroupsResponse
forall x.
DeleteFirewallManagerRuleGroupsResponse
-> Rep DeleteFirewallManagerRuleGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteFirewallManagerRuleGroupsResponse x
-> DeleteFirewallManagerRuleGroupsResponse
$cfrom :: forall x.
DeleteFirewallManagerRuleGroupsResponse
-> Rep DeleteFirewallManagerRuleGroupsResponse x
Prelude.Generic)
newDeleteFirewallManagerRuleGroupsResponse ::
Prelude.Int ->
DeleteFirewallManagerRuleGroupsResponse
newDeleteFirewallManagerRuleGroupsResponse :: Int -> DeleteFirewallManagerRuleGroupsResponse
newDeleteFirewallManagerRuleGroupsResponse
Int
pHttpStatus_ =
DeleteFirewallManagerRuleGroupsResponse'
{ $sel:nextWebACLLockToken:DeleteFirewallManagerRuleGroupsResponse' :: Maybe Text
nextWebACLLockToken =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteFirewallManagerRuleGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteFirewallManagerRuleGroupsResponse_nextWebACLLockToken :: Lens.Lens' DeleteFirewallManagerRuleGroupsResponse (Prelude.Maybe Prelude.Text)
deleteFirewallManagerRuleGroupsResponse_nextWebACLLockToken :: Lens' DeleteFirewallManagerRuleGroupsResponse (Maybe Text)
deleteFirewallManagerRuleGroupsResponse_nextWebACLLockToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFirewallManagerRuleGroupsResponse' {Maybe Text
nextWebACLLockToken :: Maybe Text
$sel:nextWebACLLockToken:DeleteFirewallManagerRuleGroupsResponse' :: DeleteFirewallManagerRuleGroupsResponse -> Maybe Text
nextWebACLLockToken} -> Maybe Text
nextWebACLLockToken) (\s :: DeleteFirewallManagerRuleGroupsResponse
s@DeleteFirewallManagerRuleGroupsResponse' {} Maybe Text
a -> DeleteFirewallManagerRuleGroupsResponse
s {$sel:nextWebACLLockToken:DeleteFirewallManagerRuleGroupsResponse' :: Maybe Text
nextWebACLLockToken = Maybe Text
a} :: DeleteFirewallManagerRuleGroupsResponse)
deleteFirewallManagerRuleGroupsResponse_httpStatus :: Lens.Lens' DeleteFirewallManagerRuleGroupsResponse Prelude.Int
deleteFirewallManagerRuleGroupsResponse_httpStatus :: Lens' DeleteFirewallManagerRuleGroupsResponse Int
deleteFirewallManagerRuleGroupsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFirewallManagerRuleGroupsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteFirewallManagerRuleGroupsResponse' :: DeleteFirewallManagerRuleGroupsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteFirewallManagerRuleGroupsResponse
s@DeleteFirewallManagerRuleGroupsResponse' {} Int
a -> DeleteFirewallManagerRuleGroupsResponse
s {$sel:httpStatus:DeleteFirewallManagerRuleGroupsResponse' :: Int
httpStatus = Int
a} :: DeleteFirewallManagerRuleGroupsResponse)
instance
Prelude.NFData
DeleteFirewallManagerRuleGroupsResponse
where
rnf :: DeleteFirewallManagerRuleGroupsResponse -> ()
rnf DeleteFirewallManagerRuleGroupsResponse' {Int
Maybe Text
httpStatus :: Int
nextWebACLLockToken :: Maybe Text
$sel:httpStatus:DeleteFirewallManagerRuleGroupsResponse' :: DeleteFirewallManagerRuleGroupsResponse -> Int
$sel:nextWebACLLockToken:DeleteFirewallManagerRuleGroupsResponse' :: DeleteFirewallManagerRuleGroupsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextWebACLLockToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus