{-# 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.MechanicalTurk.UpdateHITTypeOfHIT
(
updateHITTypeOfHIT
, UpdateHITTypeOfHIT
, uhittohitHITId
, uhittohitHITTypeId
, updateHITTypeOfHITResponse
, UpdateHITTypeOfHITResponse
, uhittohitrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.MechanicalTurk.Types
import Network.AWS.MechanicalTurk.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateHITTypeOfHIT = UpdateHITTypeOfHIT'
{ _uhittohitHITId :: !Text
, _uhittohitHITTypeId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateHITTypeOfHIT
:: Text
-> Text
-> UpdateHITTypeOfHIT
updateHITTypeOfHIT pHITId_ pHITTypeId_ =
UpdateHITTypeOfHIT'
{_uhittohitHITId = pHITId_, _uhittohitHITTypeId = pHITTypeId_}
uhittohitHITId :: Lens' UpdateHITTypeOfHIT Text
uhittohitHITId = lens _uhittohitHITId (\ s a -> s{_uhittohitHITId = a})
uhittohitHITTypeId :: Lens' UpdateHITTypeOfHIT Text
uhittohitHITTypeId = lens _uhittohitHITTypeId (\ s a -> s{_uhittohitHITTypeId = a})
instance AWSRequest UpdateHITTypeOfHIT where
type Rs UpdateHITTypeOfHIT =
UpdateHITTypeOfHITResponse
request = postJSON mechanicalTurk
response
= receiveEmpty
(\ s h x ->
UpdateHITTypeOfHITResponse' <$> (pure (fromEnum s)))
instance Hashable UpdateHITTypeOfHIT where
instance NFData UpdateHITTypeOfHIT where
instance ToHeaders UpdateHITTypeOfHIT where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("MTurkRequesterServiceV20170117.UpdateHITTypeOfHIT"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateHITTypeOfHIT where
toJSON UpdateHITTypeOfHIT'{..}
= object
(catMaybes
[Just ("HITId" .= _uhittohitHITId),
Just ("HITTypeId" .= _uhittohitHITTypeId)])
instance ToPath UpdateHITTypeOfHIT where
toPath = const "/"
instance ToQuery UpdateHITTypeOfHIT where
toQuery = const mempty
newtype UpdateHITTypeOfHITResponse = UpdateHITTypeOfHITResponse'
{ _uhittohitrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateHITTypeOfHITResponse
:: Int
-> UpdateHITTypeOfHITResponse
updateHITTypeOfHITResponse pResponseStatus_ =
UpdateHITTypeOfHITResponse' {_uhittohitrsResponseStatus = pResponseStatus_}
uhittohitrsResponseStatus :: Lens' UpdateHITTypeOfHITResponse Int
uhittohitrsResponseStatus = lens _uhittohitrsResponseStatus (\ s a -> s{_uhittohitrsResponseStatus = a})
instance NFData UpdateHITTypeOfHITResponse where