module Network.AWS.IoT.DeleteThing
(
deleteThing
, DeleteThing
, dtThingName
, deleteThingResponse
, DeleteThingResponse
, drsResponseStatus
) where
import Network.AWS.IoT.Types
import Network.AWS.IoT.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteThing = DeleteThing'
{ _dtThingName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteThing
:: Text
-> DeleteThing
deleteThing pThingName_ =
DeleteThing'
{ _dtThingName = pThingName_
}
dtThingName :: Lens' DeleteThing Text
dtThingName = lens _dtThingName (\ s a -> s{_dtThingName = a});
instance AWSRequest DeleteThing where
type Rs DeleteThing = DeleteThingResponse
request = delete ioT
response
= receiveEmpty
(\ s h x ->
DeleteThingResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteThing
instance ToHeaders DeleteThing where
toHeaders = const mempty
instance ToPath DeleteThing where
toPath DeleteThing'{..}
= mconcat ["/things/", toBS _dtThingName]
instance ToQuery DeleteThing where
toQuery = const mempty
newtype DeleteThingResponse = DeleteThingResponse'
{ _drsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteThingResponse
:: Int
-> DeleteThingResponse
deleteThingResponse pResponseStatus_ =
DeleteThingResponse'
{ _drsResponseStatus = pResponseStatus_
}
drsResponseStatus :: Lens' DeleteThingResponse Int
drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});