{-# 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.DisassociateContactFromAddressBook
(
disassociateContactFromAddressBook
, DisassociateContactFromAddressBook
, dcfabContactARN
, dcfabAddressBookARN
, disassociateContactFromAddressBookResponse
, DisassociateContactFromAddressBookResponse
, dcfabrsResponseStatus
) 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
data DisassociateContactFromAddressBook = DisassociateContactFromAddressBook'
{ _dcfabContactARN :: !Text
, _dcfabAddressBookARN :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
disassociateContactFromAddressBook
:: Text
-> Text
-> DisassociateContactFromAddressBook
disassociateContactFromAddressBook pContactARN_ pAddressBookARN_ =
DisassociateContactFromAddressBook'
{_dcfabContactARN = pContactARN_, _dcfabAddressBookARN = pAddressBookARN_}
dcfabContactARN :: Lens' DisassociateContactFromAddressBook Text
dcfabContactARN = lens _dcfabContactARN (\ s a -> s{_dcfabContactARN = a})
dcfabAddressBookARN :: Lens' DisassociateContactFromAddressBook Text
dcfabAddressBookARN = lens _dcfabAddressBookARN (\ s a -> s{_dcfabAddressBookARN = a})
instance AWSRequest
DisassociateContactFromAddressBook
where
type Rs DisassociateContactFromAddressBook =
DisassociateContactFromAddressBookResponse
request = postJSON alexaBusiness
response
= receiveEmpty
(\ s h x ->
DisassociateContactFromAddressBookResponse' <$>
(pure (fromEnum s)))
instance Hashable DisassociateContactFromAddressBook
where
instance NFData DisassociateContactFromAddressBook
where
instance ToHeaders DisassociateContactFromAddressBook
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AlexaForBusiness.DisassociateContactFromAddressBook"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DisassociateContactFromAddressBook
where
toJSON DisassociateContactFromAddressBook'{..}
= object
(catMaybes
[Just ("ContactArn" .= _dcfabContactARN),
Just ("AddressBookArn" .= _dcfabAddressBookARN)])
instance ToPath DisassociateContactFromAddressBook
where
toPath = const "/"
instance ToQuery DisassociateContactFromAddressBook
where
toQuery = const mempty
newtype DisassociateContactFromAddressBookResponse = DisassociateContactFromAddressBookResponse'
{ _dcfabrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
disassociateContactFromAddressBookResponse
:: Int
-> DisassociateContactFromAddressBookResponse
disassociateContactFromAddressBookResponse pResponseStatus_ =
DisassociateContactFromAddressBookResponse'
{_dcfabrsResponseStatus = pResponseStatus_}
dcfabrsResponseStatus :: Lens' DisassociateContactFromAddressBookResponse Int
dcfabrsResponseStatus = lens _dcfabrsResponseStatus (\ s a -> s{_dcfabrsResponseStatus = a})
instance NFData
DisassociateContactFromAddressBookResponse
where