module Network.AWS.CloudHSM.DeleteHAPG
(
deleteHAPG
, DeleteHAPG
, dhHAPGARN
, deleteHAPGResponse
, DeleteHAPGResponse
, dhrsResponseStatus
, dhrsStatus
) where
import Network.AWS.CloudHSM.Types
import Network.AWS.CloudHSM.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteHAPG = DeleteHAPG'
{ _dhHAPGARN :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteHAPG
:: Text
-> DeleteHAPG
deleteHAPG pHAPGARN_ =
DeleteHAPG'
{ _dhHAPGARN = pHAPGARN_
}
dhHAPGARN :: Lens' DeleteHAPG Text
dhHAPGARN = lens _dhHAPGARN (\ s a -> s{_dhHAPGARN = a});
instance AWSRequest DeleteHAPG where
type Rs DeleteHAPG = DeleteHAPGResponse
request = postJSON cloudHSM
response
= receiveJSON
(\ s h x ->
DeleteHAPGResponse' <$>
(pure (fromEnum s)) <*> (x .:> "Status"))
instance ToHeaders DeleteHAPG where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CloudHsmFrontendService.DeleteHapg" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteHAPG where
toJSON DeleteHAPG'{..}
= object (catMaybes [Just ("HapgArn" .= _dhHAPGARN)])
instance ToPath DeleteHAPG where
toPath = const "/"
instance ToQuery DeleteHAPG where
toQuery = const mempty
data DeleteHAPGResponse = DeleteHAPGResponse'
{ _dhrsResponseStatus :: !Int
, _dhrsStatus :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteHAPGResponse
:: Int
-> Text
-> DeleteHAPGResponse
deleteHAPGResponse pResponseStatus_ pStatus_ =
DeleteHAPGResponse'
{ _dhrsResponseStatus = pResponseStatus_
, _dhrsStatus = pStatus_
}
dhrsResponseStatus :: Lens' DeleteHAPGResponse Int
dhrsResponseStatus = lens _dhrsResponseStatus (\ s a -> s{_dhrsResponseStatus = a});
dhrsStatus :: Lens' DeleteHAPGResponse Text
dhrsStatus = lens _dhrsStatus (\ s a -> s{_dhrsStatus = a});