{-# 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.MacieV2.DisableMacie
(
DisableMacie (..),
newDisableMacie,
DisableMacieResponse (..),
newDisableMacieResponse,
disableMacieResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MacieV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DisableMacie = DisableMacie'
{
}
deriving (DisableMacie -> DisableMacie -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableMacie -> DisableMacie -> Bool
$c/= :: DisableMacie -> DisableMacie -> Bool
== :: DisableMacie -> DisableMacie -> Bool
$c== :: DisableMacie -> DisableMacie -> Bool
Prelude.Eq, ReadPrec [DisableMacie]
ReadPrec DisableMacie
Int -> ReadS DisableMacie
ReadS [DisableMacie]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableMacie]
$creadListPrec :: ReadPrec [DisableMacie]
readPrec :: ReadPrec DisableMacie
$creadPrec :: ReadPrec DisableMacie
readList :: ReadS [DisableMacie]
$creadList :: ReadS [DisableMacie]
readsPrec :: Int -> ReadS DisableMacie
$creadsPrec :: Int -> ReadS DisableMacie
Prelude.Read, Int -> DisableMacie -> ShowS
[DisableMacie] -> ShowS
DisableMacie -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableMacie] -> ShowS
$cshowList :: [DisableMacie] -> ShowS
show :: DisableMacie -> String
$cshow :: DisableMacie -> String
showsPrec :: Int -> DisableMacie -> ShowS
$cshowsPrec :: Int -> DisableMacie -> ShowS
Prelude.Show, forall x. Rep DisableMacie x -> DisableMacie
forall x. DisableMacie -> Rep DisableMacie x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisableMacie x -> DisableMacie
$cfrom :: forall x. DisableMacie -> Rep DisableMacie x
Prelude.Generic)
newDisableMacie ::
DisableMacie
newDisableMacie :: DisableMacie
newDisableMacie = DisableMacie
DisableMacie'
instance Core.AWSRequest DisableMacie where
type AWSResponse DisableMacie = DisableMacieResponse
request :: (Service -> Service) -> DisableMacie -> Request DisableMacie
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DisableMacie
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DisableMacie)))
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 -> DisableMacieResponse
DisableMacieResponse'
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 DisableMacie where
hashWithSalt :: Int -> DisableMacie -> Int
hashWithSalt Int
_salt DisableMacie
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance Prelude.NFData DisableMacie where
rnf :: DisableMacie -> ()
rnf DisableMacie
_ = ()
instance Data.ToHeaders DisableMacie where
toHeaders :: DisableMacie -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DisableMacie where
toPath :: DisableMacie -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/macie"
instance Data.ToQuery DisableMacie where
toQuery :: DisableMacie -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DisableMacieResponse = DisableMacieResponse'
{
DisableMacieResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisableMacieResponse -> DisableMacieResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableMacieResponse -> DisableMacieResponse -> Bool
$c/= :: DisableMacieResponse -> DisableMacieResponse -> Bool
== :: DisableMacieResponse -> DisableMacieResponse -> Bool
$c== :: DisableMacieResponse -> DisableMacieResponse -> Bool
Prelude.Eq, ReadPrec [DisableMacieResponse]
ReadPrec DisableMacieResponse
Int -> ReadS DisableMacieResponse
ReadS [DisableMacieResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableMacieResponse]
$creadListPrec :: ReadPrec [DisableMacieResponse]
readPrec :: ReadPrec DisableMacieResponse
$creadPrec :: ReadPrec DisableMacieResponse
readList :: ReadS [DisableMacieResponse]
$creadList :: ReadS [DisableMacieResponse]
readsPrec :: Int -> ReadS DisableMacieResponse
$creadsPrec :: Int -> ReadS DisableMacieResponse
Prelude.Read, Int -> DisableMacieResponse -> ShowS
[DisableMacieResponse] -> ShowS
DisableMacieResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableMacieResponse] -> ShowS
$cshowList :: [DisableMacieResponse] -> ShowS
show :: DisableMacieResponse -> String
$cshow :: DisableMacieResponse -> String
showsPrec :: Int -> DisableMacieResponse -> ShowS
$cshowsPrec :: Int -> DisableMacieResponse -> ShowS
Prelude.Show, forall x. Rep DisableMacieResponse x -> DisableMacieResponse
forall x. DisableMacieResponse -> Rep DisableMacieResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisableMacieResponse x -> DisableMacieResponse
$cfrom :: forall x. DisableMacieResponse -> Rep DisableMacieResponse x
Prelude.Generic)
newDisableMacieResponse ::
Prelude.Int ->
DisableMacieResponse
newDisableMacieResponse :: Int -> DisableMacieResponse
newDisableMacieResponse Int
pHttpStatus_ =
DisableMacieResponse' {$sel:httpStatus:DisableMacieResponse' :: Int
httpStatus = Int
pHttpStatus_}
disableMacieResponse_httpStatus :: Lens.Lens' DisableMacieResponse Prelude.Int
disableMacieResponse_httpStatus :: Lens' DisableMacieResponse Int
disableMacieResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableMacieResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisableMacieResponse' :: DisableMacieResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisableMacieResponse
s@DisableMacieResponse' {} Int
a -> DisableMacieResponse
s {$sel:httpStatus:DisableMacieResponse' :: Int
httpStatus = Int
a} :: DisableMacieResponse)
instance Prelude.NFData DisableMacieResponse where
rnf :: DisableMacieResponse -> ()
rnf DisableMacieResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisableMacieResponse' :: DisableMacieResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus