{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.UpdateMeetingRoomConfiguration
-- 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)
module Amazonka.AlexaBusiness.Types.UpdateMeetingRoomConfiguration where

import Amazonka.AlexaBusiness.Types.UpdateEndOfMeetingReminder
import Amazonka.AlexaBusiness.Types.UpdateInstantBooking
import Amazonka.AlexaBusiness.Types.UpdateRequireCheckIn
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Updates meeting room settings of a room profile.
--
-- /See:/ 'newUpdateMeetingRoomConfiguration' smart constructor.
data UpdateMeetingRoomConfiguration = UpdateMeetingRoomConfiguration'
  { -- | Settings to automatically book an available room available for a
    -- configured duration when joining a meeting with Alexa.
    UpdateMeetingRoomConfiguration -> Maybe UpdateInstantBooking
instantBooking :: Prelude.Maybe UpdateInstantBooking,
    -- | Settings for the end of meeting reminder feature that are applied to a
    -- room profile. The end of meeting reminder enables Alexa to remind users
    -- when a meeting is ending.
    UpdateMeetingRoomConfiguration -> Maybe UpdateEndOfMeetingReminder
endOfMeetingReminder :: Prelude.Maybe UpdateEndOfMeetingReminder,
    -- | Settings for requiring a check in when a room is reserved. Alexa can
    -- cancel a room reservation if it\'s not checked into to make the room
    -- available for others. Users can check in by joining the meeting with
    -- Alexa or an AVS device, or by saying “Alexa, check in.”
    UpdateMeetingRoomConfiguration -> Maybe UpdateRequireCheckIn
requireCheckIn :: Prelude.Maybe UpdateRequireCheckIn,
    -- | Whether room utilization metrics are enabled or not.
    UpdateMeetingRoomConfiguration -> Maybe Bool
roomUtilizationMetricsEnabled :: Prelude.Maybe Prelude.Bool
  }
  deriving (UpdateMeetingRoomConfiguration
-> UpdateMeetingRoomConfiguration -> Bool
(UpdateMeetingRoomConfiguration
 -> UpdateMeetingRoomConfiguration -> Bool)
-> (UpdateMeetingRoomConfiguration
    -> UpdateMeetingRoomConfiguration -> Bool)
-> Eq UpdateMeetingRoomConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMeetingRoomConfiguration
-> UpdateMeetingRoomConfiguration -> Bool
$c/= :: UpdateMeetingRoomConfiguration
-> UpdateMeetingRoomConfiguration -> Bool
== :: UpdateMeetingRoomConfiguration
-> UpdateMeetingRoomConfiguration -> Bool
$c== :: UpdateMeetingRoomConfiguration
-> UpdateMeetingRoomConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateMeetingRoomConfiguration]
ReadPrec UpdateMeetingRoomConfiguration
Int -> ReadS UpdateMeetingRoomConfiguration
ReadS [UpdateMeetingRoomConfiguration]
(Int -> ReadS UpdateMeetingRoomConfiguration)
-> ReadS [UpdateMeetingRoomConfiguration]
-> ReadPrec UpdateMeetingRoomConfiguration
-> ReadPrec [UpdateMeetingRoomConfiguration]
-> Read UpdateMeetingRoomConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMeetingRoomConfiguration]
$creadListPrec :: ReadPrec [UpdateMeetingRoomConfiguration]
readPrec :: ReadPrec UpdateMeetingRoomConfiguration
$creadPrec :: ReadPrec UpdateMeetingRoomConfiguration
readList :: ReadS [UpdateMeetingRoomConfiguration]
$creadList :: ReadS [UpdateMeetingRoomConfiguration]
readsPrec :: Int -> ReadS UpdateMeetingRoomConfiguration
$creadsPrec :: Int -> ReadS UpdateMeetingRoomConfiguration
Prelude.Read, Int -> UpdateMeetingRoomConfiguration -> ShowS
[UpdateMeetingRoomConfiguration] -> ShowS
UpdateMeetingRoomConfiguration -> String
(Int -> UpdateMeetingRoomConfiguration -> ShowS)
-> (UpdateMeetingRoomConfiguration -> String)
-> ([UpdateMeetingRoomConfiguration] -> ShowS)
-> Show UpdateMeetingRoomConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMeetingRoomConfiguration] -> ShowS
$cshowList :: [UpdateMeetingRoomConfiguration] -> ShowS
show :: UpdateMeetingRoomConfiguration -> String
$cshow :: UpdateMeetingRoomConfiguration -> String
showsPrec :: Int -> UpdateMeetingRoomConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateMeetingRoomConfiguration -> ShowS
Prelude.Show, (forall x.
 UpdateMeetingRoomConfiguration
 -> Rep UpdateMeetingRoomConfiguration x)
-> (forall x.
    Rep UpdateMeetingRoomConfiguration x
    -> UpdateMeetingRoomConfiguration)
-> Generic UpdateMeetingRoomConfiguration
forall x.
Rep UpdateMeetingRoomConfiguration x
-> UpdateMeetingRoomConfiguration
forall x.
UpdateMeetingRoomConfiguration
-> Rep UpdateMeetingRoomConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateMeetingRoomConfiguration x
-> UpdateMeetingRoomConfiguration
$cfrom :: forall x.
UpdateMeetingRoomConfiguration
-> Rep UpdateMeetingRoomConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMeetingRoomConfiguration' 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:
--
-- 'instantBooking', 'updateMeetingRoomConfiguration_instantBooking' - Settings to automatically book an available room available for a
-- configured duration when joining a meeting with Alexa.
--
-- 'endOfMeetingReminder', 'updateMeetingRoomConfiguration_endOfMeetingReminder' - Settings for the end of meeting reminder feature that are applied to a
-- room profile. The end of meeting reminder enables Alexa to remind users
-- when a meeting is ending.
--
-- 'requireCheckIn', 'updateMeetingRoomConfiguration_requireCheckIn' - Settings for requiring a check in when a room is reserved. Alexa can
-- cancel a room reservation if it\'s not checked into to make the room
-- available for others. Users can check in by joining the meeting with
-- Alexa or an AVS device, or by saying “Alexa, check in.”
--
-- 'roomUtilizationMetricsEnabled', 'updateMeetingRoomConfiguration_roomUtilizationMetricsEnabled' - Whether room utilization metrics are enabled or not.
newUpdateMeetingRoomConfiguration ::
  UpdateMeetingRoomConfiguration
newUpdateMeetingRoomConfiguration :: UpdateMeetingRoomConfiguration
newUpdateMeetingRoomConfiguration =
  UpdateMeetingRoomConfiguration' :: Maybe UpdateInstantBooking
-> Maybe UpdateEndOfMeetingReminder
-> Maybe UpdateRequireCheckIn
-> Maybe Bool
-> UpdateMeetingRoomConfiguration
UpdateMeetingRoomConfiguration'
    { $sel:instantBooking:UpdateMeetingRoomConfiguration' :: Maybe UpdateInstantBooking
instantBooking =
        Maybe UpdateInstantBooking
forall a. Maybe a
Prelude.Nothing,
      $sel:endOfMeetingReminder:UpdateMeetingRoomConfiguration' :: Maybe UpdateEndOfMeetingReminder
endOfMeetingReminder = Maybe UpdateEndOfMeetingReminder
forall a. Maybe a
Prelude.Nothing,
      $sel:requireCheckIn:UpdateMeetingRoomConfiguration' :: Maybe UpdateRequireCheckIn
requireCheckIn = Maybe UpdateRequireCheckIn
forall a. Maybe a
Prelude.Nothing,
      $sel:roomUtilizationMetricsEnabled:UpdateMeetingRoomConfiguration' :: Maybe Bool
roomUtilizationMetricsEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | Settings to automatically book an available room available for a
-- configured duration when joining a meeting with Alexa.
updateMeetingRoomConfiguration_instantBooking :: Lens.Lens' UpdateMeetingRoomConfiguration (Prelude.Maybe UpdateInstantBooking)
updateMeetingRoomConfiguration_instantBooking :: (Maybe UpdateInstantBooking -> f (Maybe UpdateInstantBooking))
-> UpdateMeetingRoomConfiguration
-> f UpdateMeetingRoomConfiguration
updateMeetingRoomConfiguration_instantBooking = (UpdateMeetingRoomConfiguration -> Maybe UpdateInstantBooking)
-> (UpdateMeetingRoomConfiguration
    -> Maybe UpdateInstantBooking -> UpdateMeetingRoomConfiguration)
-> Lens
     UpdateMeetingRoomConfiguration
     UpdateMeetingRoomConfiguration
     (Maybe UpdateInstantBooking)
     (Maybe UpdateInstantBooking)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMeetingRoomConfiguration' {Maybe UpdateInstantBooking
instantBooking :: Maybe UpdateInstantBooking
$sel:instantBooking:UpdateMeetingRoomConfiguration' :: UpdateMeetingRoomConfiguration -> Maybe UpdateInstantBooking
instantBooking} -> Maybe UpdateInstantBooking
instantBooking) (\s :: UpdateMeetingRoomConfiguration
s@UpdateMeetingRoomConfiguration' {} Maybe UpdateInstantBooking
a -> UpdateMeetingRoomConfiguration
s {$sel:instantBooking:UpdateMeetingRoomConfiguration' :: Maybe UpdateInstantBooking
instantBooking = Maybe UpdateInstantBooking
a} :: UpdateMeetingRoomConfiguration)

-- | Settings for the end of meeting reminder feature that are applied to a
-- room profile. The end of meeting reminder enables Alexa to remind users
-- when a meeting is ending.
updateMeetingRoomConfiguration_endOfMeetingReminder :: Lens.Lens' UpdateMeetingRoomConfiguration (Prelude.Maybe UpdateEndOfMeetingReminder)
updateMeetingRoomConfiguration_endOfMeetingReminder :: (Maybe UpdateEndOfMeetingReminder
 -> f (Maybe UpdateEndOfMeetingReminder))
-> UpdateMeetingRoomConfiguration
-> f UpdateMeetingRoomConfiguration
updateMeetingRoomConfiguration_endOfMeetingReminder = (UpdateMeetingRoomConfiguration
 -> Maybe UpdateEndOfMeetingReminder)
-> (UpdateMeetingRoomConfiguration
    -> Maybe UpdateEndOfMeetingReminder
    -> UpdateMeetingRoomConfiguration)
-> Lens
     UpdateMeetingRoomConfiguration
     UpdateMeetingRoomConfiguration
     (Maybe UpdateEndOfMeetingReminder)
     (Maybe UpdateEndOfMeetingReminder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMeetingRoomConfiguration' {Maybe UpdateEndOfMeetingReminder
endOfMeetingReminder :: Maybe UpdateEndOfMeetingReminder
$sel:endOfMeetingReminder:UpdateMeetingRoomConfiguration' :: UpdateMeetingRoomConfiguration -> Maybe UpdateEndOfMeetingReminder
endOfMeetingReminder} -> Maybe UpdateEndOfMeetingReminder
endOfMeetingReminder) (\s :: UpdateMeetingRoomConfiguration
s@UpdateMeetingRoomConfiguration' {} Maybe UpdateEndOfMeetingReminder
a -> UpdateMeetingRoomConfiguration
s {$sel:endOfMeetingReminder:UpdateMeetingRoomConfiguration' :: Maybe UpdateEndOfMeetingReminder
endOfMeetingReminder = Maybe UpdateEndOfMeetingReminder
a} :: UpdateMeetingRoomConfiguration)

-- | Settings for requiring a check in when a room is reserved. Alexa can
-- cancel a room reservation if it\'s not checked into to make the room
-- available for others. Users can check in by joining the meeting with
-- Alexa or an AVS device, or by saying “Alexa, check in.”
updateMeetingRoomConfiguration_requireCheckIn :: Lens.Lens' UpdateMeetingRoomConfiguration (Prelude.Maybe UpdateRequireCheckIn)
updateMeetingRoomConfiguration_requireCheckIn :: (Maybe UpdateRequireCheckIn -> f (Maybe UpdateRequireCheckIn))
-> UpdateMeetingRoomConfiguration
-> f UpdateMeetingRoomConfiguration
updateMeetingRoomConfiguration_requireCheckIn = (UpdateMeetingRoomConfiguration -> Maybe UpdateRequireCheckIn)
-> (UpdateMeetingRoomConfiguration
    -> Maybe UpdateRequireCheckIn -> UpdateMeetingRoomConfiguration)
-> Lens
     UpdateMeetingRoomConfiguration
     UpdateMeetingRoomConfiguration
     (Maybe UpdateRequireCheckIn)
     (Maybe UpdateRequireCheckIn)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMeetingRoomConfiguration' {Maybe UpdateRequireCheckIn
requireCheckIn :: Maybe UpdateRequireCheckIn
$sel:requireCheckIn:UpdateMeetingRoomConfiguration' :: UpdateMeetingRoomConfiguration -> Maybe UpdateRequireCheckIn
requireCheckIn} -> Maybe UpdateRequireCheckIn
requireCheckIn) (\s :: UpdateMeetingRoomConfiguration
s@UpdateMeetingRoomConfiguration' {} Maybe UpdateRequireCheckIn
a -> UpdateMeetingRoomConfiguration
s {$sel:requireCheckIn:UpdateMeetingRoomConfiguration' :: Maybe UpdateRequireCheckIn
requireCheckIn = Maybe UpdateRequireCheckIn
a} :: UpdateMeetingRoomConfiguration)

-- | Whether room utilization metrics are enabled or not.
updateMeetingRoomConfiguration_roomUtilizationMetricsEnabled :: Lens.Lens' UpdateMeetingRoomConfiguration (Prelude.Maybe Prelude.Bool)
updateMeetingRoomConfiguration_roomUtilizationMetricsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> UpdateMeetingRoomConfiguration
-> f UpdateMeetingRoomConfiguration
updateMeetingRoomConfiguration_roomUtilizationMetricsEnabled = (UpdateMeetingRoomConfiguration -> Maybe Bool)
-> (UpdateMeetingRoomConfiguration
    -> Maybe Bool -> UpdateMeetingRoomConfiguration)
-> Lens
     UpdateMeetingRoomConfiguration
     UpdateMeetingRoomConfiguration
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMeetingRoomConfiguration' {Maybe Bool
roomUtilizationMetricsEnabled :: Maybe Bool
$sel:roomUtilizationMetricsEnabled:UpdateMeetingRoomConfiguration' :: UpdateMeetingRoomConfiguration -> Maybe Bool
roomUtilizationMetricsEnabled} -> Maybe Bool
roomUtilizationMetricsEnabled) (\s :: UpdateMeetingRoomConfiguration
s@UpdateMeetingRoomConfiguration' {} Maybe Bool
a -> UpdateMeetingRoomConfiguration
s {$sel:roomUtilizationMetricsEnabled:UpdateMeetingRoomConfiguration' :: Maybe Bool
roomUtilizationMetricsEnabled = Maybe Bool
a} :: UpdateMeetingRoomConfiguration)

instance
  Prelude.Hashable
    UpdateMeetingRoomConfiguration

instance
  Prelude.NFData
    UpdateMeetingRoomConfiguration

instance Core.ToJSON UpdateMeetingRoomConfiguration where
  toJSON :: UpdateMeetingRoomConfiguration -> Value
toJSON UpdateMeetingRoomConfiguration' {Maybe Bool
Maybe UpdateEndOfMeetingReminder
Maybe UpdateInstantBooking
Maybe UpdateRequireCheckIn
roomUtilizationMetricsEnabled :: Maybe Bool
requireCheckIn :: Maybe UpdateRequireCheckIn
endOfMeetingReminder :: Maybe UpdateEndOfMeetingReminder
instantBooking :: Maybe UpdateInstantBooking
$sel:roomUtilizationMetricsEnabled:UpdateMeetingRoomConfiguration' :: UpdateMeetingRoomConfiguration -> Maybe Bool
$sel:requireCheckIn:UpdateMeetingRoomConfiguration' :: UpdateMeetingRoomConfiguration -> Maybe UpdateRequireCheckIn
$sel:endOfMeetingReminder:UpdateMeetingRoomConfiguration' :: UpdateMeetingRoomConfiguration -> Maybe UpdateEndOfMeetingReminder
$sel:instantBooking:UpdateMeetingRoomConfiguration' :: UpdateMeetingRoomConfiguration -> Maybe UpdateInstantBooking
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"InstantBooking" Text -> UpdateInstantBooking -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (UpdateInstantBooking -> Pair)
-> Maybe UpdateInstantBooking -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateInstantBooking
instantBooking,
            (Text
"EndOfMeetingReminder" Text -> UpdateEndOfMeetingReminder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (UpdateEndOfMeetingReminder -> Pair)
-> Maybe UpdateEndOfMeetingReminder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateEndOfMeetingReminder
endOfMeetingReminder,
            (Text
"RequireCheckIn" Text -> UpdateRequireCheckIn -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (UpdateRequireCheckIn -> Pair)
-> Maybe UpdateRequireCheckIn -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateRequireCheckIn
requireCheckIn,
            (Text
"RoomUtilizationMetricsEnabled" 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
roomUtilizationMetricsEnabled
          ]
      )