{-# 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.DeleteContact
(
deleteContact
, DeleteContact
, dcContactARN
, deleteContactResponse
, DeleteContactResponse
, dcrsResponseStatus
) 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 DeleteContact = DeleteContact'
{ _dcContactARN :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteContact
:: Text
-> DeleteContact
deleteContact pContactARN_ = DeleteContact' {_dcContactARN = pContactARN_}
dcContactARN :: Lens' DeleteContact Text
dcContactARN = lens _dcContactARN (\ s a -> s{_dcContactARN = a})
instance AWSRequest DeleteContact where
type Rs DeleteContact = DeleteContactResponse
request = postJSON alexaBusiness
response
= receiveEmpty
(\ s h x ->
DeleteContactResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteContact where
instance NFData DeleteContact where
instance ToHeaders DeleteContact where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AlexaForBusiness.DeleteContact" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteContact where
toJSON DeleteContact'{..}
= object
(catMaybes [Just ("ContactArn" .= _dcContactARN)])
instance ToPath DeleteContact where
toPath = const "/"
instance ToQuery DeleteContact where
toQuery = const mempty
newtype DeleteContactResponse = DeleteContactResponse'
{ _dcrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteContactResponse
:: Int
-> DeleteContactResponse
deleteContactResponse pResponseStatus_ =
DeleteContactResponse' {_dcrsResponseStatus = pResponseStatus_}
dcrsResponseStatus :: Lens' DeleteContactResponse Int
dcrsResponseStatus = lens _dcrsResponseStatus (\ s a -> s{_dcrsResponseStatus = a})
instance NFData DeleteContactResponse where