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

import Amazonka.AlexaBusiness.Types.EndOfMeetingReminderType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | 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.
--
-- /See:/ 'newUpdateEndOfMeetingReminder' smart constructor.
data UpdateEndOfMeetingReminder = UpdateEndOfMeetingReminder'
  { -- | Whether an end of meeting reminder is enabled or not.
    UpdateEndOfMeetingReminder -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | Updates 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.
    UpdateEndOfMeetingReminder -> Maybe (NonEmpty Int)
reminderAtMinutes :: Prelude.Maybe (Prelude.NonEmpty Prelude.Int),
    -- | The type of sound that users hear during the end of meeting reminder.
    UpdateEndOfMeetingReminder -> Maybe EndOfMeetingReminderType
reminderType :: Prelude.Maybe EndOfMeetingReminderType
  }
  deriving (UpdateEndOfMeetingReminder -> UpdateEndOfMeetingReminder -> Bool
(UpdateEndOfMeetingReminder -> UpdateEndOfMeetingReminder -> Bool)
-> (UpdateEndOfMeetingReminder
    -> UpdateEndOfMeetingReminder -> Bool)
-> Eq UpdateEndOfMeetingReminder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEndOfMeetingReminder -> UpdateEndOfMeetingReminder -> Bool
$c/= :: UpdateEndOfMeetingReminder -> UpdateEndOfMeetingReminder -> Bool
== :: UpdateEndOfMeetingReminder -> UpdateEndOfMeetingReminder -> Bool
$c== :: UpdateEndOfMeetingReminder -> UpdateEndOfMeetingReminder -> Bool
Prelude.Eq, ReadPrec [UpdateEndOfMeetingReminder]
ReadPrec UpdateEndOfMeetingReminder
Int -> ReadS UpdateEndOfMeetingReminder
ReadS [UpdateEndOfMeetingReminder]
(Int -> ReadS UpdateEndOfMeetingReminder)
-> ReadS [UpdateEndOfMeetingReminder]
-> ReadPrec UpdateEndOfMeetingReminder
-> ReadPrec [UpdateEndOfMeetingReminder]
-> Read UpdateEndOfMeetingReminder
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEndOfMeetingReminder]
$creadListPrec :: ReadPrec [UpdateEndOfMeetingReminder]
readPrec :: ReadPrec UpdateEndOfMeetingReminder
$creadPrec :: ReadPrec UpdateEndOfMeetingReminder
readList :: ReadS [UpdateEndOfMeetingReminder]
$creadList :: ReadS [UpdateEndOfMeetingReminder]
readsPrec :: Int -> ReadS UpdateEndOfMeetingReminder
$creadsPrec :: Int -> ReadS UpdateEndOfMeetingReminder
Prelude.Read, Int -> UpdateEndOfMeetingReminder -> ShowS
[UpdateEndOfMeetingReminder] -> ShowS
UpdateEndOfMeetingReminder -> String
(Int -> UpdateEndOfMeetingReminder -> ShowS)
-> (UpdateEndOfMeetingReminder -> String)
-> ([UpdateEndOfMeetingReminder] -> ShowS)
-> Show UpdateEndOfMeetingReminder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEndOfMeetingReminder] -> ShowS
$cshowList :: [UpdateEndOfMeetingReminder] -> ShowS
show :: UpdateEndOfMeetingReminder -> String
$cshow :: UpdateEndOfMeetingReminder -> String
showsPrec :: Int -> UpdateEndOfMeetingReminder -> ShowS
$cshowsPrec :: Int -> UpdateEndOfMeetingReminder -> ShowS
Prelude.Show, (forall x.
 UpdateEndOfMeetingReminder -> Rep UpdateEndOfMeetingReminder x)
-> (forall x.
    Rep UpdateEndOfMeetingReminder x -> UpdateEndOfMeetingReminder)
-> Generic UpdateEndOfMeetingReminder
forall x.
Rep UpdateEndOfMeetingReminder x -> UpdateEndOfMeetingReminder
forall x.
UpdateEndOfMeetingReminder -> Rep UpdateEndOfMeetingReminder x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateEndOfMeetingReminder x -> UpdateEndOfMeetingReminder
$cfrom :: forall x.
UpdateEndOfMeetingReminder -> Rep UpdateEndOfMeetingReminder x
Prelude.Generic)

-- |
-- Create a value of 'UpdateEndOfMeetingReminder' 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:
--
-- 'enabled', 'updateEndOfMeetingReminder_enabled' - Whether an end of meeting reminder is enabled or not.
--
-- 'reminderAtMinutes', 'updateEndOfMeetingReminder_reminderAtMinutes' - Updates 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.
--
-- 'reminderType', 'updateEndOfMeetingReminder_reminderType' - The type of sound that users hear during the end of meeting reminder.
newUpdateEndOfMeetingReminder ::
  UpdateEndOfMeetingReminder
newUpdateEndOfMeetingReminder :: UpdateEndOfMeetingReminder
newUpdateEndOfMeetingReminder =
  UpdateEndOfMeetingReminder' :: Maybe Bool
-> Maybe (NonEmpty Int)
-> Maybe EndOfMeetingReminderType
-> UpdateEndOfMeetingReminder
UpdateEndOfMeetingReminder'
    { $sel:enabled:UpdateEndOfMeetingReminder' :: Maybe Bool
enabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:reminderAtMinutes:UpdateEndOfMeetingReminder' :: Maybe (NonEmpty Int)
reminderAtMinutes = Maybe (NonEmpty Int)
forall a. Maybe a
Prelude.Nothing,
      $sel:reminderType:UpdateEndOfMeetingReminder' :: Maybe EndOfMeetingReminderType
reminderType = Maybe EndOfMeetingReminderType
forall a. Maybe a
Prelude.Nothing
    }

-- | Whether an end of meeting reminder is enabled or not.
updateEndOfMeetingReminder_enabled :: Lens.Lens' UpdateEndOfMeetingReminder (Prelude.Maybe Prelude.Bool)
updateEndOfMeetingReminder_enabled :: (Maybe Bool -> f (Maybe Bool))
-> UpdateEndOfMeetingReminder -> f UpdateEndOfMeetingReminder
updateEndOfMeetingReminder_enabled = (UpdateEndOfMeetingReminder -> Maybe Bool)
-> (UpdateEndOfMeetingReminder
    -> Maybe Bool -> UpdateEndOfMeetingReminder)
-> Lens
     UpdateEndOfMeetingReminder
     UpdateEndOfMeetingReminder
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndOfMeetingReminder' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:UpdateEndOfMeetingReminder' :: UpdateEndOfMeetingReminder -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: UpdateEndOfMeetingReminder
s@UpdateEndOfMeetingReminder' {} Maybe Bool
a -> UpdateEndOfMeetingReminder
s {$sel:enabled:UpdateEndOfMeetingReminder' :: Maybe Bool
enabled = Maybe Bool
a} :: UpdateEndOfMeetingReminder)

-- | Updates 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.
updateEndOfMeetingReminder_reminderAtMinutes :: Lens.Lens' UpdateEndOfMeetingReminder (Prelude.Maybe (Prelude.NonEmpty Prelude.Int))
updateEndOfMeetingReminder_reminderAtMinutes :: (Maybe (NonEmpty Int) -> f (Maybe (NonEmpty Int)))
-> UpdateEndOfMeetingReminder -> f UpdateEndOfMeetingReminder
updateEndOfMeetingReminder_reminderAtMinutes = (UpdateEndOfMeetingReminder -> Maybe (NonEmpty Int))
-> (UpdateEndOfMeetingReminder
    -> Maybe (NonEmpty Int) -> UpdateEndOfMeetingReminder)
-> Lens
     UpdateEndOfMeetingReminder
     UpdateEndOfMeetingReminder
     (Maybe (NonEmpty Int))
     (Maybe (NonEmpty Int))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndOfMeetingReminder' {Maybe (NonEmpty Int)
reminderAtMinutes :: Maybe (NonEmpty Int)
$sel:reminderAtMinutes:UpdateEndOfMeetingReminder' :: UpdateEndOfMeetingReminder -> Maybe (NonEmpty Int)
reminderAtMinutes} -> Maybe (NonEmpty Int)
reminderAtMinutes) (\s :: UpdateEndOfMeetingReminder
s@UpdateEndOfMeetingReminder' {} Maybe (NonEmpty Int)
a -> UpdateEndOfMeetingReminder
s {$sel:reminderAtMinutes:UpdateEndOfMeetingReminder' :: Maybe (NonEmpty Int)
reminderAtMinutes = Maybe (NonEmpty Int)
a} :: UpdateEndOfMeetingReminder) ((Maybe (NonEmpty Int) -> f (Maybe (NonEmpty Int)))
 -> UpdateEndOfMeetingReminder -> f UpdateEndOfMeetingReminder)
-> ((Maybe (NonEmpty Int) -> f (Maybe (NonEmpty Int)))
    -> Maybe (NonEmpty Int) -> f (Maybe (NonEmpty Int)))
-> (Maybe (NonEmpty Int) -> f (Maybe (NonEmpty Int)))
-> UpdateEndOfMeetingReminder
-> f UpdateEndOfMeetingReminder
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (NonEmpty Int) (NonEmpty Int) (NonEmpty Int) (NonEmpty Int)
-> Iso
     (Maybe (NonEmpty Int))
     (Maybe (NonEmpty Int))
     (Maybe (NonEmpty Int))
     (Maybe (NonEmpty Int))
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 AnIso (NonEmpty Int) (NonEmpty Int) (NonEmpty Int) (NonEmpty Int)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The type of sound that users hear during the end of meeting reminder.
updateEndOfMeetingReminder_reminderType :: Lens.Lens' UpdateEndOfMeetingReminder (Prelude.Maybe EndOfMeetingReminderType)
updateEndOfMeetingReminder_reminderType :: (Maybe EndOfMeetingReminderType
 -> f (Maybe EndOfMeetingReminderType))
-> UpdateEndOfMeetingReminder -> f UpdateEndOfMeetingReminder
updateEndOfMeetingReminder_reminderType = (UpdateEndOfMeetingReminder -> Maybe EndOfMeetingReminderType)
-> (UpdateEndOfMeetingReminder
    -> Maybe EndOfMeetingReminderType -> UpdateEndOfMeetingReminder)
-> Lens
     UpdateEndOfMeetingReminder
     UpdateEndOfMeetingReminder
     (Maybe EndOfMeetingReminderType)
     (Maybe EndOfMeetingReminderType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndOfMeetingReminder' {Maybe EndOfMeetingReminderType
reminderType :: Maybe EndOfMeetingReminderType
$sel:reminderType:UpdateEndOfMeetingReminder' :: UpdateEndOfMeetingReminder -> Maybe EndOfMeetingReminderType
reminderType} -> Maybe EndOfMeetingReminderType
reminderType) (\s :: UpdateEndOfMeetingReminder
s@UpdateEndOfMeetingReminder' {} Maybe EndOfMeetingReminderType
a -> UpdateEndOfMeetingReminder
s {$sel:reminderType:UpdateEndOfMeetingReminder' :: Maybe EndOfMeetingReminderType
reminderType = Maybe EndOfMeetingReminderType
a} :: UpdateEndOfMeetingReminder)

instance Prelude.Hashable UpdateEndOfMeetingReminder

instance Prelude.NFData UpdateEndOfMeetingReminder

instance Core.ToJSON UpdateEndOfMeetingReminder where
  toJSON :: UpdateEndOfMeetingReminder -> Value
toJSON UpdateEndOfMeetingReminder' {Maybe Bool
Maybe (NonEmpty Int)
Maybe EndOfMeetingReminderType
reminderType :: Maybe EndOfMeetingReminderType
reminderAtMinutes :: Maybe (NonEmpty Int)
enabled :: Maybe Bool
$sel:reminderType:UpdateEndOfMeetingReminder' :: UpdateEndOfMeetingReminder -> Maybe EndOfMeetingReminderType
$sel:reminderAtMinutes:UpdateEndOfMeetingReminder' :: UpdateEndOfMeetingReminder -> Maybe (NonEmpty Int)
$sel:enabled:UpdateEndOfMeetingReminder' :: UpdateEndOfMeetingReminder -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Enabled" 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
enabled,
            (Text
"ReminderAtMinutes" Text -> NonEmpty Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty Int -> Pair) -> Maybe (NonEmpty Int) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Int)
reminderAtMinutes,
            (Text
"ReminderType" Text -> EndOfMeetingReminderType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EndOfMeetingReminderType -> Pair)
-> Maybe EndOfMeetingReminderType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EndOfMeetingReminderType
reminderType
          ]
      )