{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_address,
    updateProfile_dataRetentionOptIn,
    updateProfile_distanceUnit,
    updateProfile_isDefault,
    updateProfile_locale,
    updateProfile_maxVolumeLimit,
    updateProfile_meetingRoomConfiguration,
    updateProfile_pSTNEnabled,
    updateProfile_profileArn,
    updateProfile_profileName,
    updateProfile_setupModeDisabled,
    updateProfile_temperatureUnit,
    updateProfile_timezone,
    updateProfile_wakeWord,

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

    -- * Response Lenses
    updateProfileResponse_httpStatus,
  )
where

import Amazonka.AlexaBusiness.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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'
  { -- | The updated address for the room profile.
    UpdateProfile -> Maybe Text
address :: Prelude.Maybe Prelude.Text,
    -- | Whether data retention of the profile is enabled.
    UpdateProfile -> Maybe Bool
dataRetentionOptIn :: Prelude.Maybe Prelude.Bool,
    -- | The updated distance unit for the room profile.
    UpdateProfile -> Maybe DistanceUnit
distanceUnit :: Prelude.Maybe DistanceUnit,
    -- | 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,
    -- | 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 maximum volume limit for the room profile.
    UpdateProfile -> Maybe Int
maxVolumeLimit :: Prelude.Maybe Prelude.Int,
    -- | The updated meeting room settings of a room profile.
    UpdateProfile -> Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration :: Prelude.Maybe UpdateMeetingRoomConfiguration,
    -- | Whether the PSTN setting of the room profile is enabled.
    UpdateProfile -> Maybe Bool
pSTNEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The ARN of the room profile to update. Required.
    UpdateProfile -> Maybe Text
profileArn :: Prelude.Maybe Prelude.Text,
    -- | The updated name for the room profile.
    UpdateProfile -> Maybe Text
profileName :: Prelude.Maybe Prelude.Text,
    -- | Whether the setup mode of the profile is enabled.
    UpdateProfile -> Maybe Bool
setupModeDisabled :: Prelude.Maybe Prelude.Bool,
    -- | The updated temperature unit for the room profile.
    UpdateProfile -> Maybe TemperatureUnit
temperatureUnit :: Prelude.Maybe TemperatureUnit,
    -- | The updated timezone for the room profile.
    UpdateProfile -> Maybe Text
timezone :: Prelude.Maybe Prelude.Text,
    -- | The updated wake word for the room profile.
    UpdateProfile -> Maybe WakeWord
wakeWord :: Prelude.Maybe WakeWord
  }
  deriving (UpdateProfile -> UpdateProfile -> Bool
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]
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
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. 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:
--
-- 'address', 'updateProfile_address' - The updated address for the room profile.
--
-- 'dataRetentionOptIn', 'updateProfile_dataRetentionOptIn' - Whether data retention of the profile is enabled.
--
-- 'distanceUnit', 'updateProfile_distanceUnit' - The updated distance unit 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.
--
-- 'locale', 'updateProfile_locale' - The updated locale for the room profile. (This is currently only
-- available to a limited preview audience.)
--
-- 'maxVolumeLimit', 'updateProfile_maxVolumeLimit' - The updated maximum volume limit for the room profile.
--
-- 'meetingRoomConfiguration', 'updateProfile_meetingRoomConfiguration' - The updated meeting room settings of a room profile.
--
-- 'pSTNEnabled', 'updateProfile_pSTNEnabled' - Whether the PSTN setting of the room profile is enabled.
--
-- 'profileArn', 'updateProfile_profileArn' - The ARN of the room profile to update. Required.
--
-- 'profileName', 'updateProfile_profileName' - The updated name for the room profile.
--
-- 'setupModeDisabled', 'updateProfile_setupModeDisabled' - Whether the setup mode of the profile is enabled.
--
-- 'temperatureUnit', 'updateProfile_temperatureUnit' - The updated temperature unit for the room profile.
--
-- 'timezone', 'updateProfile_timezone' - The updated timezone for the room profile.
--
-- 'wakeWord', 'updateProfile_wakeWord' - The updated wake word for the room profile.
newUpdateProfile ::
  UpdateProfile
newUpdateProfile :: UpdateProfile
newUpdateProfile =
  UpdateProfile'
    { $sel:address:UpdateProfile' :: Maybe Text
address = forall a. Maybe a
Prelude.Nothing,
      $sel:dataRetentionOptIn:UpdateProfile' :: Maybe Bool
dataRetentionOptIn = forall a. Maybe a
Prelude.Nothing,
      $sel:distanceUnit:UpdateProfile' :: Maybe DistanceUnit
distanceUnit = forall a. Maybe a
Prelude.Nothing,
      $sel:isDefault:UpdateProfile' :: Maybe Bool
isDefault = forall a. Maybe a
Prelude.Nothing,
      $sel:locale:UpdateProfile' :: Maybe Text
locale = forall a. Maybe a
Prelude.Nothing,
      $sel:maxVolumeLimit:UpdateProfile' :: Maybe Int
maxVolumeLimit = forall a. Maybe a
Prelude.Nothing,
      $sel:meetingRoomConfiguration:UpdateProfile' :: Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:pSTNEnabled:UpdateProfile' :: Maybe Bool
pSTNEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:profileArn:UpdateProfile' :: Maybe Text
profileArn = forall a. Maybe a
Prelude.Nothing,
      $sel:profileName:UpdateProfile' :: Maybe Text
profileName = forall a. Maybe a
Prelude.Nothing,
      $sel:setupModeDisabled:UpdateProfile' :: Maybe Bool
setupModeDisabled = forall a. Maybe a
Prelude.Nothing,
      $sel:temperatureUnit:UpdateProfile' :: Maybe TemperatureUnit
temperatureUnit = forall a. Maybe a
Prelude.Nothing,
      $sel:timezone:UpdateProfile' :: Maybe Text
timezone = forall a. Maybe a
Prelude.Nothing,
      $sel:wakeWord:UpdateProfile' :: Maybe WakeWord
wakeWord = forall a. Maybe a
Prelude.Nothing
    }

-- | The updated address for the room profile.
updateProfile_address :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_address :: Lens' UpdateProfile (Maybe Text)
updateProfile_address = 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)

-- | Whether data retention of the profile is enabled.
updateProfile_dataRetentionOptIn :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Bool)
updateProfile_dataRetentionOptIn :: Lens' UpdateProfile (Maybe Bool)
updateProfile_dataRetentionOptIn = 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 distance unit for the room profile.
updateProfile_distanceUnit :: Lens.Lens' UpdateProfile (Prelude.Maybe DistanceUnit)
updateProfile_distanceUnit :: Lens' UpdateProfile (Maybe DistanceUnit)
updateProfile_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)

-- | 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 :: Lens' UpdateProfile (Maybe Bool)
updateProfile_isDefault = 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)

-- | 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 :: Lens' UpdateProfile (Maybe Text)
updateProfile_locale = 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 maximum volume limit for the room profile.
updateProfile_maxVolumeLimit :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Int)
updateProfile_maxVolumeLimit :: Lens' UpdateProfile (Maybe Int)
updateProfile_maxVolumeLimit = 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)

-- | The updated meeting room settings of a room profile.
updateProfile_meetingRoomConfiguration :: Lens.Lens' UpdateProfile (Prelude.Maybe UpdateMeetingRoomConfiguration)
updateProfile_meetingRoomConfiguration :: Lens' UpdateProfile (Maybe UpdateMeetingRoomConfiguration)
updateProfile_meetingRoomConfiguration = 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)

-- | Whether the PSTN setting of the room profile is enabled.
updateProfile_pSTNEnabled :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Bool)
updateProfile_pSTNEnabled :: Lens' UpdateProfile (Maybe Bool)
updateProfile_pSTNEnabled = 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 ARN of the room profile to update. Required.
updateProfile_profileArn :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_profileArn :: Lens' UpdateProfile (Maybe Text)
updateProfile_profileArn = 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 name for the room profile.
updateProfile_profileName :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_profileName :: Lens' UpdateProfile (Maybe Text)
updateProfile_profileName = 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)

-- | Whether the setup mode of the profile is enabled.
updateProfile_setupModeDisabled :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Bool)
updateProfile_setupModeDisabled :: Lens' UpdateProfile (Maybe Bool)
updateProfile_setupModeDisabled = 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)

-- | The updated temperature unit for the room profile.
updateProfile_temperatureUnit :: Lens.Lens' UpdateProfile (Prelude.Maybe TemperatureUnit)
updateProfile_temperatureUnit :: Lens' UpdateProfile (Maybe TemperatureUnit)
updateProfile_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)

-- | The updated timezone for the room profile.
updateProfile_timezone :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_timezone :: Lens' UpdateProfile (Maybe Text)
updateProfile_timezone = 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 wake word for the room profile.
updateProfile_wakeWord :: Lens.Lens' UpdateProfile (Prelude.Maybe WakeWord)
updateProfile_wakeWord :: Lens' UpdateProfile (Maybe WakeWord)
updateProfile_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)

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

instance Prelude.Hashable UpdateProfile where
  hashWithSalt :: Int -> UpdateProfile -> Int
hashWithSalt Int
_salt UpdateProfile' {Maybe Bool
Maybe Int
Maybe Text
Maybe DistanceUnit
Maybe TemperatureUnit
Maybe UpdateMeetingRoomConfiguration
Maybe WakeWord
wakeWord :: Maybe WakeWord
timezone :: Maybe Text
temperatureUnit :: Maybe TemperatureUnit
setupModeDisabled :: Maybe Bool
profileName :: Maybe Text
profileArn :: Maybe Text
pSTNEnabled :: Maybe Bool
meetingRoomConfiguration :: Maybe UpdateMeetingRoomConfiguration
maxVolumeLimit :: Maybe Int
locale :: Maybe Text
isDefault :: Maybe Bool
distanceUnit :: Maybe DistanceUnit
dataRetentionOptIn :: Maybe Bool
address :: Maybe Text
$sel:wakeWord:UpdateProfile' :: UpdateProfile -> Maybe WakeWord
$sel:timezone:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:temperatureUnit:UpdateProfile' :: UpdateProfile -> Maybe TemperatureUnit
$sel:setupModeDisabled:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:profileName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:profileArn:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:pSTNEnabled:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:meetingRoomConfiguration:UpdateProfile' :: UpdateProfile -> Maybe UpdateMeetingRoomConfiguration
$sel:maxVolumeLimit:UpdateProfile' :: UpdateProfile -> Maybe Int
$sel:locale:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:isDefault:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:distanceUnit:UpdateProfile' :: UpdateProfile -> Maybe DistanceUnit
$sel:dataRetentionOptIn:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:address:UpdateProfile' :: UpdateProfile -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
address
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dataRetentionOptIn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DistanceUnit
distanceUnit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isDefault
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
locale
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxVolumeLimit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
pSTNEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
profileArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
profileName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
setupModeDisabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TemperatureUnit
temperatureUnit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
timezone
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WakeWord
wakeWord

instance Prelude.NFData UpdateProfile where
  rnf :: UpdateProfile -> ()
rnf UpdateProfile' {Maybe Bool
Maybe Int
Maybe Text
Maybe DistanceUnit
Maybe TemperatureUnit
Maybe UpdateMeetingRoomConfiguration
Maybe WakeWord
wakeWord :: Maybe WakeWord
timezone :: Maybe Text
temperatureUnit :: Maybe TemperatureUnit
setupModeDisabled :: Maybe Bool
profileName :: Maybe Text
profileArn :: Maybe Text
pSTNEnabled :: Maybe Bool
meetingRoomConfiguration :: Maybe UpdateMeetingRoomConfiguration
maxVolumeLimit :: Maybe Int
locale :: Maybe Text
isDefault :: Maybe Bool
distanceUnit :: Maybe DistanceUnit
dataRetentionOptIn :: Maybe Bool
address :: Maybe Text
$sel:wakeWord:UpdateProfile' :: UpdateProfile -> Maybe WakeWord
$sel:timezone:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:temperatureUnit:UpdateProfile' :: UpdateProfile -> Maybe TemperatureUnit
$sel:setupModeDisabled:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:profileName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:profileArn:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:pSTNEnabled:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:meetingRoomConfiguration:UpdateProfile' :: UpdateProfile -> Maybe UpdateMeetingRoomConfiguration
$sel:maxVolumeLimit:UpdateProfile' :: UpdateProfile -> Maybe Int
$sel:locale:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:isDefault:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:distanceUnit:UpdateProfile' :: UpdateProfile -> Maybe DistanceUnit
$sel:dataRetentionOptIn:UpdateProfile' :: UpdateProfile -> Maybe Bool
$sel:address:UpdateProfile' :: UpdateProfile -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
address
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dataRetentionOptIn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DistanceUnit
distanceUnit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isDefault
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
locale
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxVolumeLimit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UpdateMeetingRoomConfiguration
meetingRoomConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
pSTNEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
profileArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
profileName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
setupModeDisabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TemperatureUnit
temperatureUnit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
timezone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WakeWord
wakeWord

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

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

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

instance Data.ToQuery UpdateProfile where
  toQuery :: UpdateProfile -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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. 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' {$sel:httpStatus:UpdateProfileResponse' :: Int
httpStatus = Int
pHttpStatus_}

-- | The response's http status code.
updateProfileResponse_httpStatus :: Lens.Lens' UpdateProfileResponse Prelude.Int
updateProfileResponse_httpStatus :: Lens' UpdateProfileResponse Int
updateProfileResponse_httpStatus = 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 where
  rnf :: UpdateProfileResponse -> ()
rnf UpdateProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateProfileResponse' :: UpdateProfileResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus