{-# 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.StopThingRegistrationTask
(
stopThingRegistrationTask
, StopThingRegistrationTask
, strtTaskId
, stopThingRegistrationTaskResponse
, StopThingRegistrationTaskResponse
, srsResponseStatus
) 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 StopThingRegistrationTask = StopThingRegistrationTask'
{ _strtTaskId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
stopThingRegistrationTask
:: Text
-> StopThingRegistrationTask
stopThingRegistrationTask pTaskId_ =
StopThingRegistrationTask' {_strtTaskId = pTaskId_}
strtTaskId :: Lens' StopThingRegistrationTask Text
strtTaskId = lens _strtTaskId (\ s a -> s{_strtTaskId = a})
instance AWSRequest StopThingRegistrationTask where
type Rs StopThingRegistrationTask =
StopThingRegistrationTaskResponse
request = putJSON ioT
response
= receiveEmpty
(\ s h x ->
StopThingRegistrationTaskResponse' <$>
(pure (fromEnum s)))
instance Hashable StopThingRegistrationTask where
instance NFData StopThingRegistrationTask where
instance ToHeaders StopThingRegistrationTask where
toHeaders = const mempty
instance ToJSON StopThingRegistrationTask where
toJSON = const (Object mempty)
instance ToPath StopThingRegistrationTask where
toPath StopThingRegistrationTask'{..}
= mconcat
["/thing-registration-tasks/", toBS _strtTaskId,
"/cancel"]
instance ToQuery StopThingRegistrationTask where
toQuery = const mempty
newtype StopThingRegistrationTaskResponse = StopThingRegistrationTaskResponse'
{ _srsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
stopThingRegistrationTaskResponse
:: Int
-> StopThingRegistrationTaskResponse
stopThingRegistrationTaskResponse pResponseStatus_ =
StopThingRegistrationTaskResponse' {_srsResponseStatus = pResponseStatus_}
srsResponseStatus :: Lens' StopThingRegistrationTaskResponse Int
srsResponseStatus = lens _srsResponseStatus (\ s a -> s{_srsResponseStatus = a})
instance NFData StopThingRegistrationTaskResponse
where