{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AlexaBusiness.UpdateProfile
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates an existing room profile by room profile ARN.
module Amazonka.AlexaBusiness.UpdateProfile
  ( -- * Creating a Request
    UpdateProfile (..),
    newUpdateProfile,

    -- * Request Lenses
    updateProfile_setupModeDisabled,
    updateProfile_pSTNEnabled,
    updateProfile_distanceUnit,
    updateProfile_locale,
    updateProfile_address,
    updateProfile_profileArn,
    updateProfile_wakeWord,
    updateProfile_meetingRoomConfiguration,
    updateProfile_profileName,
    updateProfile_temperatureUnit,
    updateProfile_dataRetentionOptIn,
    updateProfile_timezone,
    updateProfile_maxVolumeLimit,
    updateProfile_isDefault,

    -- * Destructuring the Response
    UpdateProfileResponse (..),
    newUpdateProfileResponse,

    -- * Response Lenses
    updateProfileResponse_httpStatus,
  )
where

import Amazonka.AlexaBusiness.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateProfile' smart constructor.
data UpdateProfile = UpdateProfile'
  { -- | Whether the setup mode of the profile is enabled.
    UpdateProfile -> Maybe Bool
setupModeDisabled :: Prelude.Maybe Prelude.Bool,
    -- | Whether the PSTN setting of the room profile is enabled.
    UpdateProfile -> Maybe Bool
pSTNEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The updated distance unit for the room profile.
    UpdateProfile -> Maybe DistanceUnit
distanceUnit :: Prelude.Maybe DistanceUnit,
    -- | The updated locale for the room profile. (This is currently only
    -- available to a limited preview audience.)
    UpdateProfile -> Maybe Text
locale :: Prelude.Maybe Prelude.Text,
    -- | The updated address for the room profile.
    UpdateProfile -> Maybe Text
address :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the room profile to update. Required.
    UpdateProfile -> Maybe Text
profileArn :: Prelude.Maybe Prelude.Text,
    -- | The updated wake word for the room profile.
    UpdateProfile -> Maybe WakeWord
wakeWord :: Prelude.Maybe WakeWord,
    -- | The updated meeting room settings of a room profile.
    UpdateProfile -> Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration :: Prelude.Maybe UpdateMeetingRoomConfiguration,
    -- | The updated name for the room profile.
    UpdateProfile -> Maybe Text
profileName :: Prelude.Maybe Prelude.Text,
    -- | The updated temperature unit for the room profile.
    UpdateProfile -> Maybe TemperatureUnit
temperatureUnit :: Prelude.Maybe TemperatureUnit,
    -- | Whether data retention of the profile is enabled.
    UpdateProfile -> Maybe Bool
dataRetentionOptIn :: Prelude.Maybe Prelude.Bool,
    -- | The updated timezone for the room profile.
    UpdateProfile -> Maybe Text
timezone :: Prelude.Maybe Prelude.Text,
    -- | The updated maximum volume limit for the room profile.
    UpdateProfile -> Maybe Int
maxVolumeLimit :: Prelude.Maybe Prelude.Int,
    -- | Sets the profile as default if selected. If this is missing, no update
    -- is done to the default status.
    UpdateProfile -> Maybe Bool
isDefault :: Prelude.Maybe Prelude.Bool
  }
  deriving (UpdateProfile -> UpdateProfile -> Bool
(UpdateProfile -> UpdateProfile -> Bool)
-> (UpdateProfile -> UpdateProfile -> Bool) -> Eq UpdateProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProfile -> UpdateProfile -> Bool
$c/= :: UpdateProfile -> UpdateProfile -> Bool
== :: UpdateProfile -> UpdateProfile -> Bool
$c== :: UpdateProfile -> UpdateProfile -> Bool
Prelude.Eq, ReadPrec [UpdateProfile]
ReadPrec UpdateProfile
Int -> ReadS UpdateProfile
ReadS [UpdateProfile]
(Int -> ReadS UpdateProfile)
-> ReadS [UpdateProfile]
-> ReadPrec UpdateProfile
-> ReadPrec [UpdateProfile]
-> Read UpdateProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProfile]
$creadListPrec :: ReadPrec [UpdateProfile]
readPrec :: ReadPrec UpdateProfile
$creadPrec :: ReadPrec UpdateProfile
readList :: ReadS [UpdateProfile]
$creadList :: ReadS [UpdateProfile]
readsPrec :: Int -> ReadS UpdateProfile
$creadsPrec :: Int -> ReadS UpdateProfile
Prelude.Read, Int -> UpdateProfile -> ShowS
[UpdateProfile] -> ShowS
UpdateProfile -> String
(Int -> UpdateProfile -> ShowS)
-> (UpdateProfile -> String)
-> ([UpdateProfile] -> ShowS)
-> Show UpdateProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProfile] -> ShowS
$cshowList :: [UpdateProfile] -> ShowS
show :: UpdateProfile -> String
$cshow :: UpdateProfile -> String
showsPrec :: Int -> UpdateProfile -> ShowS
$cshowsPrec :: Int -> UpdateProfile -> ShowS
Prelude.Show, (forall x. UpdateProfile -> Rep UpdateProfile x)
-> (forall x. Rep UpdateProfile x -> UpdateProfile)
-> Generic UpdateProfile
forall x. Rep UpdateProfile x -> UpdateProfile
forall x. UpdateProfile -> Rep UpdateProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateProfile x -> UpdateProfile
$cfrom :: forall x. UpdateProfile -> Rep UpdateProfile x
Prelude.Generic)

-- |
-- Create a value of 'UpdateProfile' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'setupModeDisabled', 'updateProfile_setupModeDisabled' - Whether the setup mode of the profile is enabled.
--
-- 'pSTNEnabled', 'updateProfile_pSTNEnabled' - Whether the PSTN setting of the room profile is enabled.
--
-- 'distanceUnit', 'updateProfile_distanceUnit' - The updated distance unit for the room profile.
--
-- 'locale', 'updateProfile_locale' - The updated locale for the room profile. (This is currently only
-- available to a limited preview audience.)
--
-- 'address', 'updateProfile_address' - The updated address for the room profile.
--
-- 'profileArn', 'updateProfile_profileArn' - The ARN of the room profile to update. Required.
--
-- 'wakeWord', 'updateProfile_wakeWord' - The updated wake word for the room profile.
--
-- 'meetingRoomConfiguration', 'updateProfile_meetingRoomConfiguration' - The updated meeting room settings of a room profile.
--
-- 'profileName', 'updateProfile_profileName' - The updated name for the room profile.
--
-- 'temperatureUnit', 'updateProfile_temperatureUnit' - The updated temperature unit for the room profile.
--
-- 'dataRetentionOptIn', 'updateProfile_dataRetentionOptIn' - Whether data retention of the profile is enabled.
--
-- 'timezone', 'updateProfile_timezone' - The updated timezone for the room profile.
--
-- 'maxVolumeLimit', 'updateProfile_maxVolumeLimit' - The updated maximum volume limit for the room profile.
--
-- 'isDefault', 'updateProfile_isDefault' - Sets the profile as default if selected. If this is missing, no update
-- is done to the default status.
newUpdateProfile ::
  UpdateProfile
newUpdateProfile :: UpdateProfile
newUpdateProfile =
  UpdateProfile' :: Maybe Bool
-> Maybe Bool
-> Maybe DistanceUnit
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe WakeWord
-> Maybe UpdateMeetingRoomConfiguration
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> UpdateProfile
UpdateProfile'
    { $sel:setupModeDisabled:UpdateProfile' :: Maybe Bool
setupModeDisabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:pSTNEnabled:UpdateProfile' :: Maybe Bool
pSTNEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:distanceUnit:UpdateProfile' :: Maybe DistanceUnit
distanceUnit = Maybe DistanceUnit
forall a. Maybe a
Prelude.Nothing,
      $sel:locale:UpdateProfile' :: Maybe Text
locale = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:address:UpdateProfile' :: Maybe Text
address = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:profileArn:UpdateProfile' :: Maybe Text
profileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:wakeWord:UpdateProfile' :: Maybe WakeWord
wakeWord = Maybe WakeWord
forall a. Maybe a
Prelude.Nothing,
      $sel:meetingRoomConfiguration:UpdateProfile' :: Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration = Maybe UpdateMeetingRoomConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:profileName:UpdateProfile' :: Maybe Text
profileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:temperatureUnit:UpdateProfile' :: Maybe TemperatureUnit
temperatureUnit = Maybe TemperatureUnit
forall a. Maybe a
Prelude.Nothing,
      $sel:dataRetentionOptIn:UpdateProfile' :: Maybe Bool
dataRetentionOptIn = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:timezone:UpdateProfile' :: Maybe Text
timezone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxVolumeLimit:UpdateProfile' :: Maybe Int
maxVolumeLimit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:isDefault:UpdateProfile' :: Maybe Bool
isDefault = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | Whether the setup mode of the profile is enabled.
updateProfile_setupModeDisabled :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Bool)
updateProfile_setupModeDisabled :: (Maybe Bool -> f (Maybe Bool)) -> UpdateProfile -> f UpdateProfile
updateProfile_setupModeDisabled = (UpdateProfile -> Maybe Bool)
-> (UpdateProfile -> Maybe Bool -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Bool
setupModeDisabled :: Maybe Bool
$sel:setupModeDisabled:UpdateProfile' :: UpdateProfile -> Maybe Bool
setupModeDisabled} -> Maybe Bool
setupModeDisabled) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Bool
a -> UpdateProfile
s {$sel:setupModeDisabled:UpdateProfile' :: Maybe Bool
setupModeDisabled = Maybe Bool
a} :: UpdateProfile)

-- | Whether the PSTN setting of the room profile is enabled.
updateProfile_pSTNEnabled :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Bool)
updateProfile_pSTNEnabled :: (Maybe Bool -> f (Maybe Bool)) -> UpdateProfile -> f UpdateProfile
updateProfile_pSTNEnabled = (UpdateProfile -> Maybe Bool)
-> (UpdateProfile -> Maybe Bool -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Bool
pSTNEnabled :: Maybe Bool
$sel:pSTNEnabled:UpdateProfile' :: UpdateProfile -> Maybe Bool
pSTNEnabled} -> Maybe Bool
pSTNEnabled) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Bool
a -> UpdateProfile
s {$sel:pSTNEnabled:UpdateProfile' :: Maybe Bool
pSTNEnabled = Maybe Bool
a} :: UpdateProfile)

-- | The updated distance unit for the room profile.
updateProfile_distanceUnit :: Lens.Lens' UpdateProfile (Prelude.Maybe DistanceUnit)
updateProfile_distanceUnit :: (Maybe DistanceUnit -> f (Maybe DistanceUnit))
-> UpdateProfile -> f UpdateProfile
updateProfile_distanceUnit = (UpdateProfile -> Maybe DistanceUnit)
-> (UpdateProfile -> Maybe DistanceUnit -> UpdateProfile)
-> Lens
     UpdateProfile
     UpdateProfile
     (Maybe DistanceUnit)
     (Maybe DistanceUnit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe DistanceUnit
distanceUnit :: Maybe DistanceUnit
$sel:distanceUnit:UpdateProfile' :: UpdateProfile -> Maybe DistanceUnit
distanceUnit} -> Maybe DistanceUnit
distanceUnit) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe DistanceUnit
a -> UpdateProfile
s {$sel:distanceUnit:UpdateProfile' :: Maybe DistanceUnit
distanceUnit = Maybe DistanceUnit
a} :: UpdateProfile)

-- | The updated locale for the room profile. (This is currently only
-- available to a limited preview audience.)
updateProfile_locale :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_locale :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_locale = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
locale :: Maybe Text
$sel:locale:UpdateProfile' :: UpdateProfile -> Maybe Text
locale} -> Maybe Text
locale) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:locale:UpdateProfile' :: Maybe Text
locale = Maybe Text
a} :: UpdateProfile)

-- | The updated address for the room profile.
updateProfile_address :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_address :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_address = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
address :: Maybe Text
$sel:address:UpdateProfile' :: UpdateProfile -> Maybe Text
address} -> Maybe Text
address) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:address:UpdateProfile' :: Maybe Text
address = Maybe Text
a} :: UpdateProfile)

-- | The ARN of the room profile to update. Required.
updateProfile_profileArn :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_profileArn :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_profileArn = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
profileArn :: Maybe Text
$sel:profileArn:UpdateProfile' :: UpdateProfile -> Maybe Text
profileArn} -> Maybe Text
profileArn) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:profileArn:UpdateProfile' :: Maybe Text
profileArn = Maybe Text
a} :: UpdateProfile)

-- | The updated wake word for the room profile.
updateProfile_wakeWord :: Lens.Lens' UpdateProfile (Prelude.Maybe WakeWord)
updateProfile_wakeWord :: (Maybe WakeWord -> f (Maybe WakeWord))
-> UpdateProfile -> f UpdateProfile
updateProfile_wakeWord = (UpdateProfile -> Maybe WakeWord)
-> (UpdateProfile -> Maybe WakeWord -> UpdateProfile)
-> Lens
     UpdateProfile UpdateProfile (Maybe WakeWord) (Maybe WakeWord)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe WakeWord
wakeWord :: Maybe WakeWord
$sel:wakeWord:UpdateProfile' :: UpdateProfile -> Maybe WakeWord
wakeWord} -> Maybe WakeWord
wakeWord) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe WakeWord
a -> UpdateProfile
s {$sel:wakeWord:UpdateProfile' :: Maybe WakeWord
wakeWord = Maybe WakeWord
a} :: UpdateProfile)

-- | The updated meeting room settings of a room profile.
updateProfile_meetingRoomConfiguration :: Lens.Lens' UpdateProfile (Prelude.Maybe UpdateMeetingRoomConfiguration)
updateProfile_meetingRoomConfiguration :: (Maybe UpdateMeetingRoomConfiguration
 -> f (Maybe UpdateMeetingRoomConfiguration))
-> UpdateProfile -> f UpdateProfile
updateProfile_meetingRoomConfiguration = (UpdateProfile -> Maybe UpdateMeetingRoomConfiguration)
-> (UpdateProfile
    -> Maybe UpdateMeetingRoomConfiguration -> UpdateProfile)
-> Lens
     UpdateProfile
     UpdateProfile
     (Maybe UpdateMeetingRoomConfiguration)
     (Maybe UpdateMeetingRoomConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration :: Maybe UpdateMeetingRoomConfiguration
$sel:meetingRoomConfiguration:UpdateProfile' :: UpdateProfile -> Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration} -> Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe UpdateMeetingRoomConfiguration
a -> UpdateProfile
s {$sel:meetingRoomConfiguration:UpdateProfile' :: Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration = Maybe UpdateMeetingRoomConfiguration
a} :: UpdateProfile)

-- | The updated name for the room profile.
updateProfile_profileName :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_profileName :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_profileName = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
profileName :: Maybe Text
$sel:profileName:UpdateProfile' :: UpdateProfile -> Maybe Text
profileName} -> Maybe Text
profileName) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:profileName:UpdateProfile' :: Maybe Text
profileName = Maybe Text
a} :: UpdateProfile)

-- | The updated temperature unit for the room profile.
updateProfile_temperatureUnit :: Lens.Lens' UpdateProfile (Prelude.Maybe TemperatureUnit)
updateProfile_temperatureUnit :: (Maybe TemperatureUnit -> f (Maybe TemperatureUnit))
-> UpdateProfile -> f UpdateProfile
updateProfile_temperatureUnit = (UpdateProfile -> Maybe TemperatureUnit)
-> (UpdateProfile -> Maybe TemperatureUnit -> UpdateProfile)
-> Lens
     UpdateProfile
     UpdateProfile
     (Maybe TemperatureUnit)
     (Maybe TemperatureUnit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe TemperatureUnit
temperatureUnit :: Maybe TemperatureUnit
$sel:temperatureUnit:UpdateProfile' :: UpdateProfile -> Maybe TemperatureUnit
temperatureUnit} -> Maybe TemperatureUnit
temperatureUnit) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe TemperatureUnit
a -> UpdateProfile
s {$sel:temperatureUnit:UpdateProfile' :: Maybe TemperatureUnit
temperatureUnit = Maybe TemperatureUnit
a} :: UpdateProfile)

-- | Whether data retention of the profile is enabled.
updateProfile_dataRetentionOptIn :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Bool)
updateProfile_dataRetentionOptIn :: (Maybe Bool -> f (Maybe Bool)) -> UpdateProfile -> f UpdateProfile
updateProfile_dataRetentionOptIn = (UpdateProfile -> Maybe Bool)
-> (UpdateProfile -> Maybe Bool -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Bool
dataRetentionOptIn :: Maybe Bool
$sel:dataRetentionOptIn:UpdateProfile' :: UpdateProfile -> Maybe Bool
dataRetentionOptIn} -> Maybe Bool
dataRetentionOptIn) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Bool
a -> UpdateProfile
s {$sel:dataRetentionOptIn:UpdateProfile' :: Maybe Bool
dataRetentionOptIn = Maybe Bool
a} :: UpdateProfile)

-- | The updated timezone for the room profile.
updateProfile_timezone :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_timezone :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_timezone = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
timezone :: Maybe Text
$sel:timezone:UpdateProfile' :: UpdateProfile -> Maybe Text
timezone} -> Maybe Text
timezone) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:timezone:UpdateProfile' :: Maybe Text
timezone = Maybe Text
a} :: UpdateProfile)

-- | The updated maximum volume limit for the room profile.
updateProfile_maxVolumeLimit :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Int)
updateProfile_maxVolumeLimit :: (Maybe Int -> f (Maybe Int)) -> UpdateProfile -> f UpdateProfile
updateProfile_maxVolumeLimit = (UpdateProfile -> Maybe Int)
-> (UpdateProfile -> Maybe Int -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Int
maxVolumeLimit :: Maybe Int
$sel:maxVolumeLimit:UpdateProfile' :: UpdateProfile -> Maybe Int
maxVolumeLimit} -> Maybe Int
maxVolumeLimit) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Int
a -> UpdateProfile
s {$sel:maxVolumeLimit:UpdateProfile' :: Maybe Int
maxVolumeLimit = Maybe Int
a} :: UpdateProfile)

-- | Sets the profile as default if selected. If this is missing, no update
-- is done to the default status.
updateProfile_isDefault :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Bool)
updateProfile_isDefault :: (Maybe Bool -> f (Maybe Bool)) -> UpdateProfile -> f UpdateProfile
updateProfile_isDefault = (UpdateProfile -> Maybe Bool)
-> (UpdateProfile -> Maybe Bool -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Bool
isDefault :: Maybe Bool
$sel:isDefault:UpdateProfile' :: UpdateProfile -> Maybe Bool
isDefault} -> Maybe Bool
isDefault) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Bool
a -> UpdateProfile
s {$sel:isDefault:UpdateProfile' :: Maybe Bool
isDefault = Maybe Bool
a} :: UpdateProfile)

instance Core.AWSRequest UpdateProfile where
  type
    AWSResponse UpdateProfile =
      UpdateProfileResponse
  request :: UpdateProfile -> Request UpdateProfile
request = Service -> UpdateProfile -> Request UpdateProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateProfile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateProfile)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse UpdateProfile))
-> Logger
-> Service
-> Proxy UpdateProfile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateProfile)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateProfileResponse
UpdateProfileResponse'
            (Int -> UpdateProfileResponse)
-> Either String Int -> Either String UpdateProfileResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateProfile

instance Prelude.NFData UpdateProfile

instance Core.ToHeaders UpdateProfile where
  toHeaders :: UpdateProfile -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.UpdateProfile" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateProfile where
  toJSON :: UpdateProfile -> Value
toJSON UpdateProfile' {Maybe Bool
Maybe Int
Maybe Text
Maybe DistanceUnit
Maybe TemperatureUnit
Maybe UpdateMeetingRoomConfiguration
Maybe WakeWord
isDefault :: Maybe Bool
maxVolumeLimit :: Maybe Int
timezone :: Maybe Text
dataRetentionOptIn :: Maybe Bool
temperatureUnit :: Maybe TemperatureUnit
profileName :: Maybe Text
meetingRoomConfiguration :: Maybe UpdateMeetingRoomConfiguration
wakeWord :: Maybe WakeWord
profileArn :: Maybe Text
address :: Maybe Text
locale :: Maybe Text
distanceUnit :: Maybe DistanceUnit
pSTNEnabled :: Maybe Bool
setupModeDisabled :: Maybe Bool
$sel:isDefault:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:maxVolumeLimit:UpdateProfile' :: UpdateProfile -> Maybe Int
$sel:timezone:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:dataRetentionOptIn:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:temperatureUnit:UpdateProfile' :: UpdateProfile -> Maybe TemperatureUnit
$sel:profileName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:meetingRoomConfiguration:UpdateProfile' :: UpdateProfile -> Maybe UpdateMeetingRoomConfiguration
$sel:wakeWord:UpdateProfile' :: UpdateProfile -> Maybe WakeWord
$sel:profileArn:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:address:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:locale:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:distanceUnit:UpdateProfile' :: UpdateProfile -> Maybe DistanceUnit
$sel:pSTNEnabled:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:setupModeDisabled:UpdateProfile' :: UpdateProfile -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"SetupModeDisabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
setupModeDisabled,
            (Text
"PSTNEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
pSTNEnabled,
            (Text
"DistanceUnit" Text -> DistanceUnit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DistanceUnit -> Pair) -> Maybe DistanceUnit -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DistanceUnit
distanceUnit,
            (Text
"Locale" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
locale,
            (Text
"Address" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
address,
            (Text
"ProfileArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
profileArn,
            (Text
"WakeWord" Text -> WakeWord -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (WakeWord -> Pair) -> Maybe WakeWord -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WakeWord
wakeWord,
            (Text
"MeetingRoomConfiguration" Text -> UpdateMeetingRoomConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (UpdateMeetingRoomConfiguration -> Pair)
-> Maybe UpdateMeetingRoomConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration,
            (Text
"ProfileName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
profileName,
            (Text
"TemperatureUnit" Text -> TemperatureUnit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (TemperatureUnit -> Pair) -> Maybe TemperatureUnit -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemperatureUnit
temperatureUnit,
            (Text
"DataRetentionOptIn" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dataRetentionOptIn,
            (Text
"Timezone" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
timezone,
            (Text
"MaxVolumeLimit" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxVolumeLimit,
            (Text
"IsDefault" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isDefault
          ]
      )

instance Core.ToPath UpdateProfile where
  toPath :: UpdateProfile -> ByteString
toPath = ByteString -> UpdateProfile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery UpdateProfile where
  toQuery :: UpdateProfile -> QueryString
toQuery = QueryString -> UpdateProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateProfileResponse' smart constructor.
data UpdateProfileResponse = UpdateProfileResponse'
  { -- | The response's http status code.
    UpdateProfileResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateProfileResponse -> UpdateProfileResponse -> Bool
(UpdateProfileResponse -> UpdateProfileResponse -> Bool)
-> (UpdateProfileResponse -> UpdateProfileResponse -> Bool)
-> Eq UpdateProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProfileResponse -> UpdateProfileResponse -> Bool
$c/= :: UpdateProfileResponse -> UpdateProfileResponse -> Bool
== :: UpdateProfileResponse -> UpdateProfileResponse -> Bool
$c== :: UpdateProfileResponse -> UpdateProfileResponse -> Bool
Prelude.Eq, ReadPrec [UpdateProfileResponse]
ReadPrec UpdateProfileResponse
Int -> ReadS UpdateProfileResponse
ReadS [UpdateProfileResponse]
(Int -> ReadS UpdateProfileResponse)
-> ReadS [UpdateProfileResponse]
-> ReadPrec UpdateProfileResponse
-> ReadPrec [UpdateProfileResponse]
-> Read UpdateProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProfileResponse]
$creadListPrec :: ReadPrec [UpdateProfileResponse]
readPrec :: ReadPrec UpdateProfileResponse
$creadPrec :: ReadPrec UpdateProfileResponse
readList :: ReadS [UpdateProfileResponse]
$creadList :: ReadS [UpdateProfileResponse]
readsPrec :: Int -> ReadS UpdateProfileResponse
$creadsPrec :: Int -> ReadS UpdateProfileResponse
Prelude.Read, Int -> UpdateProfileResponse -> ShowS
[UpdateProfileResponse] -> ShowS
UpdateProfileResponse -> String
(Int -> UpdateProfileResponse -> ShowS)
-> (UpdateProfileResponse -> String)
-> ([UpdateProfileResponse] -> ShowS)
-> Show UpdateProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProfileResponse] -> ShowS
$cshowList :: [UpdateProfileResponse] -> ShowS
show :: UpdateProfileResponse -> String
$cshow :: UpdateProfileResponse -> String
showsPrec :: Int -> UpdateProfileResponse -> ShowS
$cshowsPrec :: Int -> UpdateProfileResponse -> ShowS
Prelude.Show, (forall x. UpdateProfileResponse -> Rep UpdateProfileResponse x)
-> (forall x. Rep UpdateProfileResponse x -> UpdateProfileResponse)
-> Generic UpdateProfileResponse
forall x. Rep UpdateProfileResponse x -> UpdateProfileResponse
forall x. UpdateProfileResponse -> Rep UpdateProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateProfileResponse x -> UpdateProfileResponse
$cfrom :: forall x. UpdateProfileResponse -> Rep UpdateProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateProfileResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'updateProfileResponse_httpStatus' - The response's http status code.
newUpdateProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateProfileResponse
newUpdateProfileResponse :: Int -> UpdateProfileResponse
newUpdateProfileResponse Int
pHttpStatus_ =
  UpdateProfileResponse' :: Int -> UpdateProfileResponse
UpdateProfileResponse' {$sel:httpStatus:UpdateProfileResponse' :: Int
httpStatus = Int
pHttpStatus_}

-- | The response's http status code.
updateProfileResponse_httpStatus :: Lens.Lens' UpdateProfileResponse Prelude.Int
updateProfileResponse_httpStatus :: (Int -> f Int) -> UpdateProfileResponse -> f UpdateProfileResponse
updateProfileResponse_httpStatus = (UpdateProfileResponse -> Int)
-> (UpdateProfileResponse -> Int -> UpdateProfileResponse)
-> Lens UpdateProfileResponse UpdateProfileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateProfileResponse' :: UpdateProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateProfileResponse
s@UpdateProfileResponse' {} Int
a -> UpdateProfileResponse
s {$sel:httpStatus:UpdateProfileResponse' :: Int
httpStatus = Int
a} :: UpdateProfileResponse)

instance Prelude.NFData UpdateProfileResponse