{-# 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.Organizations.RemoveAccountFromOrganization
(
RemoveAccountFromOrganization (..),
newRemoveAccountFromOrganization,
removeAccountFromOrganization_accountId,
RemoveAccountFromOrganizationResponse (..),
newRemoveAccountFromOrganizationResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Organizations.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RemoveAccountFromOrganization = RemoveAccountFromOrganization'
{
RemoveAccountFromOrganization -> Text
accountId :: Prelude.Text
}
deriving (RemoveAccountFromOrganization
-> RemoveAccountFromOrganization -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveAccountFromOrganization
-> RemoveAccountFromOrganization -> Bool
$c/= :: RemoveAccountFromOrganization
-> RemoveAccountFromOrganization -> Bool
== :: RemoveAccountFromOrganization
-> RemoveAccountFromOrganization -> Bool
$c== :: RemoveAccountFromOrganization
-> RemoveAccountFromOrganization -> Bool
Prelude.Eq, ReadPrec [RemoveAccountFromOrganization]
ReadPrec RemoveAccountFromOrganization
Int -> ReadS RemoveAccountFromOrganization
ReadS [RemoveAccountFromOrganization]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveAccountFromOrganization]
$creadListPrec :: ReadPrec [RemoveAccountFromOrganization]
readPrec :: ReadPrec RemoveAccountFromOrganization
$creadPrec :: ReadPrec RemoveAccountFromOrganization
readList :: ReadS [RemoveAccountFromOrganization]
$creadList :: ReadS [RemoveAccountFromOrganization]
readsPrec :: Int -> ReadS RemoveAccountFromOrganization
$creadsPrec :: Int -> ReadS RemoveAccountFromOrganization
Prelude.Read, Int -> RemoveAccountFromOrganization -> ShowS
[RemoveAccountFromOrganization] -> ShowS
RemoveAccountFromOrganization -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveAccountFromOrganization] -> ShowS
$cshowList :: [RemoveAccountFromOrganization] -> ShowS
show :: RemoveAccountFromOrganization -> String
$cshow :: RemoveAccountFromOrganization -> String
showsPrec :: Int -> RemoveAccountFromOrganization -> ShowS
$cshowsPrec :: Int -> RemoveAccountFromOrganization -> ShowS
Prelude.Show, forall x.
Rep RemoveAccountFromOrganization x
-> RemoveAccountFromOrganization
forall x.
RemoveAccountFromOrganization
-> Rep RemoveAccountFromOrganization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveAccountFromOrganization x
-> RemoveAccountFromOrganization
$cfrom :: forall x.
RemoveAccountFromOrganization
-> Rep RemoveAccountFromOrganization x
Prelude.Generic)
newRemoveAccountFromOrganization ::
Prelude.Text ->
RemoveAccountFromOrganization
newRemoveAccountFromOrganization :: Text -> RemoveAccountFromOrganization
newRemoveAccountFromOrganization Text
pAccountId_ =
RemoveAccountFromOrganization'
{ $sel:accountId:RemoveAccountFromOrganization' :: Text
accountId =
Text
pAccountId_
}
removeAccountFromOrganization_accountId :: Lens.Lens' RemoveAccountFromOrganization Prelude.Text
removeAccountFromOrganization_accountId :: Lens' RemoveAccountFromOrganization Text
removeAccountFromOrganization_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveAccountFromOrganization' {Text
accountId :: Text
$sel:accountId:RemoveAccountFromOrganization' :: RemoveAccountFromOrganization -> Text
accountId} -> Text
accountId) (\s :: RemoveAccountFromOrganization
s@RemoveAccountFromOrganization' {} Text
a -> RemoveAccountFromOrganization
s {$sel:accountId:RemoveAccountFromOrganization' :: Text
accountId = Text
a} :: RemoveAccountFromOrganization)
instance
Core.AWSRequest
RemoveAccountFromOrganization
where
type
AWSResponse RemoveAccountFromOrganization =
RemoveAccountFromOrganizationResponse
request :: (Service -> Service)
-> RemoveAccountFromOrganization
-> Request RemoveAccountFromOrganization
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 RemoveAccountFromOrganization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveAccountFromOrganization)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
RemoveAccountFromOrganizationResponse
RemoveAccountFromOrganizationResponse'
instance
Prelude.Hashable
RemoveAccountFromOrganization
where
hashWithSalt :: Int -> RemoveAccountFromOrganization -> Int
hashWithSalt Int
_salt RemoveAccountFromOrganization' {Text
accountId :: Text
$sel:accountId:RemoveAccountFromOrganization' :: RemoveAccountFromOrganization -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
accountId
instance Prelude.NFData RemoveAccountFromOrganization where
rnf :: RemoveAccountFromOrganization -> ()
rnf RemoveAccountFromOrganization' {Text
accountId :: Text
$sel:accountId:RemoveAccountFromOrganization' :: RemoveAccountFromOrganization -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
accountId
instance Data.ToHeaders RemoveAccountFromOrganization where
toHeaders :: RemoveAccountFromOrganization -> [Header]
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 -> [Header]
Data.=# ( ByteString
"AWSOrganizationsV20161128.RemoveAccountFromOrganization" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON RemoveAccountFromOrganization where
toJSON :: RemoveAccountFromOrganization -> Value
toJSON RemoveAccountFromOrganization' {Text
accountId :: Text
$sel:accountId:RemoveAccountFromOrganization' :: RemoveAccountFromOrganization -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"AccountId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
accountId)]
)
instance Data.ToPath RemoveAccountFromOrganization where
toPath :: RemoveAccountFromOrganization -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery RemoveAccountFromOrganization where
toQuery :: RemoveAccountFromOrganization -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data RemoveAccountFromOrganizationResponse = RemoveAccountFromOrganizationResponse'
{
}
deriving (RemoveAccountFromOrganizationResponse
-> RemoveAccountFromOrganizationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveAccountFromOrganizationResponse
-> RemoveAccountFromOrganizationResponse -> Bool
$c/= :: RemoveAccountFromOrganizationResponse
-> RemoveAccountFromOrganizationResponse -> Bool
== :: RemoveAccountFromOrganizationResponse
-> RemoveAccountFromOrganizationResponse -> Bool
$c== :: RemoveAccountFromOrganizationResponse
-> RemoveAccountFromOrganizationResponse -> Bool
Prelude.Eq, ReadPrec [RemoveAccountFromOrganizationResponse]
ReadPrec RemoveAccountFromOrganizationResponse
Int -> ReadS RemoveAccountFromOrganizationResponse
ReadS [RemoveAccountFromOrganizationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveAccountFromOrganizationResponse]
$creadListPrec :: ReadPrec [RemoveAccountFromOrganizationResponse]
readPrec :: ReadPrec RemoveAccountFromOrganizationResponse
$creadPrec :: ReadPrec RemoveAccountFromOrganizationResponse
readList :: ReadS [RemoveAccountFromOrganizationResponse]
$creadList :: ReadS [RemoveAccountFromOrganizationResponse]
readsPrec :: Int -> ReadS RemoveAccountFromOrganizationResponse
$creadsPrec :: Int -> ReadS RemoveAccountFromOrganizationResponse
Prelude.Read, Int -> RemoveAccountFromOrganizationResponse -> ShowS
[RemoveAccountFromOrganizationResponse] -> ShowS
RemoveAccountFromOrganizationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveAccountFromOrganizationResponse] -> ShowS
$cshowList :: [RemoveAccountFromOrganizationResponse] -> ShowS
show :: RemoveAccountFromOrganizationResponse -> String
$cshow :: RemoveAccountFromOrganizationResponse -> String
showsPrec :: Int -> RemoveAccountFromOrganizationResponse -> ShowS
$cshowsPrec :: Int -> RemoveAccountFromOrganizationResponse -> ShowS
Prelude.Show, forall x.
Rep RemoveAccountFromOrganizationResponse x
-> RemoveAccountFromOrganizationResponse
forall x.
RemoveAccountFromOrganizationResponse
-> Rep RemoveAccountFromOrganizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveAccountFromOrganizationResponse x
-> RemoveAccountFromOrganizationResponse
$cfrom :: forall x.
RemoveAccountFromOrganizationResponse
-> Rep RemoveAccountFromOrganizationResponse x
Prelude.Generic)
newRemoveAccountFromOrganizationResponse ::
RemoveAccountFromOrganizationResponse
newRemoveAccountFromOrganizationResponse :: RemoveAccountFromOrganizationResponse
newRemoveAccountFromOrganizationResponse =
RemoveAccountFromOrganizationResponse
RemoveAccountFromOrganizationResponse'
instance
Prelude.NFData
RemoveAccountFromOrganizationResponse
where
rnf :: RemoveAccountFromOrganizationResponse -> ()
rnf RemoveAccountFromOrganizationResponse
_ = ()