{-# 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.UpdateRoom
(
updateRoom
, UpdateRoom
, urProfileARN
, urProviderCalendarId
, urRoomARN
, urRoomName
, urDescription
, updateRoomResponse
, UpdateRoomResponse
, urrsResponseStatus
) 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 UpdateRoom = UpdateRoom'
{ _urProfileARN :: !(Maybe Text)
, _urProviderCalendarId :: !(Maybe Text)
, _urRoomARN :: !(Maybe Text)
, _urRoomName :: !(Maybe Text)
, _urDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateRoom
:: UpdateRoom
updateRoom =
UpdateRoom'
{ _urProfileARN = Nothing
, _urProviderCalendarId = Nothing
, _urRoomARN = Nothing
, _urRoomName = Nothing
, _urDescription = Nothing
}
urProfileARN :: Lens' UpdateRoom (Maybe Text)
urProfileARN = lens _urProfileARN (\ s a -> s{_urProfileARN = a})
urProviderCalendarId :: Lens' UpdateRoom (Maybe Text)
urProviderCalendarId = lens _urProviderCalendarId (\ s a -> s{_urProviderCalendarId = a})
urRoomARN :: Lens' UpdateRoom (Maybe Text)
urRoomARN = lens _urRoomARN (\ s a -> s{_urRoomARN = a})
urRoomName :: Lens' UpdateRoom (Maybe Text)
urRoomName = lens _urRoomName (\ s a -> s{_urRoomName = a})
urDescription :: Lens' UpdateRoom (Maybe Text)
urDescription = lens _urDescription (\ s a -> s{_urDescription = a})
instance AWSRequest UpdateRoom where
type Rs UpdateRoom = UpdateRoomResponse
request = postJSON alexaBusiness
response
= receiveEmpty
(\ s h x ->
UpdateRoomResponse' <$> (pure (fromEnum s)))
instance Hashable UpdateRoom where
instance NFData UpdateRoom where
instance ToHeaders UpdateRoom where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AlexaForBusiness.UpdateRoom" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateRoom where
toJSON UpdateRoom'{..}
= object
(catMaybes
[("ProfileArn" .=) <$> _urProfileARN,
("ProviderCalendarId" .=) <$> _urProviderCalendarId,
("RoomArn" .=) <$> _urRoomARN,
("RoomName" .=) <$> _urRoomName,
("Description" .=) <$> _urDescription])
instance ToPath UpdateRoom where
toPath = const "/"
instance ToQuery UpdateRoom where
toQuery = const mempty
newtype UpdateRoomResponse = UpdateRoomResponse'
{ _urrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateRoomResponse
:: Int
-> UpdateRoomResponse
updateRoomResponse pResponseStatus_ =
UpdateRoomResponse' {_urrsResponseStatus = pResponseStatus_}
urrsResponseStatus :: Lens' UpdateRoomResponse Int
urrsResponseStatus = lens _urrsResponseStatus (\ s a -> s{_urrsResponseStatus = a})
instance NFData UpdateRoomResponse where