{-# 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.IoT.DeleteOTAUpdate
(
deleteOTAUpdate
, DeleteOTAUpdate
, dotauOtaUpdateId
, deleteOTAUpdateResponse
, DeleteOTAUpdateResponse
, dotaursResponseStatus
) 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 DeleteOTAUpdate = DeleteOTAUpdate'
{ _dotauOtaUpdateId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteOTAUpdate
:: Text
-> DeleteOTAUpdate
deleteOTAUpdate pOtaUpdateId_ =
DeleteOTAUpdate' {_dotauOtaUpdateId = pOtaUpdateId_}
dotauOtaUpdateId :: Lens' DeleteOTAUpdate Text
dotauOtaUpdateId = lens _dotauOtaUpdateId (\ s a -> s{_dotauOtaUpdateId = a})
instance AWSRequest DeleteOTAUpdate where
type Rs DeleteOTAUpdate = DeleteOTAUpdateResponse
request = delete ioT
response
= receiveEmpty
(\ s h x ->
DeleteOTAUpdateResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteOTAUpdate where
instance NFData DeleteOTAUpdate where
instance ToHeaders DeleteOTAUpdate where
toHeaders = const mempty
instance ToPath DeleteOTAUpdate where
toPath DeleteOTAUpdate'{..}
= mconcat ["/otaUpdates/", toBS _dotauOtaUpdateId]
instance ToQuery DeleteOTAUpdate where
toQuery = const mempty
newtype DeleteOTAUpdateResponse = DeleteOTAUpdateResponse'
{ _dotaursResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteOTAUpdateResponse
:: Int
-> DeleteOTAUpdateResponse
deleteOTAUpdateResponse pResponseStatus_ =
DeleteOTAUpdateResponse' {_dotaursResponseStatus = pResponseStatus_}
dotaursResponseStatus :: Lens' DeleteOTAUpdateResponse Int
dotaursResponseStatus = lens _dotaursResponseStatus (\ s a -> s{_dotaursResponseStatus = a})
instance NFData DeleteOTAUpdateResponse where