{-# 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.CreateProfile
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new room profile with the specified details.
module Amazonka.AlexaBusiness.CreateProfile
  ( -- * Creating a Request
    CreateProfile (..),
    newCreateProfile,

    -- * Request Lenses
    createProfile_clientRequestToken,
    createProfile_dataRetentionOptIn,
    createProfile_locale,
    createProfile_maxVolumeLimit,
    createProfile_meetingRoomConfiguration,
    createProfile_pSTNEnabled,
    createProfile_setupModeDisabled,
    createProfile_tags,
    createProfile_profileName,
    createProfile_timezone,
    createProfile_address,
    createProfile_distanceUnit,
    createProfile_temperatureUnit,
    createProfile_wakeWord,

    -- * Destructuring the Response
    CreateProfileResponse (..),
    newCreateProfileResponse,

    -- * Response Lenses
    createProfileResponse_profileArn,
    createProfileResponse_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:/ 'newCreateProfile' smart constructor.
data CreateProfile = CreateProfile'
  { -- | The user-specified token that is used during the creation of a profile.
    CreateProfile -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Whether data retention of the profile is enabled.
    CreateProfile -> Maybe Bool
dataRetentionOptIn :: Prelude.Maybe Prelude.Bool,
    -- | The locale of the room profile. (This is currently only available to a
    -- limited preview audience.)
    CreateProfile -> Maybe Text
locale :: Prelude.Maybe Prelude.Text,
    -- | The maximum volume limit for a room profile.
    CreateProfile -> Maybe Int
maxVolumeLimit :: Prelude.Maybe Prelude.Int,
    -- | The meeting room settings of a room profile.
    CreateProfile -> Maybe CreateMeetingRoomConfiguration
meetingRoomConfiguration :: Prelude.Maybe CreateMeetingRoomConfiguration,
    -- | Whether PSTN calling is enabled.
    CreateProfile -> Maybe Bool
pSTNEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Whether room profile setup is enabled.
    CreateProfile -> Maybe Bool
setupModeDisabled :: Prelude.Maybe Prelude.Bool,
    -- | The tags for the profile.
    CreateProfile -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of a room profile.
    CreateProfile -> Text
profileName :: Prelude.Text,
    -- | The time zone used by a room profile.
    CreateProfile -> Text
timezone :: Prelude.Text,
    -- | The valid address for the room.
    CreateProfile -> Text
address :: Prelude.Text,
    -- | The distance unit to be used by devices in the profile.
    CreateProfile -> DistanceUnit
distanceUnit :: DistanceUnit,
    -- | The temperature unit to be used by devices in the profile.
    CreateProfile -> TemperatureUnit
temperatureUnit :: TemperatureUnit,
    -- | A wake word for Alexa, Echo, Amazon, or a computer.
    CreateProfile -> WakeWord
wakeWord :: WakeWord
  }
  deriving (CreateProfile -> CreateProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateProfile -> CreateProfile -> Bool
$c/= :: CreateProfile -> CreateProfile -> Bool
== :: CreateProfile -> CreateProfile -> Bool
$c== :: CreateProfile -> CreateProfile -> Bool
Prelude.Eq, ReadPrec [CreateProfile]
ReadPrec CreateProfile
Int -> ReadS CreateProfile
ReadS [CreateProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateProfile]
$creadListPrec :: ReadPrec [CreateProfile]
readPrec :: ReadPrec CreateProfile
$creadPrec :: ReadPrec CreateProfile
readList :: ReadS [CreateProfile]
$creadList :: ReadS [CreateProfile]
readsPrec :: Int -> ReadS CreateProfile
$creadsPrec :: Int -> ReadS CreateProfile
Prelude.Read, Int -> CreateProfile -> ShowS
[CreateProfile] -> ShowS
CreateProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateProfile] -> ShowS
$cshowList :: [CreateProfile] -> ShowS
show :: CreateProfile -> String
$cshow :: CreateProfile -> String
showsPrec :: Int -> CreateProfile -> ShowS
$cshowsPrec :: Int -> CreateProfile -> ShowS
Prelude.Show, forall x. Rep CreateProfile x -> CreateProfile
forall x. CreateProfile -> Rep CreateProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateProfile x -> CreateProfile
$cfrom :: forall x. CreateProfile -> Rep CreateProfile x
Prelude.Generic)

-- |
-- Create a value of 'CreateProfile' 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:
--
-- 'clientRequestToken', 'createProfile_clientRequestToken' - The user-specified token that is used during the creation of a profile.
--
-- 'dataRetentionOptIn', 'createProfile_dataRetentionOptIn' - Whether data retention of the profile is enabled.
--
-- 'locale', 'createProfile_locale' - The locale of the room profile. (This is currently only available to a
-- limited preview audience.)
--
-- 'maxVolumeLimit', 'createProfile_maxVolumeLimit' - The maximum volume limit for a room profile.
--
-- 'meetingRoomConfiguration', 'createProfile_meetingRoomConfiguration' - The meeting room settings of a room profile.
--
-- 'pSTNEnabled', 'createProfile_pSTNEnabled' - Whether PSTN calling is enabled.
--
-- 'setupModeDisabled', 'createProfile_setupModeDisabled' - Whether room profile setup is enabled.
--
-- 'tags', 'createProfile_tags' - The tags for the profile.
--
-- 'profileName', 'createProfile_profileName' - The name of a room profile.
--
-- 'timezone', 'createProfile_timezone' - The time zone used by a room profile.
--
-- 'address', 'createProfile_address' - The valid address for the room.
--
-- 'distanceUnit', 'createProfile_distanceUnit' - The distance unit to be used by devices in the profile.
--
-- 'temperatureUnit', 'createProfile_temperatureUnit' - The temperature unit to be used by devices in the profile.
--
-- 'wakeWord', 'createProfile_wakeWord' - A wake word for Alexa, Echo, Amazon, or a computer.
newCreateProfile ::
  -- | 'profileName'
  Prelude.Text ->
  -- | 'timezone'
  Prelude.Text ->
  -- | 'address'
  Prelude.Text ->
  -- | 'distanceUnit'
  DistanceUnit ->
  -- | 'temperatureUnit'
  TemperatureUnit ->
  -- | 'wakeWord'
  WakeWord ->
  CreateProfile
newCreateProfile :: Text
-> Text
-> Text
-> DistanceUnit
-> TemperatureUnit
-> WakeWord
-> CreateProfile
newCreateProfile
  Text
pProfileName_
  Text
pTimezone_
  Text
pAddress_
  DistanceUnit
pDistanceUnit_
  TemperatureUnit
pTemperatureUnit_
  WakeWord
pWakeWord_ =
    CreateProfile'
      { $sel:clientRequestToken:CreateProfile' :: Maybe Text
clientRequestToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:dataRetentionOptIn:CreateProfile' :: Maybe Bool
dataRetentionOptIn = forall a. Maybe a
Prelude.Nothing,
        $sel:locale:CreateProfile' :: Maybe Text
locale = forall a. Maybe a
Prelude.Nothing,
        $sel:maxVolumeLimit:CreateProfile' :: Maybe Int
maxVolumeLimit = forall a. Maybe a
Prelude.Nothing,
        $sel:meetingRoomConfiguration:CreateProfile' :: Maybe CreateMeetingRoomConfiguration
meetingRoomConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:pSTNEnabled:CreateProfile' :: Maybe Bool
pSTNEnabled = forall a. Maybe a
Prelude.Nothing,
        $sel:setupModeDisabled:CreateProfile' :: Maybe Bool
setupModeDisabled = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateProfile' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:profileName:CreateProfile' :: Text
profileName = Text
pProfileName_,
        $sel:timezone:CreateProfile' :: Text
timezone = Text
pTimezone_,
        $sel:address:CreateProfile' :: Text
address = Text
pAddress_,
        $sel:distanceUnit:CreateProfile' :: DistanceUnit
distanceUnit = DistanceUnit
pDistanceUnit_,
        $sel:temperatureUnit:CreateProfile' :: TemperatureUnit
temperatureUnit = TemperatureUnit
pTemperatureUnit_,
        $sel:wakeWord:CreateProfile' :: WakeWord
wakeWord = WakeWord
pWakeWord_
      }

-- | The user-specified token that is used during the creation of a profile.
createProfile_clientRequestToken :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_clientRequestToken :: Lens' CreateProfile (Maybe Text)
createProfile_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateProfile' :: CreateProfile -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:clientRequestToken:CreateProfile' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateProfile)

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

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

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

-- | The meeting room settings of a room profile.
createProfile_meetingRoomConfiguration :: Lens.Lens' CreateProfile (Prelude.Maybe CreateMeetingRoomConfiguration)
createProfile_meetingRoomConfiguration :: Lens' CreateProfile (Maybe CreateMeetingRoomConfiguration)
createProfile_meetingRoomConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe CreateMeetingRoomConfiguration
meetingRoomConfiguration :: Maybe CreateMeetingRoomConfiguration
$sel:meetingRoomConfiguration:CreateProfile' :: CreateProfile -> Maybe CreateMeetingRoomConfiguration
meetingRoomConfiguration} -> Maybe CreateMeetingRoomConfiguration
meetingRoomConfiguration) (\s :: CreateProfile
s@CreateProfile' {} Maybe CreateMeetingRoomConfiguration
a -> CreateProfile
s {$sel:meetingRoomConfiguration:CreateProfile' :: Maybe CreateMeetingRoomConfiguration
meetingRoomConfiguration = Maybe CreateMeetingRoomConfiguration
a} :: CreateProfile)

-- | Whether PSTN calling is enabled.
createProfile_pSTNEnabled :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Bool)
createProfile_pSTNEnabled :: Lens' CreateProfile (Maybe Bool)
createProfile_pSTNEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Bool
pSTNEnabled :: Maybe Bool
$sel:pSTNEnabled:CreateProfile' :: CreateProfile -> Maybe Bool
pSTNEnabled} -> Maybe Bool
pSTNEnabled) (\s :: CreateProfile
s@CreateProfile' {} Maybe Bool
a -> CreateProfile
s {$sel:pSTNEnabled:CreateProfile' :: Maybe Bool
pSTNEnabled = Maybe Bool
a} :: CreateProfile)

-- | Whether room profile setup is enabled.
createProfile_setupModeDisabled :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Bool)
createProfile_setupModeDisabled :: Lens' CreateProfile (Maybe Bool)
createProfile_setupModeDisabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Bool
setupModeDisabled :: Maybe Bool
$sel:setupModeDisabled:CreateProfile' :: CreateProfile -> Maybe Bool
setupModeDisabled} -> Maybe Bool
setupModeDisabled) (\s :: CreateProfile
s@CreateProfile' {} Maybe Bool
a -> CreateProfile
s {$sel:setupModeDisabled:CreateProfile' :: Maybe Bool
setupModeDisabled = Maybe Bool
a} :: CreateProfile)

-- | The tags for the profile.
createProfile_tags :: Lens.Lens' CreateProfile (Prelude.Maybe [Tag])
createProfile_tags :: Lens' CreateProfile (Maybe [Tag])
createProfile_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateProfile' :: CreateProfile -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateProfile
s@CreateProfile' {} Maybe [Tag]
a -> CreateProfile
s {$sel:tags:CreateProfile' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of a room profile.
createProfile_profileName :: Lens.Lens' CreateProfile Prelude.Text
createProfile_profileName :: Lens' CreateProfile Text
createProfile_profileName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Text
profileName :: Text
$sel:profileName:CreateProfile' :: CreateProfile -> Text
profileName} -> Text
profileName) (\s :: CreateProfile
s@CreateProfile' {} Text
a -> CreateProfile
s {$sel:profileName:CreateProfile' :: Text
profileName = Text
a} :: CreateProfile)

-- | The time zone used by a room profile.
createProfile_timezone :: Lens.Lens' CreateProfile Prelude.Text
createProfile_timezone :: Lens' CreateProfile Text
createProfile_timezone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Text
timezone :: Text
$sel:timezone:CreateProfile' :: CreateProfile -> Text
timezone} -> Text
timezone) (\s :: CreateProfile
s@CreateProfile' {} Text
a -> CreateProfile
s {$sel:timezone:CreateProfile' :: Text
timezone = Text
a} :: CreateProfile)

-- | The valid address for the room.
createProfile_address :: Lens.Lens' CreateProfile Prelude.Text
createProfile_address :: Lens' CreateProfile Text
createProfile_address = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Text
address :: Text
$sel:address:CreateProfile' :: CreateProfile -> Text
address} -> Text
address) (\s :: CreateProfile
s@CreateProfile' {} Text
a -> CreateProfile
s {$sel:address:CreateProfile' :: Text
address = Text
a} :: CreateProfile)

-- | The distance unit to be used by devices in the profile.
createProfile_distanceUnit :: Lens.Lens' CreateProfile DistanceUnit
createProfile_distanceUnit :: Lens' CreateProfile DistanceUnit
createProfile_distanceUnit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {DistanceUnit
distanceUnit :: DistanceUnit
$sel:distanceUnit:CreateProfile' :: CreateProfile -> DistanceUnit
distanceUnit} -> DistanceUnit
distanceUnit) (\s :: CreateProfile
s@CreateProfile' {} DistanceUnit
a -> CreateProfile
s {$sel:distanceUnit:CreateProfile' :: DistanceUnit
distanceUnit = DistanceUnit
a} :: CreateProfile)

-- | The temperature unit to be used by devices in the profile.
createProfile_temperatureUnit :: Lens.Lens' CreateProfile TemperatureUnit
createProfile_temperatureUnit :: Lens' CreateProfile TemperatureUnit
createProfile_temperatureUnit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {TemperatureUnit
temperatureUnit :: TemperatureUnit
$sel:temperatureUnit:CreateProfile' :: CreateProfile -> TemperatureUnit
temperatureUnit} -> TemperatureUnit
temperatureUnit) (\s :: CreateProfile
s@CreateProfile' {} TemperatureUnit
a -> CreateProfile
s {$sel:temperatureUnit:CreateProfile' :: TemperatureUnit
temperatureUnit = TemperatureUnit
a} :: CreateProfile)

-- | A wake word for Alexa, Echo, Amazon, or a computer.
createProfile_wakeWord :: Lens.Lens' CreateProfile WakeWord
createProfile_wakeWord :: Lens' CreateProfile WakeWord
createProfile_wakeWord = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {WakeWord
wakeWord :: WakeWord
$sel:wakeWord:CreateProfile' :: CreateProfile -> WakeWord
wakeWord} -> WakeWord
wakeWord) (\s :: CreateProfile
s@CreateProfile' {} WakeWord
a -> CreateProfile
s {$sel:wakeWord:CreateProfile' :: WakeWord
wakeWord = WakeWord
a} :: CreateProfile)

instance Core.AWSRequest CreateProfile where
  type
    AWSResponse CreateProfile =
      CreateProfileResponse
  request :: (Service -> Service) -> CreateProfile -> Request CreateProfile
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 CreateProfile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateProfile)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateProfileResponse
CreateProfileResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ProfileArn")
            forall (f :: * -> *) a b. Applicative f => 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 CreateProfile where
  hashWithSalt :: Int -> CreateProfile -> Int
hashWithSalt Int
_salt CreateProfile' {Maybe Bool
Maybe Int
Maybe [Tag]
Maybe Text
Maybe CreateMeetingRoomConfiguration
Text
DistanceUnit
TemperatureUnit
WakeWord
wakeWord :: WakeWord
temperatureUnit :: TemperatureUnit
distanceUnit :: DistanceUnit
address :: Text
timezone :: Text
profileName :: Text
tags :: Maybe [Tag]
setupModeDisabled :: Maybe Bool
pSTNEnabled :: Maybe Bool
meetingRoomConfiguration :: Maybe CreateMeetingRoomConfiguration
maxVolumeLimit :: Maybe Int
locale :: Maybe Text
dataRetentionOptIn :: Maybe Bool
clientRequestToken :: Maybe Text
$sel:wakeWord:CreateProfile' :: CreateProfile -> WakeWord
$sel:temperatureUnit:CreateProfile' :: CreateProfile -> TemperatureUnit
$sel:distanceUnit:CreateProfile' :: CreateProfile -> DistanceUnit
$sel:address:CreateProfile' :: CreateProfile -> Text
$sel:timezone:CreateProfile' :: CreateProfile -> Text
$sel:profileName:CreateProfile' :: CreateProfile -> Text
$sel:tags:CreateProfile' :: CreateProfile -> Maybe [Tag]
$sel:setupModeDisabled:CreateProfile' :: CreateProfile -> Maybe Bool
$sel:pSTNEnabled:CreateProfile' :: CreateProfile -> Maybe Bool
$sel:meetingRoomConfiguration:CreateProfile' :: CreateProfile -> Maybe CreateMeetingRoomConfiguration
$sel:maxVolumeLimit:CreateProfile' :: CreateProfile -> Maybe Int
$sel:locale:CreateProfile' :: CreateProfile -> Maybe Text
$sel:dataRetentionOptIn:CreateProfile' :: CreateProfile -> Maybe Bool
$sel:clientRequestToken:CreateProfile' :: CreateProfile -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dataRetentionOptIn
      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 CreateMeetingRoomConfiguration
meetingRoomConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
pSTNEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
setupModeDisabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
profileName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
timezone
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
address
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DistanceUnit
distanceUnit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TemperatureUnit
temperatureUnit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` WakeWord
wakeWord

instance Prelude.NFData CreateProfile where
  rnf :: CreateProfile -> ()
rnf CreateProfile' {Maybe Bool
Maybe Int
Maybe [Tag]
Maybe Text
Maybe CreateMeetingRoomConfiguration
Text
DistanceUnit
TemperatureUnit
WakeWord
wakeWord :: WakeWord
temperatureUnit :: TemperatureUnit
distanceUnit :: DistanceUnit
address :: Text
timezone :: Text
profileName :: Text
tags :: Maybe [Tag]
setupModeDisabled :: Maybe Bool
pSTNEnabled :: Maybe Bool
meetingRoomConfiguration :: Maybe CreateMeetingRoomConfiguration
maxVolumeLimit :: Maybe Int
locale :: Maybe Text
dataRetentionOptIn :: Maybe Bool
clientRequestToken :: Maybe Text
$sel:wakeWord:CreateProfile' :: CreateProfile -> WakeWord
$sel:temperatureUnit:CreateProfile' :: CreateProfile -> TemperatureUnit
$sel:distanceUnit:CreateProfile' :: CreateProfile -> DistanceUnit
$sel:address:CreateProfile' :: CreateProfile -> Text
$sel:timezone:CreateProfile' :: CreateProfile -> Text
$sel:profileName:CreateProfile' :: CreateProfile -> Text
$sel:tags:CreateProfile' :: CreateProfile -> Maybe [Tag]
$sel:setupModeDisabled:CreateProfile' :: CreateProfile -> Maybe Bool
$sel:pSTNEnabled:CreateProfile' :: CreateProfile -> Maybe Bool
$sel:meetingRoomConfiguration:CreateProfile' :: CreateProfile -> Maybe CreateMeetingRoomConfiguration
$sel:maxVolumeLimit:CreateProfile' :: CreateProfile -> Maybe Int
$sel:locale:CreateProfile' :: CreateProfile -> Maybe Text
$sel:dataRetentionOptIn:CreateProfile' :: CreateProfile -> Maybe Bool
$sel:clientRequestToken:CreateProfile' :: CreateProfile -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      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 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 CreateMeetingRoomConfiguration
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 Bool
setupModeDisabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
profileName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
timezone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
address
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DistanceUnit
distanceUnit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TemperatureUnit
temperatureUnit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf WakeWord
wakeWord

instance Data.ToHeaders CreateProfile where
  toHeaders :: CreateProfile -> 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.CreateProfile" ::
                          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 CreateProfile where
  toJSON :: CreateProfile -> Value
toJSON CreateProfile' {Maybe Bool
Maybe Int
Maybe [Tag]
Maybe Text
Maybe CreateMeetingRoomConfiguration
Text
DistanceUnit
TemperatureUnit
WakeWord
wakeWord :: WakeWord
temperatureUnit :: TemperatureUnit
distanceUnit :: DistanceUnit
address :: Text
timezone :: Text
profileName :: Text
tags :: Maybe [Tag]
setupModeDisabled :: Maybe Bool
pSTNEnabled :: Maybe Bool
meetingRoomConfiguration :: Maybe CreateMeetingRoomConfiguration
maxVolumeLimit :: Maybe Int
locale :: Maybe Text
dataRetentionOptIn :: Maybe Bool
clientRequestToken :: Maybe Text
$sel:wakeWord:CreateProfile' :: CreateProfile -> WakeWord
$sel:temperatureUnit:CreateProfile' :: CreateProfile -> TemperatureUnit
$sel:distanceUnit:CreateProfile' :: CreateProfile -> DistanceUnit
$sel:address:CreateProfile' :: CreateProfile -> Text
$sel:timezone:CreateProfile' :: CreateProfile -> Text
$sel:profileName:CreateProfile' :: CreateProfile -> Text
$sel:tags:CreateProfile' :: CreateProfile -> Maybe [Tag]
$sel:setupModeDisabled:CreateProfile' :: CreateProfile -> Maybe Bool
$sel:pSTNEnabled:CreateProfile' :: CreateProfile -> Maybe Bool
$sel:meetingRoomConfiguration:CreateProfile' :: CreateProfile -> Maybe CreateMeetingRoomConfiguration
$sel:maxVolumeLimit:CreateProfile' :: CreateProfile -> Maybe Int
$sel:locale:CreateProfile' :: CreateProfile -> Maybe Text
$sel:dataRetentionOptIn:CreateProfile' :: CreateProfile -> Maybe Bool
$sel:clientRequestToken:CreateProfile' :: CreateProfile -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ClientRequestToken" 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
clientRequestToken,
            (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
"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 CreateMeetingRoomConfiguration
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
"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
"Tags" 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 [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"ProfileName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
profileName),
            forall a. a -> Maybe a
Prelude.Just (Key
"Timezone" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
timezone),
            forall a. a -> Maybe a
Prelude.Just (Key
"Address" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
address),
            forall a. a -> Maybe a
Prelude.Just (Key
"DistanceUnit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DistanceUnit
distanceUnit),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"TemperatureUnit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= TemperatureUnit
temperatureUnit),
            forall a. a -> Maybe a
Prelude.Just (Key
"WakeWord" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= WakeWord
wakeWord)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateProfileResponse' 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:
--
-- 'profileArn', 'createProfileResponse_profileArn' - The ARN of the newly created room profile in the response.
--
-- 'httpStatus', 'createProfileResponse_httpStatus' - The response's http status code.
newCreateProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateProfileResponse
newCreateProfileResponse :: Int -> CreateProfileResponse
newCreateProfileResponse Int
pHttpStatus_ =
  CreateProfileResponse'
    { $sel:profileArn:CreateProfileResponse' :: Maybe Text
profileArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the newly created room profile in the response.
createProfileResponse_profileArn :: Lens.Lens' CreateProfileResponse (Prelude.Maybe Prelude.Text)
createProfileResponse_profileArn :: Lens' CreateProfileResponse (Maybe Text)
createProfileResponse_profileArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfileResponse' {Maybe Text
profileArn :: Maybe Text
$sel:profileArn:CreateProfileResponse' :: CreateProfileResponse -> Maybe Text
profileArn} -> Maybe Text
profileArn) (\s :: CreateProfileResponse
s@CreateProfileResponse' {} Maybe Text
a -> CreateProfileResponse
s {$sel:profileArn:CreateProfileResponse' :: Maybe Text
profileArn = Maybe Text
a} :: CreateProfileResponse)

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

instance Prelude.NFData CreateProfileResponse where
  rnf :: CreateProfileResponse -> ()
rnf CreateProfileResponse' {Int
Maybe Text
httpStatus :: Int
profileArn :: Maybe Text
$sel:httpStatus:CreateProfileResponse' :: CreateProfileResponse -> Int
$sel:profileArn:CreateProfileResponse' :: CreateProfileResponse -> Maybe Text
..} =
    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 Int
httpStatus