{-# 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.DeleteWirelessDevice
(
DeleteWirelessDevice (..),
newDeleteWirelessDevice,
deleteWirelessDevice_id,
DeleteWirelessDeviceResponse (..),
newDeleteWirelessDeviceResponse,
deleteWirelessDeviceResponse_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 DeleteWirelessDevice = DeleteWirelessDevice'
{
DeleteWirelessDevice -> Text
id :: Prelude.Text
}
deriving (DeleteWirelessDevice -> DeleteWirelessDevice -> Bool
(DeleteWirelessDevice -> DeleteWirelessDevice -> Bool)
-> (DeleteWirelessDevice -> DeleteWirelessDevice -> Bool)
-> Eq DeleteWirelessDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteWirelessDevice -> DeleteWirelessDevice -> Bool
$c/= :: DeleteWirelessDevice -> DeleteWirelessDevice -> Bool
== :: DeleteWirelessDevice -> DeleteWirelessDevice -> Bool
$c== :: DeleteWirelessDevice -> DeleteWirelessDevice -> Bool
Prelude.Eq, ReadPrec [DeleteWirelessDevice]
ReadPrec DeleteWirelessDevice
Int -> ReadS DeleteWirelessDevice
ReadS [DeleteWirelessDevice]
(Int -> ReadS DeleteWirelessDevice)
-> ReadS [DeleteWirelessDevice]
-> ReadPrec DeleteWirelessDevice
-> ReadPrec [DeleteWirelessDevice]
-> Read DeleteWirelessDevice
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteWirelessDevice]
$creadListPrec :: ReadPrec [DeleteWirelessDevice]
readPrec :: ReadPrec DeleteWirelessDevice
$creadPrec :: ReadPrec DeleteWirelessDevice
readList :: ReadS [DeleteWirelessDevice]
$creadList :: ReadS [DeleteWirelessDevice]
readsPrec :: Int -> ReadS DeleteWirelessDevice
$creadsPrec :: Int -> ReadS DeleteWirelessDevice
Prelude.Read, Int -> DeleteWirelessDevice -> ShowS
[DeleteWirelessDevice] -> ShowS
DeleteWirelessDevice -> String
(Int -> DeleteWirelessDevice -> ShowS)
-> (DeleteWirelessDevice -> String)
-> ([DeleteWirelessDevice] -> ShowS)
-> Show DeleteWirelessDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteWirelessDevice] -> ShowS
$cshowList :: [DeleteWirelessDevice] -> ShowS
show :: DeleteWirelessDevice -> String
$cshow :: DeleteWirelessDevice -> String
showsPrec :: Int -> DeleteWirelessDevice -> ShowS
$cshowsPrec :: Int -> DeleteWirelessDevice -> ShowS
Prelude.Show, (forall x. DeleteWirelessDevice -> Rep DeleteWirelessDevice x)
-> (forall x. Rep DeleteWirelessDevice x -> DeleteWirelessDevice)
-> Generic DeleteWirelessDevice
forall x. Rep DeleteWirelessDevice x -> DeleteWirelessDevice
forall x. DeleteWirelessDevice -> Rep DeleteWirelessDevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteWirelessDevice x -> DeleteWirelessDevice
$cfrom :: forall x. DeleteWirelessDevice -> Rep DeleteWirelessDevice x
Prelude.Generic)
newDeleteWirelessDevice ::
Prelude.Text ->
DeleteWirelessDevice
newDeleteWirelessDevice :: Text -> DeleteWirelessDevice
newDeleteWirelessDevice Text
pId_ =
DeleteWirelessDevice' :: Text -> DeleteWirelessDevice
DeleteWirelessDevice' {$sel:id:DeleteWirelessDevice' :: Text
id = Text
pId_}
deleteWirelessDevice_id :: Lens.Lens' DeleteWirelessDevice Prelude.Text
deleteWirelessDevice_id :: (Text -> f Text) -> DeleteWirelessDevice -> f DeleteWirelessDevice
deleteWirelessDevice_id = (DeleteWirelessDevice -> Text)
-> (DeleteWirelessDevice -> Text -> DeleteWirelessDevice)
-> Lens DeleteWirelessDevice DeleteWirelessDevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteWirelessDevice' {Text
id :: Text
$sel:id:DeleteWirelessDevice' :: DeleteWirelessDevice -> Text
id} -> Text
id) (\s :: DeleteWirelessDevice
s@DeleteWirelessDevice' {} Text
a -> DeleteWirelessDevice
s {$sel:id:DeleteWirelessDevice' :: Text
id = Text
a} :: DeleteWirelessDevice)
instance Core.AWSRequest DeleteWirelessDevice where
type
AWSResponse DeleteWirelessDevice =
DeleteWirelessDeviceResponse
request :: DeleteWirelessDevice -> Request DeleteWirelessDevice
request = Service -> DeleteWirelessDevice -> Request DeleteWirelessDevice
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteWirelessDevice
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteWirelessDevice)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteWirelessDevice))
-> Logger
-> Service
-> Proxy DeleteWirelessDevice
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteWirelessDevice)))
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 -> DeleteWirelessDeviceResponse
DeleteWirelessDeviceResponse'
(Int -> DeleteWirelessDeviceResponse)
-> Either String Int -> Either String DeleteWirelessDeviceResponse
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 DeleteWirelessDevice
instance Prelude.NFData DeleteWirelessDevice
instance Core.ToHeaders DeleteWirelessDevice where
toHeaders :: DeleteWirelessDevice -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteWirelessDevice -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteWirelessDevice where
toPath :: DeleteWirelessDevice -> ByteString
toPath DeleteWirelessDevice' {Text
id :: Text
$sel:id:DeleteWirelessDevice' :: DeleteWirelessDevice -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/wireless-devices/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id]
instance Core.ToQuery DeleteWirelessDevice where
toQuery :: DeleteWirelessDevice -> QueryString
toQuery = QueryString -> DeleteWirelessDevice -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteWirelessDeviceResponse = DeleteWirelessDeviceResponse'
{
DeleteWirelessDeviceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteWirelessDeviceResponse
-> DeleteWirelessDeviceResponse -> Bool
(DeleteWirelessDeviceResponse
-> DeleteWirelessDeviceResponse -> Bool)
-> (DeleteWirelessDeviceResponse
-> DeleteWirelessDeviceResponse -> Bool)
-> Eq DeleteWirelessDeviceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteWirelessDeviceResponse
-> DeleteWirelessDeviceResponse -> Bool
$c/= :: DeleteWirelessDeviceResponse
-> DeleteWirelessDeviceResponse -> Bool
== :: DeleteWirelessDeviceResponse
-> DeleteWirelessDeviceResponse -> Bool
$c== :: DeleteWirelessDeviceResponse
-> DeleteWirelessDeviceResponse -> Bool
Prelude.Eq, ReadPrec [DeleteWirelessDeviceResponse]
ReadPrec DeleteWirelessDeviceResponse
Int -> ReadS DeleteWirelessDeviceResponse
ReadS [DeleteWirelessDeviceResponse]
(Int -> ReadS DeleteWirelessDeviceResponse)
-> ReadS [DeleteWirelessDeviceResponse]
-> ReadPrec DeleteWirelessDeviceResponse
-> ReadPrec [DeleteWirelessDeviceResponse]
-> Read DeleteWirelessDeviceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteWirelessDeviceResponse]
$creadListPrec :: ReadPrec [DeleteWirelessDeviceResponse]
readPrec :: ReadPrec DeleteWirelessDeviceResponse
$creadPrec :: ReadPrec DeleteWirelessDeviceResponse
readList :: ReadS [DeleteWirelessDeviceResponse]
$creadList :: ReadS [DeleteWirelessDeviceResponse]
readsPrec :: Int -> ReadS DeleteWirelessDeviceResponse
$creadsPrec :: Int -> ReadS DeleteWirelessDeviceResponse
Prelude.Read, Int -> DeleteWirelessDeviceResponse -> ShowS
[DeleteWirelessDeviceResponse] -> ShowS
DeleteWirelessDeviceResponse -> String
(Int -> DeleteWirelessDeviceResponse -> ShowS)
-> (DeleteWirelessDeviceResponse -> String)
-> ([DeleteWirelessDeviceResponse] -> ShowS)
-> Show DeleteWirelessDeviceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteWirelessDeviceResponse] -> ShowS
$cshowList :: [DeleteWirelessDeviceResponse] -> ShowS
show :: DeleteWirelessDeviceResponse -> String
$cshow :: DeleteWirelessDeviceResponse -> String
showsPrec :: Int -> DeleteWirelessDeviceResponse -> ShowS
$cshowsPrec :: Int -> DeleteWirelessDeviceResponse -> ShowS
Prelude.Show, (forall x.
DeleteWirelessDeviceResponse -> Rep DeleteWirelessDeviceResponse x)
-> (forall x.
Rep DeleteWirelessDeviceResponse x -> DeleteWirelessDeviceResponse)
-> Generic DeleteWirelessDeviceResponse
forall x.
Rep DeleteWirelessDeviceResponse x -> DeleteWirelessDeviceResponse
forall x.
DeleteWirelessDeviceResponse -> Rep DeleteWirelessDeviceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteWirelessDeviceResponse x -> DeleteWirelessDeviceResponse
$cfrom :: forall x.
DeleteWirelessDeviceResponse -> Rep DeleteWirelessDeviceResponse x
Prelude.Generic)
newDeleteWirelessDeviceResponse ::
Prelude.Int ->
DeleteWirelessDeviceResponse
newDeleteWirelessDeviceResponse :: Int -> DeleteWirelessDeviceResponse
newDeleteWirelessDeviceResponse Int
pHttpStatus_ =
DeleteWirelessDeviceResponse' :: Int -> DeleteWirelessDeviceResponse
DeleteWirelessDeviceResponse'
{ $sel:httpStatus:DeleteWirelessDeviceResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteWirelessDeviceResponse_httpStatus :: Lens.Lens' DeleteWirelessDeviceResponse Prelude.Int
deleteWirelessDeviceResponse_httpStatus :: (Int -> f Int)
-> DeleteWirelessDeviceResponse -> f DeleteWirelessDeviceResponse
deleteWirelessDeviceResponse_httpStatus = (DeleteWirelessDeviceResponse -> Int)
-> (DeleteWirelessDeviceResponse
-> Int -> DeleteWirelessDeviceResponse)
-> Lens
DeleteWirelessDeviceResponse DeleteWirelessDeviceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteWirelessDeviceResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteWirelessDeviceResponse' :: DeleteWirelessDeviceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteWirelessDeviceResponse
s@DeleteWirelessDeviceResponse' {} Int
a -> DeleteWirelessDeviceResponse
s {$sel:httpStatus:DeleteWirelessDeviceResponse' :: Int
httpStatus = Int
a} :: DeleteWirelessDeviceResponse)
instance Prelude.NFData DeleteWirelessDeviceResponse