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