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