{-# 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.IoTWireless.DisassociateAwsAccountFromPartnerAccount
(
DisassociateAwsAccountFromPartnerAccount (..),
newDisassociateAwsAccountFromPartnerAccount,
disassociateAwsAccountFromPartnerAccount_partnerAccountId,
disassociateAwsAccountFromPartnerAccount_partnerType,
DisassociateAwsAccountFromPartnerAccountResponse (..),
newDisassociateAwsAccountFromPartnerAccountResponse,
disassociateAwsAccountFromPartnerAccountResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DisassociateAwsAccountFromPartnerAccount = DisassociateAwsAccountFromPartnerAccount'
{
DisassociateAwsAccountFromPartnerAccount -> Text
partnerAccountId :: Prelude.Text,
DisassociateAwsAccountFromPartnerAccount -> PartnerType
partnerType :: PartnerType
}
deriving (DisassociateAwsAccountFromPartnerAccount
-> DisassociateAwsAccountFromPartnerAccount -> Bool
(DisassociateAwsAccountFromPartnerAccount
-> DisassociateAwsAccountFromPartnerAccount -> Bool)
-> (DisassociateAwsAccountFromPartnerAccount
-> DisassociateAwsAccountFromPartnerAccount -> Bool)
-> Eq DisassociateAwsAccountFromPartnerAccount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateAwsAccountFromPartnerAccount
-> DisassociateAwsAccountFromPartnerAccount -> Bool
$c/= :: DisassociateAwsAccountFromPartnerAccount
-> DisassociateAwsAccountFromPartnerAccount -> Bool
== :: DisassociateAwsAccountFromPartnerAccount
-> DisassociateAwsAccountFromPartnerAccount -> Bool
$c== :: DisassociateAwsAccountFromPartnerAccount
-> DisassociateAwsAccountFromPartnerAccount -> Bool
Prelude.Eq, ReadPrec [DisassociateAwsAccountFromPartnerAccount]
ReadPrec DisassociateAwsAccountFromPartnerAccount
Int -> ReadS DisassociateAwsAccountFromPartnerAccount
ReadS [DisassociateAwsAccountFromPartnerAccount]
(Int -> ReadS DisassociateAwsAccountFromPartnerAccount)
-> ReadS [DisassociateAwsAccountFromPartnerAccount]
-> ReadPrec DisassociateAwsAccountFromPartnerAccount
-> ReadPrec [DisassociateAwsAccountFromPartnerAccount]
-> Read DisassociateAwsAccountFromPartnerAccount
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateAwsAccountFromPartnerAccount]
$creadListPrec :: ReadPrec [DisassociateAwsAccountFromPartnerAccount]
readPrec :: ReadPrec DisassociateAwsAccountFromPartnerAccount
$creadPrec :: ReadPrec DisassociateAwsAccountFromPartnerAccount
readList :: ReadS [DisassociateAwsAccountFromPartnerAccount]
$creadList :: ReadS [DisassociateAwsAccountFromPartnerAccount]
readsPrec :: Int -> ReadS DisassociateAwsAccountFromPartnerAccount
$creadsPrec :: Int -> ReadS DisassociateAwsAccountFromPartnerAccount
Prelude.Read, Int -> DisassociateAwsAccountFromPartnerAccount -> ShowS
[DisassociateAwsAccountFromPartnerAccount] -> ShowS
DisassociateAwsAccountFromPartnerAccount -> String
(Int -> DisassociateAwsAccountFromPartnerAccount -> ShowS)
-> (DisassociateAwsAccountFromPartnerAccount -> String)
-> ([DisassociateAwsAccountFromPartnerAccount] -> ShowS)
-> Show DisassociateAwsAccountFromPartnerAccount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateAwsAccountFromPartnerAccount] -> ShowS
$cshowList :: [DisassociateAwsAccountFromPartnerAccount] -> ShowS
show :: DisassociateAwsAccountFromPartnerAccount -> String
$cshow :: DisassociateAwsAccountFromPartnerAccount -> String
showsPrec :: Int -> DisassociateAwsAccountFromPartnerAccount -> ShowS
$cshowsPrec :: Int -> DisassociateAwsAccountFromPartnerAccount -> ShowS
Prelude.Show, (forall x.
DisassociateAwsAccountFromPartnerAccount
-> Rep DisassociateAwsAccountFromPartnerAccount x)
-> (forall x.
Rep DisassociateAwsAccountFromPartnerAccount x
-> DisassociateAwsAccountFromPartnerAccount)
-> Generic DisassociateAwsAccountFromPartnerAccount
forall x.
Rep DisassociateAwsAccountFromPartnerAccount x
-> DisassociateAwsAccountFromPartnerAccount
forall x.
DisassociateAwsAccountFromPartnerAccount
-> Rep DisassociateAwsAccountFromPartnerAccount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateAwsAccountFromPartnerAccount x
-> DisassociateAwsAccountFromPartnerAccount
$cfrom :: forall x.
DisassociateAwsAccountFromPartnerAccount
-> Rep DisassociateAwsAccountFromPartnerAccount x
Prelude.Generic)
newDisassociateAwsAccountFromPartnerAccount ::
Prelude.Text ->
PartnerType ->
DisassociateAwsAccountFromPartnerAccount
newDisassociateAwsAccountFromPartnerAccount :: Text -> PartnerType -> DisassociateAwsAccountFromPartnerAccount
newDisassociateAwsAccountFromPartnerAccount
Text
pPartnerAccountId_
PartnerType
pPartnerType_ =
DisassociateAwsAccountFromPartnerAccount' :: Text -> PartnerType -> DisassociateAwsAccountFromPartnerAccount
DisassociateAwsAccountFromPartnerAccount'
{ $sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: Text
partnerAccountId =
Text
pPartnerAccountId_,
$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: PartnerType
partnerType = PartnerType
pPartnerType_
}
disassociateAwsAccountFromPartnerAccount_partnerAccountId :: Lens.Lens' DisassociateAwsAccountFromPartnerAccount Prelude.Text
disassociateAwsAccountFromPartnerAccount_partnerAccountId :: (Text -> f Text)
-> DisassociateAwsAccountFromPartnerAccount
-> f DisassociateAwsAccountFromPartnerAccount
disassociateAwsAccountFromPartnerAccount_partnerAccountId = (DisassociateAwsAccountFromPartnerAccount -> Text)
-> (DisassociateAwsAccountFromPartnerAccount
-> Text -> DisassociateAwsAccountFromPartnerAccount)
-> Lens
DisassociateAwsAccountFromPartnerAccount
DisassociateAwsAccountFromPartnerAccount
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateAwsAccountFromPartnerAccount' {Text
partnerAccountId :: Text
$sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> Text
partnerAccountId} -> Text
partnerAccountId) (\s :: DisassociateAwsAccountFromPartnerAccount
s@DisassociateAwsAccountFromPartnerAccount' {} Text
a -> DisassociateAwsAccountFromPartnerAccount
s {$sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: Text
partnerAccountId = Text
a} :: DisassociateAwsAccountFromPartnerAccount)
disassociateAwsAccountFromPartnerAccount_partnerType :: Lens.Lens' DisassociateAwsAccountFromPartnerAccount PartnerType
disassociateAwsAccountFromPartnerAccount_partnerType :: (PartnerType -> f PartnerType)
-> DisassociateAwsAccountFromPartnerAccount
-> f DisassociateAwsAccountFromPartnerAccount
disassociateAwsAccountFromPartnerAccount_partnerType = (DisassociateAwsAccountFromPartnerAccount -> PartnerType)
-> (DisassociateAwsAccountFromPartnerAccount
-> PartnerType -> DisassociateAwsAccountFromPartnerAccount)
-> Lens
DisassociateAwsAccountFromPartnerAccount
DisassociateAwsAccountFromPartnerAccount
PartnerType
PartnerType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateAwsAccountFromPartnerAccount' {PartnerType
partnerType :: PartnerType
$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> PartnerType
partnerType} -> PartnerType
partnerType) (\s :: DisassociateAwsAccountFromPartnerAccount
s@DisassociateAwsAccountFromPartnerAccount' {} PartnerType
a -> DisassociateAwsAccountFromPartnerAccount
s {$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: PartnerType
partnerType = PartnerType
a} :: DisassociateAwsAccountFromPartnerAccount)
instance
Core.AWSRequest
DisassociateAwsAccountFromPartnerAccount
where
type
AWSResponse
DisassociateAwsAccountFromPartnerAccount =
DisassociateAwsAccountFromPartnerAccountResponse
request :: DisassociateAwsAccountFromPartnerAccount
-> Request DisassociateAwsAccountFromPartnerAccount
request = Service
-> DisassociateAwsAccountFromPartnerAccount
-> Request DisassociateAwsAccountFromPartnerAccount
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateAwsAccountFromPartnerAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateAwsAccountFromPartnerAccount)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either
String (AWSResponse DisassociateAwsAccountFromPartnerAccount))
-> Logger
-> Service
-> Proxy DisassociateAwsAccountFromPartnerAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateAwsAccountFromPartnerAccount)))
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 -> DisassociateAwsAccountFromPartnerAccountResponse
DisassociateAwsAccountFromPartnerAccountResponse'
(Int -> DisassociateAwsAccountFromPartnerAccountResponse)
-> Either String Int
-> Either String DisassociateAwsAccountFromPartnerAccountResponse
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
DisassociateAwsAccountFromPartnerAccount
instance
Prelude.NFData
DisassociateAwsAccountFromPartnerAccount
instance
Core.ToHeaders
DisassociateAwsAccountFromPartnerAccount
where
toHeaders :: DisassociateAwsAccountFromPartnerAccount -> ResponseHeaders
toHeaders = ResponseHeaders
-> DisassociateAwsAccountFromPartnerAccount -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
DisassociateAwsAccountFromPartnerAccount
where
toPath :: DisassociateAwsAccountFromPartnerAccount -> ByteString
toPath DisassociateAwsAccountFromPartnerAccount' {Text
PartnerType
partnerType :: PartnerType
partnerAccountId :: Text
$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> PartnerType
$sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/partner-accounts/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
partnerAccountId]
instance
Core.ToQuery
DisassociateAwsAccountFromPartnerAccount
where
toQuery :: DisassociateAwsAccountFromPartnerAccount -> QueryString
toQuery DisassociateAwsAccountFromPartnerAccount' {Text
PartnerType
partnerType :: PartnerType
partnerAccountId :: Text
$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> PartnerType
$sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"partnerType" ByteString -> PartnerType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: PartnerType
partnerType]
data DisassociateAwsAccountFromPartnerAccountResponse = DisassociateAwsAccountFromPartnerAccountResponse'
{
DisassociateAwsAccountFromPartnerAccountResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateAwsAccountFromPartnerAccountResponse
-> DisassociateAwsAccountFromPartnerAccountResponse -> Bool
(DisassociateAwsAccountFromPartnerAccountResponse
-> DisassociateAwsAccountFromPartnerAccountResponse -> Bool)
-> (DisassociateAwsAccountFromPartnerAccountResponse
-> DisassociateAwsAccountFromPartnerAccountResponse -> Bool)
-> Eq DisassociateAwsAccountFromPartnerAccountResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateAwsAccountFromPartnerAccountResponse
-> DisassociateAwsAccountFromPartnerAccountResponse -> Bool
$c/= :: DisassociateAwsAccountFromPartnerAccountResponse
-> DisassociateAwsAccountFromPartnerAccountResponse -> Bool
== :: DisassociateAwsAccountFromPartnerAccountResponse
-> DisassociateAwsAccountFromPartnerAccountResponse -> Bool
$c== :: DisassociateAwsAccountFromPartnerAccountResponse
-> DisassociateAwsAccountFromPartnerAccountResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateAwsAccountFromPartnerAccountResponse]
ReadPrec DisassociateAwsAccountFromPartnerAccountResponse
Int -> ReadS DisassociateAwsAccountFromPartnerAccountResponse
ReadS [DisassociateAwsAccountFromPartnerAccountResponse]
(Int -> ReadS DisassociateAwsAccountFromPartnerAccountResponse)
-> ReadS [DisassociateAwsAccountFromPartnerAccountResponse]
-> ReadPrec DisassociateAwsAccountFromPartnerAccountResponse
-> ReadPrec [DisassociateAwsAccountFromPartnerAccountResponse]
-> Read DisassociateAwsAccountFromPartnerAccountResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateAwsAccountFromPartnerAccountResponse]
$creadListPrec :: ReadPrec [DisassociateAwsAccountFromPartnerAccountResponse]
readPrec :: ReadPrec DisassociateAwsAccountFromPartnerAccountResponse
$creadPrec :: ReadPrec DisassociateAwsAccountFromPartnerAccountResponse
readList :: ReadS [DisassociateAwsAccountFromPartnerAccountResponse]
$creadList :: ReadS [DisassociateAwsAccountFromPartnerAccountResponse]
readsPrec :: Int -> ReadS DisassociateAwsAccountFromPartnerAccountResponse
$creadsPrec :: Int -> ReadS DisassociateAwsAccountFromPartnerAccountResponse
Prelude.Read, Int -> DisassociateAwsAccountFromPartnerAccountResponse -> ShowS
[DisassociateAwsAccountFromPartnerAccountResponse] -> ShowS
DisassociateAwsAccountFromPartnerAccountResponse -> String
(Int -> DisassociateAwsAccountFromPartnerAccountResponse -> ShowS)
-> (DisassociateAwsAccountFromPartnerAccountResponse -> String)
-> ([DisassociateAwsAccountFromPartnerAccountResponse] -> ShowS)
-> Show DisassociateAwsAccountFromPartnerAccountResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateAwsAccountFromPartnerAccountResponse] -> ShowS
$cshowList :: [DisassociateAwsAccountFromPartnerAccountResponse] -> ShowS
show :: DisassociateAwsAccountFromPartnerAccountResponse -> String
$cshow :: DisassociateAwsAccountFromPartnerAccountResponse -> String
showsPrec :: Int -> DisassociateAwsAccountFromPartnerAccountResponse -> ShowS
$cshowsPrec :: Int -> DisassociateAwsAccountFromPartnerAccountResponse -> ShowS
Prelude.Show, (forall x.
DisassociateAwsAccountFromPartnerAccountResponse
-> Rep DisassociateAwsAccountFromPartnerAccountResponse x)
-> (forall x.
Rep DisassociateAwsAccountFromPartnerAccountResponse x
-> DisassociateAwsAccountFromPartnerAccountResponse)
-> Generic DisassociateAwsAccountFromPartnerAccountResponse
forall x.
Rep DisassociateAwsAccountFromPartnerAccountResponse x
-> DisassociateAwsAccountFromPartnerAccountResponse
forall x.
DisassociateAwsAccountFromPartnerAccountResponse
-> Rep DisassociateAwsAccountFromPartnerAccountResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateAwsAccountFromPartnerAccountResponse x
-> DisassociateAwsAccountFromPartnerAccountResponse
$cfrom :: forall x.
DisassociateAwsAccountFromPartnerAccountResponse
-> Rep DisassociateAwsAccountFromPartnerAccountResponse x
Prelude.Generic)
newDisassociateAwsAccountFromPartnerAccountResponse ::
Prelude.Int ->
DisassociateAwsAccountFromPartnerAccountResponse
newDisassociateAwsAccountFromPartnerAccountResponse :: Int -> DisassociateAwsAccountFromPartnerAccountResponse
newDisassociateAwsAccountFromPartnerAccountResponse
Int
pHttpStatus_ =
DisassociateAwsAccountFromPartnerAccountResponse' :: Int -> DisassociateAwsAccountFromPartnerAccountResponse
DisassociateAwsAccountFromPartnerAccountResponse'
{ $sel:httpStatus:DisassociateAwsAccountFromPartnerAccountResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateAwsAccountFromPartnerAccountResponse_httpStatus :: Lens.Lens' DisassociateAwsAccountFromPartnerAccountResponse Prelude.Int
disassociateAwsAccountFromPartnerAccountResponse_httpStatus :: (Int -> f Int)
-> DisassociateAwsAccountFromPartnerAccountResponse
-> f DisassociateAwsAccountFromPartnerAccountResponse
disassociateAwsAccountFromPartnerAccountResponse_httpStatus = (DisassociateAwsAccountFromPartnerAccountResponse -> Int)
-> (DisassociateAwsAccountFromPartnerAccountResponse
-> Int -> DisassociateAwsAccountFromPartnerAccountResponse)
-> Lens
DisassociateAwsAccountFromPartnerAccountResponse
DisassociateAwsAccountFromPartnerAccountResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateAwsAccountFromPartnerAccountResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateAwsAccountFromPartnerAccountResponse' :: DisassociateAwsAccountFromPartnerAccountResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateAwsAccountFromPartnerAccountResponse
s@DisassociateAwsAccountFromPartnerAccountResponse' {} Int
a -> DisassociateAwsAccountFromPartnerAccountResponse
s {$sel:httpStatus:DisassociateAwsAccountFromPartnerAccountResponse' :: Int
httpStatus = Int
a} :: DisassociateAwsAccountFromPartnerAccountResponse)
instance
Prelude.NFData
DisassociateAwsAccountFromPartnerAccountResponse