{-# 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 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 DisassociateWirelessGatewayFromThing = DisassociateWirelessGatewayFromThing'
{
DisassociateWirelessGatewayFromThing -> Text
id :: Prelude.Text
}
deriving (DisassociateWirelessGatewayFromThing
-> DisassociateWirelessGatewayFromThing -> Bool
(DisassociateWirelessGatewayFromThing
-> DisassociateWirelessGatewayFromThing -> Bool)
-> (DisassociateWirelessGatewayFromThing
-> DisassociateWirelessGatewayFromThing -> Bool)
-> Eq DisassociateWirelessGatewayFromThing
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]
(Int -> ReadS DisassociateWirelessGatewayFromThing)
-> ReadS [DisassociateWirelessGatewayFromThing]
-> ReadPrec DisassociateWirelessGatewayFromThing
-> ReadPrec [DisassociateWirelessGatewayFromThing]
-> Read 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
(Int -> DisassociateWirelessGatewayFromThing -> ShowS)
-> (DisassociateWirelessGatewayFromThing -> String)
-> ([DisassociateWirelessGatewayFromThing] -> ShowS)
-> Show DisassociateWirelessGatewayFromThing
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.
DisassociateWirelessGatewayFromThing
-> Rep DisassociateWirelessGatewayFromThing x)
-> (forall x.
Rep DisassociateWirelessGatewayFromThing x
-> DisassociateWirelessGatewayFromThing)
-> Generic DisassociateWirelessGatewayFromThing
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' :: Text -> DisassociateWirelessGatewayFromThing
DisassociateWirelessGatewayFromThing' {$sel:id:DisassociateWirelessGatewayFromThing' :: Text
id = Text
pId_}
disassociateWirelessGatewayFromThing_id :: Lens.Lens' DisassociateWirelessGatewayFromThing Prelude.Text
disassociateWirelessGatewayFromThing_id :: (Text -> f Text)
-> DisassociateWirelessGatewayFromThing
-> f DisassociateWirelessGatewayFromThing
disassociateWirelessGatewayFromThing_id = (DisassociateWirelessGatewayFromThing -> Text)
-> (DisassociateWirelessGatewayFromThing
-> Text -> DisassociateWirelessGatewayFromThing)
-> Lens
DisassociateWirelessGatewayFromThing
DisassociateWirelessGatewayFromThing
Text
Text
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 :: DisassociateWirelessGatewayFromThing
-> Request DisassociateWirelessGatewayFromThing
request = Service
-> DisassociateWirelessGatewayFromThing
-> Request DisassociateWirelessGatewayFromThing
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateWirelessGatewayFromThing
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateWirelessGatewayFromThing)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either
String (AWSResponse DisassociateWirelessGatewayFromThing))
-> Logger
-> Service
-> Proxy DisassociateWirelessGatewayFromThing
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateWirelessGatewayFromThing)))
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 -> DisassociateWirelessGatewayFromThingResponse
DisassociateWirelessGatewayFromThingResponse'
(Int -> DisassociateWirelessGatewayFromThingResponse)
-> Either String Int
-> Either String DisassociateWirelessGatewayFromThingResponse
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
DisassociateWirelessGatewayFromThing
instance
Prelude.NFData
DisassociateWirelessGatewayFromThing
instance
Core.ToHeaders
DisassociateWirelessGatewayFromThing
where
toHeaders :: DisassociateWirelessGatewayFromThing -> ResponseHeaders
toHeaders = ResponseHeaders
-> DisassociateWirelessGatewayFromThing -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
DisassociateWirelessGatewayFromThing
where
toPath :: DisassociateWirelessGatewayFromThing -> ByteString
toPath DisassociateWirelessGatewayFromThing' {Text
id :: Text
$sel:id:DisassociateWirelessGatewayFromThing' :: DisassociateWirelessGatewayFromThing -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/wireless-gateways/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id, ByteString
"/thing"]
instance
Core.ToQuery
DisassociateWirelessGatewayFromThing
where
toQuery :: DisassociateWirelessGatewayFromThing -> QueryString
toQuery = QueryString -> DisassociateWirelessGatewayFromThing -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateWirelessGatewayFromThingResponse = DisassociateWirelessGatewayFromThingResponse'
{
DisassociateWirelessGatewayFromThingResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateWirelessGatewayFromThingResponse
-> DisassociateWirelessGatewayFromThingResponse -> Bool
(DisassociateWirelessGatewayFromThingResponse
-> DisassociateWirelessGatewayFromThingResponse -> Bool)
-> (DisassociateWirelessGatewayFromThingResponse
-> DisassociateWirelessGatewayFromThingResponse -> Bool)
-> Eq DisassociateWirelessGatewayFromThingResponse
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]
(Int -> ReadS DisassociateWirelessGatewayFromThingResponse)
-> ReadS [DisassociateWirelessGatewayFromThingResponse]
-> ReadPrec DisassociateWirelessGatewayFromThingResponse
-> ReadPrec [DisassociateWirelessGatewayFromThingResponse]
-> Read 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
(Int -> DisassociateWirelessGatewayFromThingResponse -> ShowS)
-> (DisassociateWirelessGatewayFromThingResponse -> String)
-> ([DisassociateWirelessGatewayFromThingResponse] -> ShowS)
-> Show DisassociateWirelessGatewayFromThingResponse
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.
DisassociateWirelessGatewayFromThingResponse
-> Rep DisassociateWirelessGatewayFromThingResponse x)
-> (forall x.
Rep DisassociateWirelessGatewayFromThingResponse x
-> DisassociateWirelessGatewayFromThingResponse)
-> Generic DisassociateWirelessGatewayFromThingResponse
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' :: Int -> DisassociateWirelessGatewayFromThingResponse
DisassociateWirelessGatewayFromThingResponse'
{ $sel:httpStatus:DisassociateWirelessGatewayFromThingResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateWirelessGatewayFromThingResponse_httpStatus :: Lens.Lens' DisassociateWirelessGatewayFromThingResponse Prelude.Int
disassociateWirelessGatewayFromThingResponse_httpStatus :: (Int -> f Int)
-> DisassociateWirelessGatewayFromThingResponse
-> f DisassociateWirelessGatewayFromThingResponse
disassociateWirelessGatewayFromThingResponse_httpStatus = (DisassociateWirelessGatewayFromThingResponse -> Int)
-> (DisassociateWirelessGatewayFromThingResponse
-> Int -> DisassociateWirelessGatewayFromThingResponse)
-> Lens
DisassociateWirelessGatewayFromThingResponse
DisassociateWirelessGatewayFromThingResponse
Int
Int
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