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