{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTWireless.Types
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
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]
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
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.
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'
{ $sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: Text
partnerAccountId =
Text
pPartnerAccountId_,
$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: PartnerType
partnerType = PartnerType
pPartnerType_
}
disassociateAwsAccountFromPartnerAccount_partnerAccountId :: Lens.Lens' DisassociateAwsAccountFromPartnerAccount Prelude.Text
disassociateAwsAccountFromPartnerAccount_partnerAccountId :: Lens' DisassociateAwsAccountFromPartnerAccount Text
disassociateAwsAccountFromPartnerAccount_partnerAccountId = 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 :: Lens' DisassociateAwsAccountFromPartnerAccount PartnerType
disassociateAwsAccountFromPartnerAccount_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 :: (Service -> Service)
-> DisassociateAwsAccountFromPartnerAccount
-> Request DisassociateAwsAccountFromPartnerAccount
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 DisassociateAwsAccountFromPartnerAccount
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateAwsAccountFromPartnerAccount)))
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 -> DisassociateAwsAccountFromPartnerAccountResponse
DisassociateAwsAccountFromPartnerAccountResponse'
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
DisassociateAwsAccountFromPartnerAccount
where
hashWithSalt :: Int -> DisassociateAwsAccountFromPartnerAccount -> Int
hashWithSalt
Int
_salt
DisassociateAwsAccountFromPartnerAccount' {Text
PartnerType
partnerType :: PartnerType
partnerAccountId :: Text
$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> PartnerType
$sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
partnerAccountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` PartnerType
partnerType
instance
Prelude.NFData
DisassociateAwsAccountFromPartnerAccount
where
rnf :: DisassociateAwsAccountFromPartnerAccount -> ()
rnf DisassociateAwsAccountFromPartnerAccount' {Text
PartnerType
partnerType :: PartnerType
partnerAccountId :: Text
$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> PartnerType
$sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
partnerAccountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf PartnerType
partnerType
instance
Data.ToHeaders
DisassociateAwsAccountFromPartnerAccount
where
toHeaders :: DisassociateAwsAccountFromPartnerAccount -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance
Data.ToPath
DisassociateAwsAccountFromPartnerAccount
where
toPath :: DisassociateAwsAccountFromPartnerAccount -> ByteString
toPath DisassociateAwsAccountFromPartnerAccount' {Text
PartnerType
partnerType :: PartnerType
partnerAccountId :: Text
$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> PartnerType
$sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/partner-accounts/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
partnerAccountId]
instance
Data.ToQuery
DisassociateAwsAccountFromPartnerAccount
where
toQuery :: DisassociateAwsAccountFromPartnerAccount -> QueryString
toQuery DisassociateAwsAccountFromPartnerAccount' {Text
PartnerType
partnerType :: PartnerType
partnerAccountId :: Text
$sel:partnerType:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> PartnerType
$sel:partnerAccountId:DisassociateAwsAccountFromPartnerAccount' :: DisassociateAwsAccountFromPartnerAccount -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"partnerType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: PartnerType
partnerType]
data DisassociateAwsAccountFromPartnerAccountResponse = DisassociateAwsAccountFromPartnerAccountResponse'
{
DisassociateAwsAccountFromPartnerAccountResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateAwsAccountFromPartnerAccountResponse
-> DisassociateAwsAccountFromPartnerAccountResponse -> Bool
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]
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
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.
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'
{ $sel:httpStatus:DisassociateAwsAccountFromPartnerAccountResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateAwsAccountFromPartnerAccountResponse_httpStatus :: Lens.Lens' DisassociateAwsAccountFromPartnerAccountResponse Prelude.Int
disassociateAwsAccountFromPartnerAccountResponse_httpStatus :: Lens' DisassociateAwsAccountFromPartnerAccountResponse Int
disassociateAwsAccountFromPartnerAccountResponse_httpStatus = 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
where
rnf :: DisassociateAwsAccountFromPartnerAccountResponse -> ()
rnf
DisassociateAwsAccountFromPartnerAccountResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateAwsAccountFromPartnerAccountResponse' :: DisassociateAwsAccountFromPartnerAccountResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus