{-# 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.IoTData.DeleteThingShadow
(
deleteThingShadow
, DeleteThingShadow
, dtsThingName
, deleteThingShadowResponse
, DeleteThingShadowResponse
, dtsrsResponseStatus
, dtsrsPayload
) where
import Network.AWS.IoTData.Types
import Network.AWS.IoTData.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 ioTData
response
= receiveBytes
(\ s h x ->
DeleteThingShadowResponse' <$>
(pure (fromEnum s)) <*> (pure x))
instance Hashable DeleteThingShadow where
instance NFData DeleteThingShadow where
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 :: !ByteString
} deriving (Eq, Show, Data, Typeable, Generic)
deleteThingShadowResponse
:: Int
-> ByteString
-> DeleteThingShadowResponse
deleteThingShadowResponse pResponseStatus_ pPayload_ =
DeleteThingShadowResponse'
{_dtsrsResponseStatus = pResponseStatus_, _dtsrsPayload = pPayload_}
dtsrsResponseStatus :: Lens' DeleteThingShadowResponse Int
dtsrsResponseStatus = lens _dtsrsResponseStatus (\ s a -> s{_dtsrsResponseStatus = a})
dtsrsPayload :: Lens' DeleteThingShadowResponse ByteString
dtsrsPayload = lens _dtsrsPayload (\ s a -> s{_dtsrsPayload = a})
instance NFData DeleteThingShadowResponse where