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