{-# 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.DeleteUpload
(
deleteUpload
, DeleteUpload
, duArn
, deleteUploadResponse
, DeleteUploadResponse
, dursResponseStatus
) 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 DeleteUpload = DeleteUpload'
{ _duArn :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteUpload
:: Text
-> DeleteUpload
deleteUpload pArn_ = DeleteUpload' {_duArn = pArn_}
duArn :: Lens' DeleteUpload Text
duArn = lens _duArn (\ s a -> s{_duArn = a})
instance AWSRequest DeleteUpload where
type Rs DeleteUpload = DeleteUploadResponse
request = postJSON deviceFarm
response
= receiveEmpty
(\ s h x ->
DeleteUploadResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteUpload where
instance NFData DeleteUpload where
instance ToHeaders DeleteUpload where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DeviceFarm_20150623.DeleteUpload" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteUpload where
toJSON DeleteUpload'{..}
= object (catMaybes [Just ("arn" .= _duArn)])
instance ToPath DeleteUpload where
toPath = const "/"
instance ToQuery DeleteUpload where
toQuery = const mempty
newtype DeleteUploadResponse = DeleteUploadResponse'
{ _dursResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteUploadResponse
:: Int
-> DeleteUploadResponse
deleteUploadResponse pResponseStatus_ =
DeleteUploadResponse' {_dursResponseStatus = pResponseStatus_}
dursResponseStatus :: Lens' DeleteUploadResponse Int
dursResponseStatus = lens _dursResponseStatus (\ s a -> s{_dursResponseStatus = a})
instance NFData DeleteUploadResponse where