{-# 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.DisassociateWirelessGatewayFromThing
(
DisassociateWirelessGatewayFromThing (..),
newDisassociateWirelessGatewayFromThing,
disassociateWirelessGatewayFromThing_id,
DisassociateWirelessGatewayFromThingResponse (..),
newDisassociateWirelessGatewayFromThingResponse,
disassociateWirelessGatewayFromThingResponse_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 DisassociateWirelessGatewayFromThing = DisassociateWirelessGatewayFromThing'
{
DisassociateWirelessGatewayFromThing -> Text
id :: Prelude.Text
}
deriving (DisassociateWirelessGatewayFromThing
-> DisassociateWirelessGatewayFromThing -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateWirelessGatewayFromThing
-> DisassociateWirelessGatewayFromThing -> Bool
$c/= :: DisassociateWirelessGatewayFromThing
-> DisassociateWirelessGatewayFromThing -> Bool
== :: DisassociateWirelessGatewayFromThing
-> DisassociateWirelessGatewayFromThing -> Bool
$c== :: DisassociateWirelessGatewayFromThing
-> DisassociateWirelessGatewayFromThing -> Bool
Prelude.Eq, ReadPrec [DisassociateWirelessGatewayFromThing]
ReadPrec DisassociateWirelessGatewayFromThing
Int -> ReadS DisassociateWirelessGatewayFromThing
ReadS [DisassociateWirelessGatewayFromThing]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateWirelessGatewayFromThing]
$creadListPrec :: ReadPrec [DisassociateWirelessGatewayFromThing]
readPrec :: ReadPrec DisassociateWirelessGatewayFromThing
$creadPrec :: ReadPrec DisassociateWirelessGatewayFromThing
readList :: ReadS [DisassociateWirelessGatewayFromThing]
$creadList :: ReadS [DisassociateWirelessGatewayFromThing]
readsPrec :: Int -> ReadS DisassociateWirelessGatewayFromThing
$creadsPrec :: Int -> ReadS DisassociateWirelessGatewayFromThing
Prelude.Read, Int -> DisassociateWirelessGatewayFromThing -> ShowS
[DisassociateWirelessGatewayFromThing] -> ShowS
DisassociateWirelessGatewayFromThing -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateWirelessGatewayFromThing] -> ShowS
$cshowList :: [DisassociateWirelessGatewayFromThing] -> ShowS
show :: DisassociateWirelessGatewayFromThing -> String
$cshow :: DisassociateWirelessGatewayFromThing -> String
showsPrec :: Int -> DisassociateWirelessGatewayFromThing -> ShowS
$cshowsPrec :: Int -> DisassociateWirelessGatewayFromThing -> ShowS
Prelude.Show, forall x.
Rep DisassociateWirelessGatewayFromThing x
-> DisassociateWirelessGatewayFromThing
forall x.
DisassociateWirelessGatewayFromThing
-> Rep DisassociateWirelessGatewayFromThing x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateWirelessGatewayFromThing x
-> DisassociateWirelessGatewayFromThing
$cfrom :: forall x.
DisassociateWirelessGatewayFromThing
-> Rep DisassociateWirelessGatewayFromThing x
Prelude.Generic)
newDisassociateWirelessGatewayFromThing ::
Prelude.Text ->
DisassociateWirelessGatewayFromThing
newDisassociateWirelessGatewayFromThing :: Text -> DisassociateWirelessGatewayFromThing
newDisassociateWirelessGatewayFromThing Text
pId_ =
DisassociateWirelessGatewayFromThing' {$sel:id:DisassociateWirelessGatewayFromThing' :: Text
id = Text
pId_}
disassociateWirelessGatewayFromThing_id :: Lens.Lens' DisassociateWirelessGatewayFromThing Prelude.Text
disassociateWirelessGatewayFromThing_id :: Lens' DisassociateWirelessGatewayFromThing Text
disassociateWirelessGatewayFromThing_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateWirelessGatewayFromThing' {Text
id :: Text
$sel:id:DisassociateWirelessGatewayFromThing' :: DisassociateWirelessGatewayFromThing -> Text
id} -> Text
id) (\s :: DisassociateWirelessGatewayFromThing
s@DisassociateWirelessGatewayFromThing' {} Text
a -> DisassociateWirelessGatewayFromThing
s {$sel:id:DisassociateWirelessGatewayFromThing' :: Text
id = Text
a} :: DisassociateWirelessGatewayFromThing)
instance
Core.AWSRequest
DisassociateWirelessGatewayFromThing
where
type
AWSResponse DisassociateWirelessGatewayFromThing =
DisassociateWirelessGatewayFromThingResponse
request :: (Service -> Service)
-> DisassociateWirelessGatewayFromThing
-> Request DisassociateWirelessGatewayFromThing
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 DisassociateWirelessGatewayFromThing
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateWirelessGatewayFromThing)))
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 -> DisassociateWirelessGatewayFromThingResponse
DisassociateWirelessGatewayFromThingResponse'
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
DisassociateWirelessGatewayFromThing
where
hashWithSalt :: Int -> DisassociateWirelessGatewayFromThing -> Int
hashWithSalt
Int
_salt
DisassociateWirelessGatewayFromThing' {Text
id :: Text
$sel:id:DisassociateWirelessGatewayFromThing' :: DisassociateWirelessGatewayFromThing -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
instance
Prelude.NFData
DisassociateWirelessGatewayFromThing
where
rnf :: DisassociateWirelessGatewayFromThing -> ()
rnf DisassociateWirelessGatewayFromThing' {Text
id :: Text
$sel:id:DisassociateWirelessGatewayFromThing' :: DisassociateWirelessGatewayFromThing -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
id
instance
Data.ToHeaders
DisassociateWirelessGatewayFromThing
where
toHeaders :: DisassociateWirelessGatewayFromThing -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance
Data.ToPath
DisassociateWirelessGatewayFromThing
where
toPath :: DisassociateWirelessGatewayFromThing -> ByteString
toPath DisassociateWirelessGatewayFromThing' {Text
id :: Text
$sel:id:DisassociateWirelessGatewayFromThing' :: DisassociateWirelessGatewayFromThing -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/wireless-gateways/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
id, ByteString
"/thing"]
instance
Data.ToQuery
DisassociateWirelessGatewayFromThing
where
toQuery :: DisassociateWirelessGatewayFromThing -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DisassociateWirelessGatewayFromThingResponse = DisassociateWirelessGatewayFromThingResponse'
{
DisassociateWirelessGatewayFromThingResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateWirelessGatewayFromThingResponse
-> DisassociateWirelessGatewayFromThingResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateWirelessGatewayFromThingResponse
-> DisassociateWirelessGatewayFromThingResponse -> Bool
$c/= :: DisassociateWirelessGatewayFromThingResponse
-> DisassociateWirelessGatewayFromThingResponse -> Bool
== :: DisassociateWirelessGatewayFromThingResponse
-> DisassociateWirelessGatewayFromThingResponse -> Bool
$c== :: DisassociateWirelessGatewayFromThingResponse
-> DisassociateWirelessGatewayFromThingResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateWirelessGatewayFromThingResponse]
ReadPrec DisassociateWirelessGatewayFromThingResponse
Int -> ReadS DisassociateWirelessGatewayFromThingResponse
ReadS [DisassociateWirelessGatewayFromThingResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateWirelessGatewayFromThingResponse]
$creadListPrec :: ReadPrec [DisassociateWirelessGatewayFromThingResponse]
readPrec :: ReadPrec DisassociateWirelessGatewayFromThingResponse
$creadPrec :: ReadPrec DisassociateWirelessGatewayFromThingResponse
readList :: ReadS [DisassociateWirelessGatewayFromThingResponse]
$creadList :: ReadS [DisassociateWirelessGatewayFromThingResponse]
readsPrec :: Int -> ReadS DisassociateWirelessGatewayFromThingResponse
$creadsPrec :: Int -> ReadS DisassociateWirelessGatewayFromThingResponse
Prelude.Read, Int -> DisassociateWirelessGatewayFromThingResponse -> ShowS
[DisassociateWirelessGatewayFromThingResponse] -> ShowS
DisassociateWirelessGatewayFromThingResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateWirelessGatewayFromThingResponse] -> ShowS
$cshowList :: [DisassociateWirelessGatewayFromThingResponse] -> ShowS
show :: DisassociateWirelessGatewayFromThingResponse -> String
$cshow :: DisassociateWirelessGatewayFromThingResponse -> String
showsPrec :: Int -> DisassociateWirelessGatewayFromThingResponse -> ShowS
$cshowsPrec :: Int -> DisassociateWirelessGatewayFromThingResponse -> ShowS
Prelude.Show, forall x.
Rep DisassociateWirelessGatewayFromThingResponse x
-> DisassociateWirelessGatewayFromThingResponse
forall x.
DisassociateWirelessGatewayFromThingResponse
-> Rep DisassociateWirelessGatewayFromThingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateWirelessGatewayFromThingResponse x
-> DisassociateWirelessGatewayFromThingResponse
$cfrom :: forall x.
DisassociateWirelessGatewayFromThingResponse
-> Rep DisassociateWirelessGatewayFromThingResponse x
Prelude.Generic)
newDisassociateWirelessGatewayFromThingResponse ::
Prelude.Int ->
DisassociateWirelessGatewayFromThingResponse
newDisassociateWirelessGatewayFromThingResponse :: Int -> DisassociateWirelessGatewayFromThingResponse
newDisassociateWirelessGatewayFromThingResponse
Int
pHttpStatus_ =
DisassociateWirelessGatewayFromThingResponse'
{ $sel:httpStatus:DisassociateWirelessGatewayFromThingResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateWirelessGatewayFromThingResponse_httpStatus :: Lens.Lens' DisassociateWirelessGatewayFromThingResponse Prelude.Int
disassociateWirelessGatewayFromThingResponse_httpStatus :: Lens' DisassociateWirelessGatewayFromThingResponse Int
disassociateWirelessGatewayFromThingResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateWirelessGatewayFromThingResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateWirelessGatewayFromThingResponse' :: DisassociateWirelessGatewayFromThingResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateWirelessGatewayFromThingResponse
s@DisassociateWirelessGatewayFromThingResponse' {} Int
a -> DisassociateWirelessGatewayFromThingResponse
s {$sel:httpStatus:DisassociateWirelessGatewayFromThingResponse' :: Int
httpStatus = Int
a} :: DisassociateWirelessGatewayFromThingResponse)
instance
Prelude.NFData
DisassociateWirelessGatewayFromThingResponse
where
rnf :: DisassociateWirelessGatewayFromThingResponse -> ()
rnf DisassociateWirelessGatewayFromThingResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateWirelessGatewayFromThingResponse' :: DisassociateWirelessGatewayFromThingResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus