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

import Amazonka.AlexaBusiness.Types.CreateEndOfMeetingReminder
import Amazonka.AlexaBusiness.Types.CreateInstantBooking
import Amazonka.AlexaBusiness.Types.CreateRequireCheckIn
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Creates meeting room settings of a room profile.
--
-- /See:/ 'newCreateMeetingRoomConfiguration' smart constructor.
data CreateMeetingRoomConfiguration = CreateMeetingRoomConfiguration'
  { -- | Settings to automatically book a room for a configured duration if it\'s
    -- free when joining a meeting with Alexa.
    CreateMeetingRoomConfiguration -> Maybe CreateInstantBooking
instantBooking :: Prelude.Maybe CreateInstantBooking,
    CreateMeetingRoomConfiguration -> Maybe CreateEndOfMeetingReminder
endOfMeetingReminder :: Prelude.Maybe CreateEndOfMeetingReminder,
    -- | 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.”
    CreateMeetingRoomConfiguration -> Maybe CreateRequireCheckIn
requireCheckIn :: Prelude.Maybe CreateRequireCheckIn,
    -- | Whether room utilization metrics are enabled or not.
    CreateMeetingRoomConfiguration -> Maybe Bool
roomUtilizationMetricsEnabled :: Prelude.Maybe Prelude.Bool
  }
  deriving (CreateMeetingRoomConfiguration
-> CreateMeetingRoomConfiguration -> Bool
(CreateMeetingRoomConfiguration
 -> CreateMeetingRoomConfiguration -> Bool)
-> (CreateMeetingRoomConfiguration
    -> CreateMeetingRoomConfiguration -> Bool)
-> Eq CreateMeetingRoomConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMeetingRoomConfiguration
-> CreateMeetingRoomConfiguration -> Bool
$c/= :: CreateMeetingRoomConfiguration
-> CreateMeetingRoomConfiguration -> Bool
== :: CreateMeetingRoomConfiguration
-> CreateMeetingRoomConfiguration -> Bool
$c== :: CreateMeetingRoomConfiguration
-> CreateMeetingRoomConfiguration -> Bool
Prelude.Eq, ReadPrec [CreateMeetingRoomConfiguration]
ReadPrec CreateMeetingRoomConfiguration
Int -> ReadS CreateMeetingRoomConfiguration
ReadS [CreateMeetingRoomConfiguration]
(Int -> ReadS CreateMeetingRoomConfiguration)
-> ReadS [CreateMeetingRoomConfiguration]
-> ReadPrec CreateMeetingRoomConfiguration
-> ReadPrec [CreateMeetingRoomConfiguration]
-> Read CreateMeetingRoomConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMeetingRoomConfiguration]
$creadListPrec :: ReadPrec [CreateMeetingRoomConfiguration]
readPrec :: ReadPrec CreateMeetingRoomConfiguration
$creadPrec :: ReadPrec CreateMeetingRoomConfiguration
readList :: ReadS [CreateMeetingRoomConfiguration]
$creadList :: ReadS [CreateMeetingRoomConfiguration]
readsPrec :: Int -> ReadS CreateMeetingRoomConfiguration
$creadsPrec :: Int -> ReadS CreateMeetingRoomConfiguration
Prelude.Read, Int -> CreateMeetingRoomConfiguration -> ShowS
[CreateMeetingRoomConfiguration] -> ShowS
CreateMeetingRoomConfiguration -> String
(Int -> CreateMeetingRoomConfiguration -> ShowS)
-> (CreateMeetingRoomConfiguration -> String)
-> ([CreateMeetingRoomConfiguration] -> ShowS)
-> Show CreateMeetingRoomConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMeetingRoomConfiguration] -> ShowS
$cshowList :: [CreateMeetingRoomConfiguration] -> ShowS
show :: CreateMeetingRoomConfiguration -> String
$cshow :: CreateMeetingRoomConfiguration -> String
showsPrec :: Int -> CreateMeetingRoomConfiguration -> ShowS
$cshowsPrec :: Int -> CreateMeetingRoomConfiguration -> ShowS
Prelude.Show, (forall x.
 CreateMeetingRoomConfiguration
 -> Rep CreateMeetingRoomConfiguration x)
-> (forall x.
    Rep CreateMeetingRoomConfiguration x
    -> CreateMeetingRoomConfiguration)
-> Generic CreateMeetingRoomConfiguration
forall x.
Rep CreateMeetingRoomConfiguration x
-> CreateMeetingRoomConfiguration
forall x.
CreateMeetingRoomConfiguration
-> Rep CreateMeetingRoomConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateMeetingRoomConfiguration x
-> CreateMeetingRoomConfiguration
$cfrom :: forall x.
CreateMeetingRoomConfiguration
-> Rep CreateMeetingRoomConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'CreateMeetingRoomConfiguration' 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', 'createMeetingRoomConfiguration_instantBooking' - Settings to automatically book a room for a configured duration if it\'s
-- free when joining a meeting with Alexa.
--
-- 'endOfMeetingReminder', 'createMeetingRoomConfiguration_endOfMeetingReminder' - Undocumented member.
--
-- 'requireCheckIn', 'createMeetingRoomConfiguration_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', 'createMeetingRoomConfiguration_roomUtilizationMetricsEnabled' - Whether room utilization metrics are enabled or not.
newCreateMeetingRoomConfiguration ::
  CreateMeetingRoomConfiguration
newCreateMeetingRoomConfiguration :: CreateMeetingRoomConfiguration
newCreateMeetingRoomConfiguration =
  CreateMeetingRoomConfiguration' :: Maybe CreateInstantBooking
-> Maybe CreateEndOfMeetingReminder
-> Maybe CreateRequireCheckIn
-> Maybe Bool
-> CreateMeetingRoomConfiguration
CreateMeetingRoomConfiguration'
    { $sel:instantBooking:CreateMeetingRoomConfiguration' :: Maybe CreateInstantBooking
instantBooking =
        Maybe CreateInstantBooking
forall a. Maybe a
Prelude.Nothing,
      $sel:endOfMeetingReminder:CreateMeetingRoomConfiguration' :: Maybe CreateEndOfMeetingReminder
endOfMeetingReminder = Maybe CreateEndOfMeetingReminder
forall a. Maybe a
Prelude.Nothing,
      $sel:requireCheckIn:CreateMeetingRoomConfiguration' :: Maybe CreateRequireCheckIn
requireCheckIn = Maybe CreateRequireCheckIn
forall a. Maybe a
Prelude.Nothing,
      $sel:roomUtilizationMetricsEnabled:CreateMeetingRoomConfiguration' :: Maybe Bool
roomUtilizationMetricsEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

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

-- | Undocumented member.
createMeetingRoomConfiguration_endOfMeetingReminder :: Lens.Lens' CreateMeetingRoomConfiguration (Prelude.Maybe CreateEndOfMeetingReminder)
createMeetingRoomConfiguration_endOfMeetingReminder :: (Maybe CreateEndOfMeetingReminder
 -> f (Maybe CreateEndOfMeetingReminder))
-> CreateMeetingRoomConfiguration
-> f CreateMeetingRoomConfiguration
createMeetingRoomConfiguration_endOfMeetingReminder = (CreateMeetingRoomConfiguration
 -> Maybe CreateEndOfMeetingReminder)
-> (CreateMeetingRoomConfiguration
    -> Maybe CreateEndOfMeetingReminder
    -> CreateMeetingRoomConfiguration)
-> Lens
     CreateMeetingRoomConfiguration
     CreateMeetingRoomConfiguration
     (Maybe CreateEndOfMeetingReminder)
     (Maybe CreateEndOfMeetingReminder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeetingRoomConfiguration' {Maybe CreateEndOfMeetingReminder
endOfMeetingReminder :: Maybe CreateEndOfMeetingReminder
$sel:endOfMeetingReminder:CreateMeetingRoomConfiguration' :: CreateMeetingRoomConfiguration -> Maybe CreateEndOfMeetingReminder
endOfMeetingReminder} -> Maybe CreateEndOfMeetingReminder
endOfMeetingReminder) (\s :: CreateMeetingRoomConfiguration
s@CreateMeetingRoomConfiguration' {} Maybe CreateEndOfMeetingReminder
a -> CreateMeetingRoomConfiguration
s {$sel:endOfMeetingReminder:CreateMeetingRoomConfiguration' :: Maybe CreateEndOfMeetingReminder
endOfMeetingReminder = Maybe CreateEndOfMeetingReminder
a} :: CreateMeetingRoomConfiguration)

-- | 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.”
createMeetingRoomConfiguration_requireCheckIn :: Lens.Lens' CreateMeetingRoomConfiguration (Prelude.Maybe CreateRequireCheckIn)
createMeetingRoomConfiguration_requireCheckIn :: (Maybe CreateRequireCheckIn -> f (Maybe CreateRequireCheckIn))
-> CreateMeetingRoomConfiguration
-> f CreateMeetingRoomConfiguration
createMeetingRoomConfiguration_requireCheckIn = (CreateMeetingRoomConfiguration -> Maybe CreateRequireCheckIn)
-> (CreateMeetingRoomConfiguration
    -> Maybe CreateRequireCheckIn -> CreateMeetingRoomConfiguration)
-> Lens
     CreateMeetingRoomConfiguration
     CreateMeetingRoomConfiguration
     (Maybe CreateRequireCheckIn)
     (Maybe CreateRequireCheckIn)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeetingRoomConfiguration' {Maybe CreateRequireCheckIn
requireCheckIn :: Maybe CreateRequireCheckIn
$sel:requireCheckIn:CreateMeetingRoomConfiguration' :: CreateMeetingRoomConfiguration -> Maybe CreateRequireCheckIn
requireCheckIn} -> Maybe CreateRequireCheckIn
requireCheckIn) (\s :: CreateMeetingRoomConfiguration
s@CreateMeetingRoomConfiguration' {} Maybe CreateRequireCheckIn
a -> CreateMeetingRoomConfiguration
s {$sel:requireCheckIn:CreateMeetingRoomConfiguration' :: Maybe CreateRequireCheckIn
requireCheckIn = Maybe CreateRequireCheckIn
a} :: CreateMeetingRoomConfiguration)

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

instance
  Prelude.Hashable
    CreateMeetingRoomConfiguration

instance
  Prelude.NFData
    CreateMeetingRoomConfiguration

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