{-# 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.MQ.DeleteUser
(
deleteUser
, DeleteUser
, dUsername
, dBrokerId
, deleteUserResponse
, DeleteUserResponse
, delrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.MQ.Types
import Network.AWS.MQ.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteUser = DeleteUser'
{ _dUsername :: !Text
, _dBrokerId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteUser
:: Text
-> Text
-> DeleteUser
deleteUser pUsername_ pBrokerId_ =
DeleteUser' {_dUsername = pUsername_, _dBrokerId = pBrokerId_}
dUsername :: Lens' DeleteUser Text
dUsername = lens _dUsername (\ s a -> s{_dUsername = a})
dBrokerId :: Lens' DeleteUser Text
dBrokerId = lens _dBrokerId (\ s a -> s{_dBrokerId = a})
instance AWSRequest DeleteUser where
type Rs DeleteUser = DeleteUserResponse
request = delete mq
response
= receiveEmpty
(\ s h x ->
DeleteUserResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteUser where
instance NFData DeleteUser where
instance ToHeaders DeleteUser where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteUser where
toPath DeleteUser'{..}
= mconcat
["/v1/brokers/", toBS _dBrokerId, "/users/",
toBS _dUsername]
instance ToQuery DeleteUser where
toQuery = const mempty
newtype DeleteUserResponse = DeleteUserResponse'
{ _delrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteUserResponse
:: Int
-> DeleteUserResponse
deleteUserResponse pResponseStatus_ =
DeleteUserResponse' {_delrsResponseStatus = pResponseStatus_}
delrsResponseStatus :: Lens' DeleteUserResponse Int
delrsResponseStatus = lens _delrsResponseStatus (\ s a -> s{_delrsResponseStatus = a})
instance NFData DeleteUserResponse where