{-# 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.MediaConvert.CancelJob
(
cancelJob
, CancelJob
, cjId
, cancelJobResponse
, CancelJobResponse
, crsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.MediaConvert.Types
import Network.AWS.MediaConvert.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype CancelJob = CancelJob'
{ _cjId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
cancelJob
:: Text
-> CancelJob
cancelJob pId_ = CancelJob' {_cjId = pId_}
cjId :: Lens' CancelJob Text
cjId = lens _cjId (\ s a -> s{_cjId = a})
instance AWSRequest CancelJob where
type Rs CancelJob = CancelJobResponse
request = delete mediaConvert
response
= receiveEmpty
(\ s h x ->
CancelJobResponse' <$> (pure (fromEnum s)))
instance Hashable CancelJob where
instance NFData CancelJob where
instance ToHeaders CancelJob where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath CancelJob where
toPath CancelJob'{..}
= mconcat ["/2017-08-29/jobs/", toBS _cjId]
instance ToQuery CancelJob where
toQuery = const mempty
newtype CancelJobResponse = CancelJobResponse'
{ _crsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
cancelJobResponse
:: Int
-> CancelJobResponse
cancelJobResponse pResponseStatus_ =
CancelJobResponse' {_crsResponseStatus = pResponseStatus_}
crsResponseStatus :: Lens' CancelJobResponse Int
crsResponseStatus = lens _crsResponseStatus (\ s a -> s{_crsResponseStatus = a})
instance NFData CancelJobResponse where