{-# 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.Shield.DisassociateDRTRole
(
DisassociateDRTRole (..),
newDisassociateDRTRole,
DisassociateDRTRoleResponse (..),
newDisassociateDRTRoleResponse,
disassociateDRTRoleResponse_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.Shield.Types
data DisassociateDRTRole = DisassociateDRTRole'
{
}
deriving (DisassociateDRTRole -> DisassociateDRTRole -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateDRTRole -> DisassociateDRTRole -> Bool
$c/= :: DisassociateDRTRole -> DisassociateDRTRole -> Bool
== :: DisassociateDRTRole -> DisassociateDRTRole -> Bool
$c== :: DisassociateDRTRole -> DisassociateDRTRole -> Bool
Prelude.Eq, ReadPrec [DisassociateDRTRole]
ReadPrec DisassociateDRTRole
Int -> ReadS DisassociateDRTRole
ReadS [DisassociateDRTRole]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateDRTRole]
$creadListPrec :: ReadPrec [DisassociateDRTRole]
readPrec :: ReadPrec DisassociateDRTRole
$creadPrec :: ReadPrec DisassociateDRTRole
readList :: ReadS [DisassociateDRTRole]
$creadList :: ReadS [DisassociateDRTRole]
readsPrec :: Int -> ReadS DisassociateDRTRole
$creadsPrec :: Int -> ReadS DisassociateDRTRole
Prelude.Read, Int -> DisassociateDRTRole -> ShowS
[DisassociateDRTRole] -> ShowS
DisassociateDRTRole -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateDRTRole] -> ShowS
$cshowList :: [DisassociateDRTRole] -> ShowS
show :: DisassociateDRTRole -> String
$cshow :: DisassociateDRTRole -> String
showsPrec :: Int -> DisassociateDRTRole -> ShowS
$cshowsPrec :: Int -> DisassociateDRTRole -> ShowS
Prelude.Show, forall x. Rep DisassociateDRTRole x -> DisassociateDRTRole
forall x. DisassociateDRTRole -> Rep DisassociateDRTRole x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisassociateDRTRole x -> DisassociateDRTRole
$cfrom :: forall x. DisassociateDRTRole -> Rep DisassociateDRTRole x
Prelude.Generic)
newDisassociateDRTRole ::
DisassociateDRTRole
newDisassociateDRTRole :: DisassociateDRTRole
newDisassociateDRTRole = DisassociateDRTRole
DisassociateDRTRole'
instance Core.AWSRequest DisassociateDRTRole where
type
AWSResponse DisassociateDRTRole =
DisassociateDRTRoleResponse
request :: (Service -> Service)
-> DisassociateDRTRole -> Request DisassociateDRTRole
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 DisassociateDRTRole
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateDRTRole)))
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 -> DisassociateDRTRoleResponse
DisassociateDRTRoleResponse'
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 DisassociateDRTRole where
hashWithSalt :: Int -> DisassociateDRTRole -> Int
hashWithSalt Int
_salt DisassociateDRTRole
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance Prelude.NFData DisassociateDRTRole where
rnf :: DisassociateDRTRole -> ()
rnf DisassociateDRTRole
_ = ()
instance Data.ToHeaders DisassociateDRTRole where
toHeaders :: DisassociateDRTRole -> 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
"AWSShield_20160616.DisassociateDRTRole" ::
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 DisassociateDRTRole where
toJSON :: DisassociateDRTRole -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance Data.ToPath DisassociateDRTRole where
toPath :: DisassociateDRTRole -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DisassociateDRTRole where
toQuery :: DisassociateDRTRole -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DisassociateDRTRoleResponse = DisassociateDRTRoleResponse'
{
DisassociateDRTRoleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateDRTRoleResponse -> DisassociateDRTRoleResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateDRTRoleResponse -> DisassociateDRTRoleResponse -> Bool
$c/= :: DisassociateDRTRoleResponse -> DisassociateDRTRoleResponse -> Bool
== :: DisassociateDRTRoleResponse -> DisassociateDRTRoleResponse -> Bool
$c== :: DisassociateDRTRoleResponse -> DisassociateDRTRoleResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateDRTRoleResponse]
ReadPrec DisassociateDRTRoleResponse
Int -> ReadS DisassociateDRTRoleResponse
ReadS [DisassociateDRTRoleResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateDRTRoleResponse]
$creadListPrec :: ReadPrec [DisassociateDRTRoleResponse]
readPrec :: ReadPrec DisassociateDRTRoleResponse
$creadPrec :: ReadPrec DisassociateDRTRoleResponse
readList :: ReadS [DisassociateDRTRoleResponse]
$creadList :: ReadS [DisassociateDRTRoleResponse]
readsPrec :: Int -> ReadS DisassociateDRTRoleResponse
$creadsPrec :: Int -> ReadS DisassociateDRTRoleResponse
Prelude.Read, Int -> DisassociateDRTRoleResponse -> ShowS
[DisassociateDRTRoleResponse] -> ShowS
DisassociateDRTRoleResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateDRTRoleResponse] -> ShowS
$cshowList :: [DisassociateDRTRoleResponse] -> ShowS
show :: DisassociateDRTRoleResponse -> String
$cshow :: DisassociateDRTRoleResponse -> String
showsPrec :: Int -> DisassociateDRTRoleResponse -> ShowS
$cshowsPrec :: Int -> DisassociateDRTRoleResponse -> ShowS
Prelude.Show, forall x.
Rep DisassociateDRTRoleResponse x -> DisassociateDRTRoleResponse
forall x.
DisassociateDRTRoleResponse -> Rep DisassociateDRTRoleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateDRTRoleResponse x -> DisassociateDRTRoleResponse
$cfrom :: forall x.
DisassociateDRTRoleResponse -> Rep DisassociateDRTRoleResponse x
Prelude.Generic)
newDisassociateDRTRoleResponse ::
Prelude.Int ->
DisassociateDRTRoleResponse
newDisassociateDRTRoleResponse :: Int -> DisassociateDRTRoleResponse
newDisassociateDRTRoleResponse Int
pHttpStatus_ =
DisassociateDRTRoleResponse'
{ $sel:httpStatus:DisassociateDRTRoleResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateDRTRoleResponse_httpStatus :: Lens.Lens' DisassociateDRTRoleResponse Prelude.Int
disassociateDRTRoleResponse_httpStatus :: Lens' DisassociateDRTRoleResponse Int
disassociateDRTRoleResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateDRTRoleResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateDRTRoleResponse' :: DisassociateDRTRoleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateDRTRoleResponse
s@DisassociateDRTRoleResponse' {} Int
a -> DisassociateDRTRoleResponse
s {$sel:httpStatus:DisassociateDRTRoleResponse' :: Int
httpStatus = Int
a} :: DisassociateDRTRoleResponse)
instance Prelude.NFData DisassociateDRTRoleResponse where
rnf :: DisassociateDRTRoleResponse -> ()
rnf DisassociateDRTRoleResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateDRTRoleResponse' :: DisassociateDRTRoleResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus