{-# 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.SecurityHub.DisassociateFromAdministratorAccount
(
DisassociateFromAdministratorAccount (..),
newDisassociateFromAdministratorAccount,
DisassociateFromAdministratorAccountResponse (..),
newDisassociateFromAdministratorAccountResponse,
disassociateFromAdministratorAccountResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SecurityHub.Types
data DisassociateFromAdministratorAccount = DisassociateFromAdministratorAccount'
{
}
deriving (DisassociateFromAdministratorAccount
-> DisassociateFromAdministratorAccount -> Bool
(DisassociateFromAdministratorAccount
-> DisassociateFromAdministratorAccount -> Bool)
-> (DisassociateFromAdministratorAccount
-> DisassociateFromAdministratorAccount -> Bool)
-> Eq DisassociateFromAdministratorAccount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateFromAdministratorAccount
-> DisassociateFromAdministratorAccount -> Bool
$c/= :: DisassociateFromAdministratorAccount
-> DisassociateFromAdministratorAccount -> Bool
== :: DisassociateFromAdministratorAccount
-> DisassociateFromAdministratorAccount -> Bool
$c== :: DisassociateFromAdministratorAccount
-> DisassociateFromAdministratorAccount -> Bool
Prelude.Eq, ReadPrec [DisassociateFromAdministratorAccount]
ReadPrec DisassociateFromAdministratorAccount
Int -> ReadS DisassociateFromAdministratorAccount
ReadS [DisassociateFromAdministratorAccount]
(Int -> ReadS DisassociateFromAdministratorAccount)
-> ReadS [DisassociateFromAdministratorAccount]
-> ReadPrec DisassociateFromAdministratorAccount
-> ReadPrec [DisassociateFromAdministratorAccount]
-> Read DisassociateFromAdministratorAccount
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateFromAdministratorAccount]
$creadListPrec :: ReadPrec [DisassociateFromAdministratorAccount]
readPrec :: ReadPrec DisassociateFromAdministratorAccount
$creadPrec :: ReadPrec DisassociateFromAdministratorAccount
readList :: ReadS [DisassociateFromAdministratorAccount]
$creadList :: ReadS [DisassociateFromAdministratorAccount]
readsPrec :: Int -> ReadS DisassociateFromAdministratorAccount
$creadsPrec :: Int -> ReadS DisassociateFromAdministratorAccount
Prelude.Read, Int -> DisassociateFromAdministratorAccount -> ShowS
[DisassociateFromAdministratorAccount] -> ShowS
DisassociateFromAdministratorAccount -> String
(Int -> DisassociateFromAdministratorAccount -> ShowS)
-> (DisassociateFromAdministratorAccount -> String)
-> ([DisassociateFromAdministratorAccount] -> ShowS)
-> Show DisassociateFromAdministratorAccount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateFromAdministratorAccount] -> ShowS
$cshowList :: [DisassociateFromAdministratorAccount] -> ShowS
show :: DisassociateFromAdministratorAccount -> String
$cshow :: DisassociateFromAdministratorAccount -> String
showsPrec :: Int -> DisassociateFromAdministratorAccount -> ShowS
$cshowsPrec :: Int -> DisassociateFromAdministratorAccount -> ShowS
Prelude.Show, (forall x.
DisassociateFromAdministratorAccount
-> Rep DisassociateFromAdministratorAccount x)
-> (forall x.
Rep DisassociateFromAdministratorAccount x
-> DisassociateFromAdministratorAccount)
-> Generic DisassociateFromAdministratorAccount
forall x.
Rep DisassociateFromAdministratorAccount x
-> DisassociateFromAdministratorAccount
forall x.
DisassociateFromAdministratorAccount
-> Rep DisassociateFromAdministratorAccount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateFromAdministratorAccount x
-> DisassociateFromAdministratorAccount
$cfrom :: forall x.
DisassociateFromAdministratorAccount
-> Rep DisassociateFromAdministratorAccount x
Prelude.Generic)
newDisassociateFromAdministratorAccount ::
DisassociateFromAdministratorAccount
newDisassociateFromAdministratorAccount :: DisassociateFromAdministratorAccount
newDisassociateFromAdministratorAccount =
DisassociateFromAdministratorAccount
DisassociateFromAdministratorAccount'
instance
Core.AWSRequest
DisassociateFromAdministratorAccount
where
type
AWSResponse DisassociateFromAdministratorAccount =
DisassociateFromAdministratorAccountResponse
request :: DisassociateFromAdministratorAccount
-> Request DisassociateFromAdministratorAccount
request = Service
-> DisassociateFromAdministratorAccount
-> Request DisassociateFromAdministratorAccount
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateFromAdministratorAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateFromAdministratorAccount)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either
String (AWSResponse DisassociateFromAdministratorAccount))
-> Logger
-> Service
-> Proxy DisassociateFromAdministratorAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateFromAdministratorAccount)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateFromAdministratorAccountResponse
DisassociateFromAdministratorAccountResponse'
(Int -> DisassociateFromAdministratorAccountResponse)
-> Either String Int
-> Either String DisassociateFromAdministratorAccountResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DisassociateFromAdministratorAccount
instance
Prelude.NFData
DisassociateFromAdministratorAccount
instance
Core.ToHeaders
DisassociateFromAdministratorAccount
where
toHeaders :: DisassociateFromAdministratorAccount -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DisassociateFromAdministratorAccount -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Core.ToJSON
DisassociateFromAdministratorAccount
where
toJSON :: DisassociateFromAdministratorAccount -> Value
toJSON = Value -> DisassociateFromAdministratorAccount -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance
Core.ToPath
DisassociateFromAdministratorAccount
where
toPath :: DisassociateFromAdministratorAccount -> ByteString
toPath = ByteString -> DisassociateFromAdministratorAccount -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/administrator/disassociate"
instance
Core.ToQuery
DisassociateFromAdministratorAccount
where
toQuery :: DisassociateFromAdministratorAccount -> QueryString
toQuery = QueryString -> DisassociateFromAdministratorAccount -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateFromAdministratorAccountResponse = DisassociateFromAdministratorAccountResponse'
{
DisassociateFromAdministratorAccountResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateFromAdministratorAccountResponse
-> DisassociateFromAdministratorAccountResponse -> Bool
(DisassociateFromAdministratorAccountResponse
-> DisassociateFromAdministratorAccountResponse -> Bool)
-> (DisassociateFromAdministratorAccountResponse
-> DisassociateFromAdministratorAccountResponse -> Bool)
-> Eq DisassociateFromAdministratorAccountResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateFromAdministratorAccountResponse
-> DisassociateFromAdministratorAccountResponse -> Bool
$c/= :: DisassociateFromAdministratorAccountResponse
-> DisassociateFromAdministratorAccountResponse -> Bool
== :: DisassociateFromAdministratorAccountResponse
-> DisassociateFromAdministratorAccountResponse -> Bool
$c== :: DisassociateFromAdministratorAccountResponse
-> DisassociateFromAdministratorAccountResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateFromAdministratorAccountResponse]
ReadPrec DisassociateFromAdministratorAccountResponse
Int -> ReadS DisassociateFromAdministratorAccountResponse
ReadS [DisassociateFromAdministratorAccountResponse]
(Int -> ReadS DisassociateFromAdministratorAccountResponse)
-> ReadS [DisassociateFromAdministratorAccountResponse]
-> ReadPrec DisassociateFromAdministratorAccountResponse
-> ReadPrec [DisassociateFromAdministratorAccountResponse]
-> Read DisassociateFromAdministratorAccountResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateFromAdministratorAccountResponse]
$creadListPrec :: ReadPrec [DisassociateFromAdministratorAccountResponse]
readPrec :: ReadPrec DisassociateFromAdministratorAccountResponse
$creadPrec :: ReadPrec DisassociateFromAdministratorAccountResponse
readList :: ReadS [DisassociateFromAdministratorAccountResponse]
$creadList :: ReadS [DisassociateFromAdministratorAccountResponse]
readsPrec :: Int -> ReadS DisassociateFromAdministratorAccountResponse
$creadsPrec :: Int -> ReadS DisassociateFromAdministratorAccountResponse
Prelude.Read, Int -> DisassociateFromAdministratorAccountResponse -> ShowS
[DisassociateFromAdministratorAccountResponse] -> ShowS
DisassociateFromAdministratorAccountResponse -> String
(Int -> DisassociateFromAdministratorAccountResponse -> ShowS)
-> (DisassociateFromAdministratorAccountResponse -> String)
-> ([DisassociateFromAdministratorAccountResponse] -> ShowS)
-> Show DisassociateFromAdministratorAccountResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateFromAdministratorAccountResponse] -> ShowS
$cshowList :: [DisassociateFromAdministratorAccountResponse] -> ShowS
show :: DisassociateFromAdministratorAccountResponse -> String
$cshow :: DisassociateFromAdministratorAccountResponse -> String
showsPrec :: Int -> DisassociateFromAdministratorAccountResponse -> ShowS
$cshowsPrec :: Int -> DisassociateFromAdministratorAccountResponse -> ShowS
Prelude.Show, (forall x.
DisassociateFromAdministratorAccountResponse
-> Rep DisassociateFromAdministratorAccountResponse x)
-> (forall x.
Rep DisassociateFromAdministratorAccountResponse x
-> DisassociateFromAdministratorAccountResponse)
-> Generic DisassociateFromAdministratorAccountResponse
forall x.
Rep DisassociateFromAdministratorAccountResponse x
-> DisassociateFromAdministratorAccountResponse
forall x.
DisassociateFromAdministratorAccountResponse
-> Rep DisassociateFromAdministratorAccountResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateFromAdministratorAccountResponse x
-> DisassociateFromAdministratorAccountResponse
$cfrom :: forall x.
DisassociateFromAdministratorAccountResponse
-> Rep DisassociateFromAdministratorAccountResponse x
Prelude.Generic)
newDisassociateFromAdministratorAccountResponse ::
Prelude.Int ->
DisassociateFromAdministratorAccountResponse
newDisassociateFromAdministratorAccountResponse :: Int -> DisassociateFromAdministratorAccountResponse
newDisassociateFromAdministratorAccountResponse
Int
pHttpStatus_ =
DisassociateFromAdministratorAccountResponse' :: Int -> DisassociateFromAdministratorAccountResponse
DisassociateFromAdministratorAccountResponse'
{ $sel:httpStatus:DisassociateFromAdministratorAccountResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateFromAdministratorAccountResponse_httpStatus :: Lens.Lens' DisassociateFromAdministratorAccountResponse Prelude.Int
disassociateFromAdministratorAccountResponse_httpStatus :: (Int -> f Int)
-> DisassociateFromAdministratorAccountResponse
-> f DisassociateFromAdministratorAccountResponse
disassociateFromAdministratorAccountResponse_httpStatus = (DisassociateFromAdministratorAccountResponse -> Int)
-> (DisassociateFromAdministratorAccountResponse
-> Int -> DisassociateFromAdministratorAccountResponse)
-> Lens
DisassociateFromAdministratorAccountResponse
DisassociateFromAdministratorAccountResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateFromAdministratorAccountResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateFromAdministratorAccountResponse' :: DisassociateFromAdministratorAccountResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateFromAdministratorAccountResponse
s@DisassociateFromAdministratorAccountResponse' {} Int
a -> DisassociateFromAdministratorAccountResponse
s {$sel:httpStatus:DisassociateFromAdministratorAccountResponse' :: Int
httpStatus = Int
a} :: DisassociateFromAdministratorAccountResponse)
instance
Prelude.NFData
DisassociateFromAdministratorAccountResponse