{-# 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.AlexaBusiness.DeleteProfile
(
deleteProfile
, DeleteProfile
, dpProfileARN
, deleteProfileResponse
, DeleteProfileResponse
, dprsResponseStatus
) where
import Network.AWS.AlexaBusiness.Types
import Network.AWS.AlexaBusiness.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteProfile = DeleteProfile'
{ _dpProfileARN :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteProfile
:: DeleteProfile
deleteProfile = DeleteProfile' {_dpProfileARN = Nothing}
dpProfileARN :: Lens' DeleteProfile (Maybe Text)
dpProfileARN = lens _dpProfileARN (\ s a -> s{_dpProfileARN = a})
instance AWSRequest DeleteProfile where
type Rs DeleteProfile = DeleteProfileResponse
request = postJSON alexaBusiness
response
= receiveEmpty
(\ s h x ->
DeleteProfileResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteProfile where
instance NFData DeleteProfile where
instance ToHeaders DeleteProfile where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AlexaForBusiness.DeleteProfile" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteProfile where
toJSON DeleteProfile'{..}
= object
(catMaybes [("ProfileArn" .=) <$> _dpProfileARN])
instance ToPath DeleteProfile where
toPath = const "/"
instance ToQuery DeleteProfile where
toQuery = const mempty
newtype DeleteProfileResponse = DeleteProfileResponse'
{ _dprsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteProfileResponse
:: Int
-> DeleteProfileResponse
deleteProfileResponse pResponseStatus_ =
DeleteProfileResponse' {_dprsResponseStatus = pResponseStatus_}
dprsResponseStatus :: Lens' DeleteProfileResponse Int
dprsResponseStatus = lens _dprsResponseStatus (\ s a -> s{_dprsResponseStatus = a})
instance NFData DeleteProfileResponse where