module Network.AWS.CloudHSM.DeleteLunaClient
(
deleteLunaClient
, DeleteLunaClient
, dClientARN
, deleteLunaClientResponse
, DeleteLunaClientResponse
, dlcrsResponseStatus
, dlcrsStatus
) where
import Network.AWS.CloudHSM.Types
import Network.AWS.CloudHSM.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteLunaClient = DeleteLunaClient'
{ _dClientARN :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteLunaClient
:: Text
-> DeleteLunaClient
deleteLunaClient pClientARN_ =
DeleteLunaClient'
{ _dClientARN = pClientARN_
}
dClientARN :: Lens' DeleteLunaClient Text
dClientARN = lens _dClientARN (\ s a -> s{_dClientARN = a});
instance AWSRequest DeleteLunaClient where
type Rs DeleteLunaClient = DeleteLunaClientResponse
request = postJSON cloudHSM
response
= receiveJSON
(\ s h x ->
DeleteLunaClientResponse' <$>
(pure (fromEnum s)) <*> (x .:> "Status"))
instance Hashable DeleteLunaClient
instance NFData DeleteLunaClient
instance ToHeaders DeleteLunaClient where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CloudHsmFrontendService.DeleteLunaClient" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteLunaClient where
toJSON DeleteLunaClient'{..}
= object
(catMaybes [Just ("ClientArn" .= _dClientARN)])
instance ToPath DeleteLunaClient where
toPath = const "/"
instance ToQuery DeleteLunaClient where
toQuery = const mempty
data DeleteLunaClientResponse = DeleteLunaClientResponse'
{ _dlcrsResponseStatus :: !Int
, _dlcrsStatus :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteLunaClientResponse
:: Int
-> Text
-> DeleteLunaClientResponse
deleteLunaClientResponse pResponseStatus_ pStatus_ =
DeleteLunaClientResponse'
{ _dlcrsResponseStatus = pResponseStatus_
, _dlcrsStatus = pStatus_
}
dlcrsResponseStatus :: Lens' DeleteLunaClientResponse Int
dlcrsResponseStatus = lens _dlcrsResponseStatus (\ s a -> s{_dlcrsResponseStatus = a});
dlcrsStatus :: Lens' DeleteLunaClientResponse Text
dlcrsStatus = lens _dlcrsStatus (\ s a -> s{_dlcrsStatus = a});
instance NFData DeleteLunaClientResponse