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