module Network.AWS.CodeStar.DeleteUserProfile
(
deleteUserProfile
, DeleteUserProfile
, dUserARN
, deleteUserProfileResponse
, DeleteUserProfileResponse
, delrsResponseStatus
, delrsUserARN
) where
import Network.AWS.CodeStar.Types
import Network.AWS.CodeStar.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteUserProfile = DeleteUserProfile'
{ _dUserARN :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteUserProfile
:: Text
-> DeleteUserProfile
deleteUserProfile pUserARN_ = DeleteUserProfile' {_dUserARN = pUserARN_}
dUserARN :: Lens' DeleteUserProfile Text
dUserARN = lens _dUserARN (\ s a -> s{_dUserARN = a});
instance AWSRequest DeleteUserProfile where
type Rs DeleteUserProfile = DeleteUserProfileResponse
request = postJSON codeStar
response
= receiveJSON
(\ s h x ->
DeleteUserProfileResponse' <$>
(pure (fromEnum s)) <*> (x .:> "userArn"))
instance Hashable DeleteUserProfile where
instance NFData DeleteUserProfile where
instance ToHeaders DeleteUserProfile where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodeStar_20170419.DeleteUserProfile" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteUserProfile where
toJSON DeleteUserProfile'{..}
= object (catMaybes [Just ("userArn" .= _dUserARN)])
instance ToPath DeleteUserProfile where
toPath = const "/"
instance ToQuery DeleteUserProfile where
toQuery = const mempty
data DeleteUserProfileResponse = DeleteUserProfileResponse'
{ _delrsResponseStatus :: !Int
, _delrsUserARN :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteUserProfileResponse
:: Int
-> Text
-> DeleteUserProfileResponse
deleteUserProfileResponse pResponseStatus_ pUserARN_ =
DeleteUserProfileResponse'
{_delrsResponseStatus = pResponseStatus_, _delrsUserARN = pUserARN_}
delrsResponseStatus :: Lens' DeleteUserProfileResponse Int
delrsResponseStatus = lens _delrsResponseStatus (\ s a -> s{_delrsResponseStatus = a});
delrsUserARN :: Lens' DeleteUserProfileResponse Text
delrsUserARN = lens _delrsUserARN (\ s a -> s{_delrsUserARN = a});
instance NFData DeleteUserProfileResponse where