{-# 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.ElasticTranscoder.CancelJob
(
cancelJob
, CancelJob
, cjId
, cancelJobResponse
, CancelJobResponse
, canrsResponseStatus
) where
import Network.AWS.ElasticTranscoder.Types
import Network.AWS.ElasticTranscoder.Types.Product
import Network.AWS.Lens
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 elasticTranscoder
response
= receiveEmpty
(\ s h x ->
CancelJobResponse' <$> (pure (fromEnum s)))
instance Hashable CancelJob where
instance NFData CancelJob where
instance ToHeaders CancelJob where
toHeaders = const mempty
instance ToPath CancelJob where
toPath CancelJob'{..}
= mconcat ["/2012-09-25/jobs/", toBS _cjId]
instance ToQuery CancelJob where
toQuery = const mempty
newtype CancelJobResponse = CancelJobResponse'
{ _canrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
cancelJobResponse
:: Int
-> CancelJobResponse
cancelJobResponse pResponseStatus_ =
CancelJobResponse' {_canrsResponseStatus = pResponseStatus_}
canrsResponseStatus :: Lens' CancelJobResponse Int
canrsResponseStatus = lens _canrsResponseStatus (\ s a -> s{_canrsResponseStatus = a})
instance NFData CancelJobResponse where