{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.IoTDataPlane.DeleteThingShadow
(
deleteThingShadow
, DeleteThingShadow
, dtsThingName
, deleteThingShadowResponse
, DeleteThingShadowResponse
, dtsrsResponseStatus
, dtsrsPayload
) where
import Network.AWS.IoTDataPlane.Types
import Network.AWS.IoTDataPlane.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteThingShadow = DeleteThingShadow'
{ _dtsThingName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteThingShadow
:: Text
-> DeleteThingShadow
deleteThingShadow pThingName_ =
DeleteThingShadow'
{ _dtsThingName = pThingName_
}
dtsThingName :: Lens' DeleteThingShadow Text
dtsThingName = lens _dtsThingName (\ s a -> s{_dtsThingName = a});
instance AWSRequest DeleteThingShadow where
type Rs DeleteThingShadow = DeleteThingShadowResponse
request = delete ioTDataPlane
response
= receiveJSON
(\ s h x ->
DeleteThingShadowResponse' <$>
(pure (fromEnum s)) <*> (pure x))
instance Hashable DeleteThingShadow
instance NFData DeleteThingShadow
instance ToHeaders DeleteThingShadow where
toHeaders = const mempty
instance ToPath DeleteThingShadow where
toPath DeleteThingShadow'{..}
= mconcat ["/things/", toBS _dtsThingName, "/shadow"]
instance ToQuery DeleteThingShadow where
toQuery = const mempty
data DeleteThingShadowResponse = DeleteThingShadowResponse'
{ _dtsrsResponseStatus :: !Int
, _dtsrsPayload :: !(HashMap Text Value)
} deriving (Eq,Show,Data,Typeable,Generic)
deleteThingShadowResponse
:: Int
-> HashMap Text Value
-> DeleteThingShadowResponse
deleteThingShadowResponse pResponseStatus_ pPayload_ =
DeleteThingShadowResponse'
{ _dtsrsResponseStatus = pResponseStatus_
, _dtsrsPayload = pPayload_
}
dtsrsResponseStatus :: Lens' DeleteThingShadowResponse Int
dtsrsResponseStatus = lens _dtsrsResponseStatus (\ s a -> s{_dtsrsResponseStatus = a});
dtsrsPayload :: Lens' DeleteThingShadowResponse (HashMap Text Value)
dtsrsPayload = lens _dtsrsPayload (\ s a -> s{_dtsrsPayload = a});
instance NFData DeleteThingShadowResponse