{-# 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 #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.MQ.DeleteUser -- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Deletes an ActiveMQ user. module Network.AWS.MQ.DeleteUser ( -- * Creating a Request deleteUser , DeleteUser -- * Request Lenses , dUsername , dBrokerId -- * Destructuring the Response , deleteUserResponse , DeleteUserResponse -- * Response Lenses , 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 -- | /See:/ 'deleteUser' smart constructor. data DeleteUser = DeleteUser' { _dUsername :: !Text , _dBrokerId :: !Text } deriving (Eq, Read, Show, Data, Typeable, Generic) -- | Creates a value of 'DeleteUser' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'dUsername' - The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long. -- -- * 'dBrokerId' - The unique ID that Amazon MQ generates for the broker. deleteUser :: Text -- ^ 'dUsername' -> Text -- ^ 'dBrokerId' -> DeleteUser deleteUser pUsername_ pBrokerId_ = DeleteUser' {_dUsername = pUsername_, _dBrokerId = pBrokerId_} -- | The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long. dUsername :: Lens' DeleteUser Text dUsername = lens _dUsername (\ s a -> s{_dUsername = a}) -- | The unique ID that Amazon MQ generates for the broker. 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 -- | /See:/ 'deleteUserResponse' smart constructor. newtype DeleteUserResponse = DeleteUserResponse' { _delrsResponseStatus :: Int } deriving (Eq, Read, Show, Data, Typeable, Generic) -- | Creates a value of 'DeleteUserResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'delrsResponseStatus' - -- | The response status code. deleteUserResponse :: Int -- ^ 'delrsResponseStatus' -> DeleteUserResponse deleteUserResponse pResponseStatus_ = DeleteUserResponse' {_delrsResponseStatus = pResponseStatus_} -- | -- | The response status code. delrsResponseStatus :: Lens' DeleteUserResponse Int delrsResponseStatus = lens _delrsResponseStatus (\ s a -> s{_delrsResponseStatus = a}) instance NFData DeleteUserResponse where