{-# 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.DeviceFarm.DeleteRun
(
deleteRun
, DeleteRun
, drArn
, deleteRunResponse
, DeleteRunResponse
, drrsResponseStatus
) where
import Network.AWS.DeviceFarm.Types
import Network.AWS.DeviceFarm.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteRun = DeleteRun'
{ _drArn :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteRun
:: Text
-> DeleteRun
deleteRun pArn_ = DeleteRun' {_drArn = pArn_}
drArn :: Lens' DeleteRun Text
drArn = lens _drArn (\ s a -> s{_drArn = a})
instance AWSRequest DeleteRun where
type Rs DeleteRun = DeleteRunResponse
request = postJSON deviceFarm
response
= receiveEmpty
(\ s h x ->
DeleteRunResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteRun where
instance NFData DeleteRun where
instance ToHeaders DeleteRun where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DeviceFarm_20150623.DeleteRun" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteRun where
toJSON DeleteRun'{..}
= object (catMaybes [Just ("arn" .= _drArn)])
instance ToPath DeleteRun where
toPath = const "/"
instance ToQuery DeleteRun where
toQuery = const mempty
newtype DeleteRunResponse = DeleteRunResponse'
{ _drrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteRunResponse
:: Int
-> DeleteRunResponse
deleteRunResponse pResponseStatus_ =
DeleteRunResponse' {_drrsResponseStatus = pResponseStatus_}
drrsResponseStatus :: Lens' DeleteRunResponse Int
drrsResponseStatus = lens _drrsResponseStatus (\ s a -> s{_drrsResponseStatus = a})
instance NFData DeleteRunResponse where