{-# 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.UpdateProfile
(
updateProfile
, UpdateProfile
, upSetupModeDisabled
, upPSTNEnabled
, upDistanceUnit
, upAddress
, upProfileARN
, upWakeWord
, upProfileName
, upTemperatureUnit
, upTimezone
, upMaxVolumeLimit
, updateProfileResponse
, UpdateProfileResponse
, uprsResponseStatus
) 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 UpdateProfile = UpdateProfile'
{ _upSetupModeDisabled :: !(Maybe Bool)
, _upPSTNEnabled :: !(Maybe Bool)
, _upDistanceUnit :: !(Maybe DistanceUnit)
, _upAddress :: !(Maybe Text)
, _upProfileARN :: !(Maybe Text)
, _upWakeWord :: !(Maybe WakeWord)
, _upProfileName :: !(Maybe Text)
, _upTemperatureUnit :: !(Maybe TemperatureUnit)
, _upTimezone :: !(Maybe Text)
, _upMaxVolumeLimit :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateProfile
:: UpdateProfile
updateProfile =
UpdateProfile'
{ _upSetupModeDisabled = Nothing
, _upPSTNEnabled = Nothing
, _upDistanceUnit = Nothing
, _upAddress = Nothing
, _upProfileARN = Nothing
, _upWakeWord = Nothing
, _upProfileName = Nothing
, _upTemperatureUnit = Nothing
, _upTimezone = Nothing
, _upMaxVolumeLimit = Nothing
}
upSetupModeDisabled :: Lens' UpdateProfile (Maybe Bool)
upSetupModeDisabled = lens _upSetupModeDisabled (\ s a -> s{_upSetupModeDisabled = a})
upPSTNEnabled :: Lens' UpdateProfile (Maybe Bool)
upPSTNEnabled = lens _upPSTNEnabled (\ s a -> s{_upPSTNEnabled = a})
upDistanceUnit :: Lens' UpdateProfile (Maybe DistanceUnit)
upDistanceUnit = lens _upDistanceUnit (\ s a -> s{_upDistanceUnit = a})
upAddress :: Lens' UpdateProfile (Maybe Text)
upAddress = lens _upAddress (\ s a -> s{_upAddress = a})
upProfileARN :: Lens' UpdateProfile (Maybe Text)
upProfileARN = lens _upProfileARN (\ s a -> s{_upProfileARN = a})
upWakeWord :: Lens' UpdateProfile (Maybe WakeWord)
upWakeWord = lens _upWakeWord (\ s a -> s{_upWakeWord = a})
upProfileName :: Lens' UpdateProfile (Maybe Text)
upProfileName = lens _upProfileName (\ s a -> s{_upProfileName = a})
upTemperatureUnit :: Lens' UpdateProfile (Maybe TemperatureUnit)
upTemperatureUnit = lens _upTemperatureUnit (\ s a -> s{_upTemperatureUnit = a})
upTimezone :: Lens' UpdateProfile (Maybe Text)
upTimezone = lens _upTimezone (\ s a -> s{_upTimezone = a})
upMaxVolumeLimit :: Lens' UpdateProfile (Maybe Int)
upMaxVolumeLimit = lens _upMaxVolumeLimit (\ s a -> s{_upMaxVolumeLimit = a})
instance AWSRequest UpdateProfile where
type Rs UpdateProfile = UpdateProfileResponse
request = postJSON alexaBusiness
response
= receiveEmpty
(\ s h x ->
UpdateProfileResponse' <$> (pure (fromEnum s)))
instance Hashable UpdateProfile where
instance NFData UpdateProfile where
instance ToHeaders UpdateProfile where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AlexaForBusiness.UpdateProfile" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateProfile where
toJSON UpdateProfile'{..}
= object
(catMaybes
[("SetupModeDisabled" .=) <$> _upSetupModeDisabled,
("PSTNEnabled" .=) <$> _upPSTNEnabled,
("DistanceUnit" .=) <$> _upDistanceUnit,
("Address" .=) <$> _upAddress,
("ProfileArn" .=) <$> _upProfileARN,
("WakeWord" .=) <$> _upWakeWord,
("ProfileName" .=) <$> _upProfileName,
("TemperatureUnit" .=) <$> _upTemperatureUnit,
("Timezone" .=) <$> _upTimezone,
("MaxVolumeLimit" .=) <$> _upMaxVolumeLimit])
instance ToPath UpdateProfile where
toPath = const "/"
instance ToQuery UpdateProfile where
toQuery = const mempty
newtype UpdateProfileResponse = UpdateProfileResponse'
{ _uprsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateProfileResponse
:: Int
-> UpdateProfileResponse
updateProfileResponse pResponseStatus_ =
UpdateProfileResponse' {_uprsResponseStatus = pResponseStatus_}
uprsResponseStatus :: Lens' UpdateProfileResponse Int
uprsResponseStatus = lens _uprsResponseStatus (\ s a -> s{_uprsResponseStatus = a})
instance NFData UpdateProfileResponse where