{-# 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.DeleteThingType
(
deleteThingType
, DeleteThingType
, dttThingTypeName
, deleteThingTypeResponse
, DeleteThingTypeResponse
, dttrsResponseStatus
) 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 DeleteThingType = DeleteThingType'
{ _dttThingTypeName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteThingType
:: Text
-> DeleteThingType
deleteThingType pThingTypeName_ =
DeleteThingType'
{ _dttThingTypeName = pThingTypeName_
}
dttThingTypeName :: Lens' DeleteThingType Text
dttThingTypeName = lens _dttThingTypeName (\ s a -> s{_dttThingTypeName = a});
instance AWSRequest DeleteThingType where
type Rs DeleteThingType = DeleteThingTypeResponse
request = delete ioT
response
= receiveEmpty
(\ s h x ->
DeleteThingTypeResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteThingType
instance NFData DeleteThingType
instance ToHeaders DeleteThingType where
toHeaders = const mempty
instance ToPath DeleteThingType where
toPath DeleteThingType'{..}
= mconcat ["/thing-types/", toBS _dttThingTypeName]
instance ToQuery DeleteThingType where
toQuery = const mempty
newtype DeleteThingTypeResponse = DeleteThingTypeResponse'
{ _dttrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteThingTypeResponse
:: Int
-> DeleteThingTypeResponse
deleteThingTypeResponse pResponseStatus_ =
DeleteThingTypeResponse'
{ _dttrsResponseStatus = pResponseStatus_
}
dttrsResponseStatus :: Lens' DeleteThingTypeResponse Int
dttrsResponseStatus = lens _dttrsResponseStatus (\ s a -> s{_dttrsResponseStatus = a});
instance NFData DeleteThingTypeResponse