{-# 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.MeetingRoomConfiguration
-- 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.MeetingRoomConfiguration where

import Amazonka.AlexaBusiness.Types.EndOfMeetingReminder
import Amazonka.AlexaBusiness.Types.InstantBooking
import Amazonka.AlexaBusiness.Types.RequireCheckIn
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Meeting room settings of a room profile.
--
-- /See:/ 'newMeetingRoomConfiguration' smart constructor.
data MeetingRoomConfiguration = MeetingRoomConfiguration'
  { -- | Settings to automatically book the room if available for a configured
    -- duration when joining a meeting with Alexa.
    MeetingRoomConfiguration -> Maybe InstantBooking
instantBooking :: Prelude.Maybe InstantBooking,
    -- | 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.
    MeetingRoomConfiguration -> Maybe EndOfMeetingReminder
endOfMeetingReminder :: Prelude.Maybe EndOfMeetingReminder,
    -- | Settings for requiring a check in when a room is reserved. Alexa can
    -- cancel a room reservation if it\'s not checked into. This makes 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.”
    MeetingRoomConfiguration -> Maybe RequireCheckIn
requireCheckIn :: Prelude.Maybe RequireCheckIn,
    -- | Whether room utilization metrics are enabled or not.
    MeetingRoomConfiguration -> Maybe Bool
roomUtilizationMetricsEnabled :: Prelude.Maybe Prelude.Bool
  }
  deriving (MeetingRoomConfiguration -> MeetingRoomConfiguration -> Bool
(MeetingRoomConfiguration -> MeetingRoomConfiguration -> Bool)
-> (MeetingRoomConfiguration -> MeetingRoomConfiguration -> Bool)
-> Eq MeetingRoomConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MeetingRoomConfiguration -> MeetingRoomConfiguration -> Bool
$c/= :: MeetingRoomConfiguration -> MeetingRoomConfiguration -> Bool
== :: MeetingRoomConfiguration -> MeetingRoomConfiguration -> Bool
$c== :: MeetingRoomConfiguration -> MeetingRoomConfiguration -> Bool
Prelude.Eq, ReadPrec [MeetingRoomConfiguration]
ReadPrec MeetingRoomConfiguration
Int -> ReadS MeetingRoomConfiguration
ReadS [MeetingRoomConfiguration]
(Int -> ReadS MeetingRoomConfiguration)
-> ReadS [MeetingRoomConfiguration]
-> ReadPrec MeetingRoomConfiguration
-> ReadPrec [MeetingRoomConfiguration]
-> Read MeetingRoomConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MeetingRoomConfiguration]
$creadListPrec :: ReadPrec [MeetingRoomConfiguration]
readPrec :: ReadPrec MeetingRoomConfiguration
$creadPrec :: ReadPrec MeetingRoomConfiguration
readList :: ReadS [MeetingRoomConfiguration]
$creadList :: ReadS [MeetingRoomConfiguration]
readsPrec :: Int -> ReadS MeetingRoomConfiguration
$creadsPrec :: Int -> ReadS MeetingRoomConfiguration
Prelude.Read, Int -> MeetingRoomConfiguration -> ShowS
[MeetingRoomConfiguration] -> ShowS
MeetingRoomConfiguration -> String
(Int -> MeetingRoomConfiguration -> ShowS)
-> (MeetingRoomConfiguration -> String)
-> ([MeetingRoomConfiguration] -> ShowS)
-> Show MeetingRoomConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MeetingRoomConfiguration] -> ShowS
$cshowList :: [MeetingRoomConfiguration] -> ShowS
show :: MeetingRoomConfiguration -> String
$cshow :: MeetingRoomConfiguration -> String
showsPrec :: Int -> MeetingRoomConfiguration -> ShowS
$cshowsPrec :: Int -> MeetingRoomConfiguration -> ShowS
Prelude.Show, (forall x.
 MeetingRoomConfiguration -> Rep MeetingRoomConfiguration x)
-> (forall x.
    Rep MeetingRoomConfiguration x -> MeetingRoomConfiguration)
-> Generic MeetingRoomConfiguration
forall x.
Rep MeetingRoomConfiguration x -> MeetingRoomConfiguration
forall x.
MeetingRoomConfiguration -> Rep MeetingRoomConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MeetingRoomConfiguration x -> MeetingRoomConfiguration
$cfrom :: forall x.
MeetingRoomConfiguration -> Rep MeetingRoomConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'MeetingRoomConfiguration' 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', 'meetingRoomConfiguration_instantBooking' - Settings to automatically book the room if available for a configured
-- duration when joining a meeting with Alexa.
--
-- 'endOfMeetingReminder', 'meetingRoomConfiguration_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', 'meetingRoomConfiguration_requireCheckIn' - Settings for requiring a check in when a room is reserved. Alexa can
-- cancel a room reservation if it\'s not checked into. This makes 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', 'meetingRoomConfiguration_roomUtilizationMetricsEnabled' - Whether room utilization metrics are enabled or not.
newMeetingRoomConfiguration ::
  MeetingRoomConfiguration
newMeetingRoomConfiguration :: MeetingRoomConfiguration
newMeetingRoomConfiguration =
  MeetingRoomConfiguration' :: Maybe InstantBooking
-> Maybe EndOfMeetingReminder
-> Maybe RequireCheckIn
-> Maybe Bool
-> MeetingRoomConfiguration
MeetingRoomConfiguration'
    { $sel:instantBooking:MeetingRoomConfiguration' :: Maybe InstantBooking
instantBooking =
        Maybe InstantBooking
forall a. Maybe a
Prelude.Nothing,
      $sel:endOfMeetingReminder:MeetingRoomConfiguration' :: Maybe EndOfMeetingReminder
endOfMeetingReminder = Maybe EndOfMeetingReminder
forall a. Maybe a
Prelude.Nothing,
      $sel:requireCheckIn:MeetingRoomConfiguration' :: Maybe RequireCheckIn
requireCheckIn = Maybe RequireCheckIn
forall a. Maybe a
Prelude.Nothing,
      $sel:roomUtilizationMetricsEnabled:MeetingRoomConfiguration' :: Maybe Bool
roomUtilizationMetricsEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

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

-- | 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.
meetingRoomConfiguration_endOfMeetingReminder :: Lens.Lens' MeetingRoomConfiguration (Prelude.Maybe EndOfMeetingReminder)
meetingRoomConfiguration_endOfMeetingReminder :: (Maybe EndOfMeetingReminder -> f (Maybe EndOfMeetingReminder))
-> MeetingRoomConfiguration -> f MeetingRoomConfiguration
meetingRoomConfiguration_endOfMeetingReminder = (MeetingRoomConfiguration -> Maybe EndOfMeetingReminder)
-> (MeetingRoomConfiguration
    -> Maybe EndOfMeetingReminder -> MeetingRoomConfiguration)
-> Lens
     MeetingRoomConfiguration
     MeetingRoomConfiguration
     (Maybe EndOfMeetingReminder)
     (Maybe EndOfMeetingReminder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MeetingRoomConfiguration' {Maybe EndOfMeetingReminder
endOfMeetingReminder :: Maybe EndOfMeetingReminder
$sel:endOfMeetingReminder:MeetingRoomConfiguration' :: MeetingRoomConfiguration -> Maybe EndOfMeetingReminder
endOfMeetingReminder} -> Maybe EndOfMeetingReminder
endOfMeetingReminder) (\s :: MeetingRoomConfiguration
s@MeetingRoomConfiguration' {} Maybe EndOfMeetingReminder
a -> MeetingRoomConfiguration
s {$sel:endOfMeetingReminder:MeetingRoomConfiguration' :: Maybe EndOfMeetingReminder
endOfMeetingReminder = Maybe EndOfMeetingReminder
a} :: MeetingRoomConfiguration)

-- | Settings for requiring a check in when a room is reserved. Alexa can
-- cancel a room reservation if it\'s not checked into. This makes 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.”
meetingRoomConfiguration_requireCheckIn :: Lens.Lens' MeetingRoomConfiguration (Prelude.Maybe RequireCheckIn)
meetingRoomConfiguration_requireCheckIn :: (Maybe RequireCheckIn -> f (Maybe RequireCheckIn))
-> MeetingRoomConfiguration -> f MeetingRoomConfiguration
meetingRoomConfiguration_requireCheckIn = (MeetingRoomConfiguration -> Maybe RequireCheckIn)
-> (MeetingRoomConfiguration
    -> Maybe RequireCheckIn -> MeetingRoomConfiguration)
-> Lens
     MeetingRoomConfiguration
     MeetingRoomConfiguration
     (Maybe RequireCheckIn)
     (Maybe RequireCheckIn)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MeetingRoomConfiguration' {Maybe RequireCheckIn
requireCheckIn :: Maybe RequireCheckIn
$sel:requireCheckIn:MeetingRoomConfiguration' :: MeetingRoomConfiguration -> Maybe RequireCheckIn
requireCheckIn} -> Maybe RequireCheckIn
requireCheckIn) (\s :: MeetingRoomConfiguration
s@MeetingRoomConfiguration' {} Maybe RequireCheckIn
a -> MeetingRoomConfiguration
s {$sel:requireCheckIn:MeetingRoomConfiguration' :: Maybe RequireCheckIn
requireCheckIn = Maybe RequireCheckIn
a} :: MeetingRoomConfiguration)

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

instance Core.FromJSON MeetingRoomConfiguration where
  parseJSON :: Value -> Parser MeetingRoomConfiguration
parseJSON =
    String
-> (Object -> Parser MeetingRoomConfiguration)
-> Value
-> Parser MeetingRoomConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MeetingRoomConfiguration"
      ( \Object
x ->
          Maybe InstantBooking
-> Maybe EndOfMeetingReminder
-> Maybe RequireCheckIn
-> Maybe Bool
-> MeetingRoomConfiguration
MeetingRoomConfiguration'
            (Maybe InstantBooking
 -> Maybe EndOfMeetingReminder
 -> Maybe RequireCheckIn
 -> Maybe Bool
 -> MeetingRoomConfiguration)
-> Parser (Maybe InstantBooking)
-> Parser
     (Maybe EndOfMeetingReminder
      -> Maybe RequireCheckIn -> Maybe Bool -> MeetingRoomConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe InstantBooking)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstantBooking")
            Parser
  (Maybe EndOfMeetingReminder
   -> Maybe RequireCheckIn -> Maybe Bool -> MeetingRoomConfiguration)
-> Parser (Maybe EndOfMeetingReminder)
-> Parser
     (Maybe RequireCheckIn -> Maybe Bool -> MeetingRoomConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndOfMeetingReminder)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndOfMeetingReminder")
            Parser
  (Maybe RequireCheckIn -> Maybe Bool -> MeetingRoomConfiguration)
-> Parser (Maybe RequireCheckIn)
-> Parser (Maybe Bool -> MeetingRoomConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RequireCheckIn)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequireCheckIn")
            Parser (Maybe Bool -> MeetingRoomConfiguration)
-> Parser (Maybe Bool) -> Parser MeetingRoomConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoomUtilizationMetricsEnabled")
      )

instance Prelude.Hashable MeetingRoomConfiguration

instance Prelude.NFData MeetingRoomConfiguration