{-# 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.DisassociateWebACL
(
DisassociateWebACL (..),
newDisassociateWebACL,
disassociateWebACL_resourceArn,
DisassociateWebACLResponse (..),
newDisassociateWebACLResponse,
disassociateWebACLResponse_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 DisassociateWebACL = DisassociateWebACL'
{
DisassociateWebACL -> Text
resourceArn :: Prelude.Text
}
deriving (DisassociateWebACL -> DisassociateWebACL -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateWebACL -> DisassociateWebACL -> Bool
$c/= :: DisassociateWebACL -> DisassociateWebACL -> Bool
== :: DisassociateWebACL -> DisassociateWebACL -> Bool
$c== :: DisassociateWebACL -> DisassociateWebACL -> Bool
Prelude.Eq, ReadPrec [DisassociateWebACL]
ReadPrec DisassociateWebACL
Int -> ReadS DisassociateWebACL
ReadS [DisassociateWebACL]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateWebACL]
$creadListPrec :: ReadPrec [DisassociateWebACL]
readPrec :: ReadPrec DisassociateWebACL
$creadPrec :: ReadPrec DisassociateWebACL
readList :: ReadS [DisassociateWebACL]
$creadList :: ReadS [DisassociateWebACL]
readsPrec :: Int -> ReadS DisassociateWebACL
$creadsPrec :: Int -> ReadS DisassociateWebACL
Prelude.Read, Int -> DisassociateWebACL -> ShowS
[DisassociateWebACL] -> ShowS
DisassociateWebACL -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateWebACL] -> ShowS
$cshowList :: [DisassociateWebACL] -> ShowS
show :: DisassociateWebACL -> String
$cshow :: DisassociateWebACL -> String
showsPrec :: Int -> DisassociateWebACL -> ShowS
$cshowsPrec :: Int -> DisassociateWebACL -> ShowS
Prelude.Show, forall x. Rep DisassociateWebACL x -> DisassociateWebACL
forall x. DisassociateWebACL -> Rep DisassociateWebACL x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisassociateWebACL x -> DisassociateWebACL
$cfrom :: forall x. DisassociateWebACL -> Rep DisassociateWebACL x
Prelude.Generic)
newDisassociateWebACL ::
Prelude.Text ->
DisassociateWebACL
newDisassociateWebACL :: Text -> DisassociateWebACL
newDisassociateWebACL Text
pResourceArn_ =
DisassociateWebACL' {$sel:resourceArn:DisassociateWebACL' :: Text
resourceArn = Text
pResourceArn_}
disassociateWebACL_resourceArn :: Lens.Lens' DisassociateWebACL Prelude.Text
disassociateWebACL_resourceArn :: Lens' DisassociateWebACL Text
disassociateWebACL_resourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateWebACL' {Text
resourceArn :: Text
$sel:resourceArn:DisassociateWebACL' :: DisassociateWebACL -> Text
resourceArn} -> Text
resourceArn) (\s :: DisassociateWebACL
s@DisassociateWebACL' {} Text
a -> DisassociateWebACL
s {$sel:resourceArn:DisassociateWebACL' :: Text
resourceArn = Text
a} :: DisassociateWebACL)
instance Core.AWSRequest DisassociateWebACL where
type
AWSResponse DisassociateWebACL =
DisassociateWebACLResponse
request :: (Service -> Service)
-> DisassociateWebACL -> Request DisassociateWebACL
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 DisassociateWebACL
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateWebACL)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateWebACLResponse
DisassociateWebACLResponse'
forall (f :: * -> *) a b. Functor 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 DisassociateWebACL where
hashWithSalt :: Int -> DisassociateWebACL -> Int
hashWithSalt Int
_salt DisassociateWebACL' {Text
resourceArn :: Text
$sel:resourceArn:DisassociateWebACL' :: DisassociateWebACL -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceArn
instance Prelude.NFData DisassociateWebACL where
rnf :: DisassociateWebACL -> ()
rnf DisassociateWebACL' {Text
resourceArn :: Text
$sel:resourceArn:DisassociateWebACL' :: DisassociateWebACL -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
resourceArn
instance Data.ToHeaders DisassociateWebACL where
toHeaders :: DisassociateWebACL -> 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.DisassociateWebACL" ::
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 DisassociateWebACL where
toJSON :: DisassociateWebACL -> Value
toJSON DisassociateWebACL' {Text
resourceArn :: Text
$sel:resourceArn:DisassociateWebACL' :: DisassociateWebACL -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"ResourceArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
resourceArn)]
)
instance Data.ToPath DisassociateWebACL where
toPath :: DisassociateWebACL -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DisassociateWebACL where
toQuery :: DisassociateWebACL -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DisassociateWebACLResponse = DisassociateWebACLResponse'
{
DisassociateWebACLResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateWebACLResponse -> DisassociateWebACLResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateWebACLResponse -> DisassociateWebACLResponse -> Bool
$c/= :: DisassociateWebACLResponse -> DisassociateWebACLResponse -> Bool
== :: DisassociateWebACLResponse -> DisassociateWebACLResponse -> Bool
$c== :: DisassociateWebACLResponse -> DisassociateWebACLResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateWebACLResponse]
ReadPrec DisassociateWebACLResponse
Int -> ReadS DisassociateWebACLResponse
ReadS [DisassociateWebACLResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateWebACLResponse]
$creadListPrec :: ReadPrec [DisassociateWebACLResponse]
readPrec :: ReadPrec DisassociateWebACLResponse
$creadPrec :: ReadPrec DisassociateWebACLResponse
readList :: ReadS [DisassociateWebACLResponse]
$creadList :: ReadS [DisassociateWebACLResponse]
readsPrec :: Int -> ReadS DisassociateWebACLResponse
$creadsPrec :: Int -> ReadS DisassociateWebACLResponse
Prelude.Read, Int -> DisassociateWebACLResponse -> ShowS
[DisassociateWebACLResponse] -> ShowS
DisassociateWebACLResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateWebACLResponse] -> ShowS
$cshowList :: [DisassociateWebACLResponse] -> ShowS
show :: DisassociateWebACLResponse -> String
$cshow :: DisassociateWebACLResponse -> String
showsPrec :: Int -> DisassociateWebACLResponse -> ShowS
$cshowsPrec :: Int -> DisassociateWebACLResponse -> ShowS
Prelude.Show, forall x.
Rep DisassociateWebACLResponse x -> DisassociateWebACLResponse
forall x.
DisassociateWebACLResponse -> Rep DisassociateWebACLResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateWebACLResponse x -> DisassociateWebACLResponse
$cfrom :: forall x.
DisassociateWebACLResponse -> Rep DisassociateWebACLResponse x
Prelude.Generic)
newDisassociateWebACLResponse ::
Prelude.Int ->
DisassociateWebACLResponse
newDisassociateWebACLResponse :: Int -> DisassociateWebACLResponse
newDisassociateWebACLResponse Int
pHttpStatus_ =
DisassociateWebACLResponse'
{ $sel:httpStatus:DisassociateWebACLResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateWebACLResponse_httpStatus :: Lens.Lens' DisassociateWebACLResponse Prelude.Int
disassociateWebACLResponse_httpStatus :: Lens' DisassociateWebACLResponse Int
disassociateWebACLResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateWebACLResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateWebACLResponse' :: DisassociateWebACLResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateWebACLResponse
s@DisassociateWebACLResponse' {} Int
a -> DisassociateWebACLResponse
s {$sel:httpStatus:DisassociateWebACLResponse' :: Int
httpStatus = Int
a} :: DisassociateWebACLResponse)
instance Prelude.NFData DisassociateWebACLResponse where
rnf :: DisassociateWebACLResponse -> ()
rnf DisassociateWebACLResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateWebACLResponse' :: DisassociateWebACLResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus