{-# 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 #-}
module Amazonka.AlexaBusiness.Types.CreateEndOfMeetingReminder where
import Amazonka.AlexaBusiness.Types.EndOfMeetingReminderType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateEndOfMeetingReminder = CreateEndOfMeetingReminder'
{
CreateEndOfMeetingReminder -> NonEmpty Int
reminderAtMinutes :: Prelude.NonEmpty Prelude.Int,
CreateEndOfMeetingReminder -> EndOfMeetingReminderType
reminderType :: EndOfMeetingReminderType,
CreateEndOfMeetingReminder -> Bool
enabled :: Prelude.Bool
}
deriving (CreateEndOfMeetingReminder -> CreateEndOfMeetingReminder -> Bool
(CreateEndOfMeetingReminder -> CreateEndOfMeetingReminder -> Bool)
-> (CreateEndOfMeetingReminder
-> CreateEndOfMeetingReminder -> Bool)
-> Eq CreateEndOfMeetingReminder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEndOfMeetingReminder -> CreateEndOfMeetingReminder -> Bool
$c/= :: CreateEndOfMeetingReminder -> CreateEndOfMeetingReminder -> Bool
== :: CreateEndOfMeetingReminder -> CreateEndOfMeetingReminder -> Bool
$c== :: CreateEndOfMeetingReminder -> CreateEndOfMeetingReminder -> Bool
Prelude.Eq, ReadPrec [CreateEndOfMeetingReminder]
ReadPrec CreateEndOfMeetingReminder
Int -> ReadS CreateEndOfMeetingReminder
ReadS [CreateEndOfMeetingReminder]
(Int -> ReadS CreateEndOfMeetingReminder)
-> ReadS [CreateEndOfMeetingReminder]
-> ReadPrec CreateEndOfMeetingReminder
-> ReadPrec [CreateEndOfMeetingReminder]
-> Read CreateEndOfMeetingReminder
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEndOfMeetingReminder]
$creadListPrec :: ReadPrec [CreateEndOfMeetingReminder]
readPrec :: ReadPrec CreateEndOfMeetingReminder
$creadPrec :: ReadPrec CreateEndOfMeetingReminder
readList :: ReadS [CreateEndOfMeetingReminder]
$creadList :: ReadS [CreateEndOfMeetingReminder]
readsPrec :: Int -> ReadS CreateEndOfMeetingReminder
$creadsPrec :: Int -> ReadS CreateEndOfMeetingReminder
Prelude.Read, Int -> CreateEndOfMeetingReminder -> ShowS
[CreateEndOfMeetingReminder] -> ShowS
CreateEndOfMeetingReminder -> String
(Int -> CreateEndOfMeetingReminder -> ShowS)
-> (CreateEndOfMeetingReminder -> String)
-> ([CreateEndOfMeetingReminder] -> ShowS)
-> Show CreateEndOfMeetingReminder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEndOfMeetingReminder] -> ShowS
$cshowList :: [CreateEndOfMeetingReminder] -> ShowS
show :: CreateEndOfMeetingReminder -> String
$cshow :: CreateEndOfMeetingReminder -> String
showsPrec :: Int -> CreateEndOfMeetingReminder -> ShowS
$cshowsPrec :: Int -> CreateEndOfMeetingReminder -> ShowS
Prelude.Show, (forall x.
CreateEndOfMeetingReminder -> Rep CreateEndOfMeetingReminder x)
-> (forall x.
Rep CreateEndOfMeetingReminder x -> CreateEndOfMeetingReminder)
-> Generic CreateEndOfMeetingReminder
forall x.
Rep CreateEndOfMeetingReminder x -> CreateEndOfMeetingReminder
forall x.
CreateEndOfMeetingReminder -> Rep CreateEndOfMeetingReminder x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEndOfMeetingReminder x -> CreateEndOfMeetingReminder
$cfrom :: forall x.
CreateEndOfMeetingReminder -> Rep CreateEndOfMeetingReminder x
Prelude.Generic)
newCreateEndOfMeetingReminder ::
Prelude.NonEmpty Prelude.Int ->
EndOfMeetingReminderType ->
Prelude.Bool ->
CreateEndOfMeetingReminder
newCreateEndOfMeetingReminder :: NonEmpty Int
-> EndOfMeetingReminderType -> Bool -> CreateEndOfMeetingReminder
newCreateEndOfMeetingReminder
NonEmpty Int
pReminderAtMinutes_
EndOfMeetingReminderType
pReminderType_
Bool
pEnabled_ =
CreateEndOfMeetingReminder' :: NonEmpty Int
-> EndOfMeetingReminderType -> Bool -> CreateEndOfMeetingReminder
CreateEndOfMeetingReminder'
{ $sel:reminderAtMinutes:CreateEndOfMeetingReminder' :: NonEmpty Int
reminderAtMinutes =
Tagged (NonEmpty Int) (Identity (NonEmpty Int))
-> Tagged (NonEmpty Int) (Identity (NonEmpty Int))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Int) (Identity (NonEmpty Int))
-> Tagged (NonEmpty Int) (Identity (NonEmpty Int)))
-> NonEmpty Int -> NonEmpty Int
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Int
pReminderAtMinutes_,
$sel:reminderType:CreateEndOfMeetingReminder' :: EndOfMeetingReminderType
reminderType = EndOfMeetingReminderType
pReminderType_,
$sel:enabled:CreateEndOfMeetingReminder' :: Bool
enabled = Bool
pEnabled_
}
createEndOfMeetingReminder_reminderAtMinutes :: Lens.Lens' CreateEndOfMeetingReminder (Prelude.NonEmpty Prelude.Int)
createEndOfMeetingReminder_reminderAtMinutes :: (NonEmpty Int -> f (NonEmpty Int))
-> CreateEndOfMeetingReminder -> f CreateEndOfMeetingReminder
createEndOfMeetingReminder_reminderAtMinutes = (CreateEndOfMeetingReminder -> NonEmpty Int)
-> (CreateEndOfMeetingReminder
-> NonEmpty Int -> CreateEndOfMeetingReminder)
-> Lens
CreateEndOfMeetingReminder
CreateEndOfMeetingReminder
(NonEmpty Int)
(NonEmpty Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndOfMeetingReminder' {NonEmpty Int
reminderAtMinutes :: NonEmpty Int
$sel:reminderAtMinutes:CreateEndOfMeetingReminder' :: CreateEndOfMeetingReminder -> NonEmpty Int
reminderAtMinutes} -> NonEmpty Int
reminderAtMinutes) (\s :: CreateEndOfMeetingReminder
s@CreateEndOfMeetingReminder' {} NonEmpty Int
a -> CreateEndOfMeetingReminder
s {$sel:reminderAtMinutes:CreateEndOfMeetingReminder' :: NonEmpty Int
reminderAtMinutes = NonEmpty Int
a} :: CreateEndOfMeetingReminder) ((NonEmpty Int -> f (NonEmpty Int))
-> CreateEndOfMeetingReminder -> f CreateEndOfMeetingReminder)
-> ((NonEmpty Int -> f (NonEmpty Int))
-> NonEmpty Int -> f (NonEmpty Int))
-> (NonEmpty Int -> f (NonEmpty Int))
-> CreateEndOfMeetingReminder
-> f CreateEndOfMeetingReminder
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Int -> f (NonEmpty Int))
-> NonEmpty Int -> f (NonEmpty Int)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEndOfMeetingReminder_reminderType :: Lens.Lens' CreateEndOfMeetingReminder EndOfMeetingReminderType
createEndOfMeetingReminder_reminderType :: (EndOfMeetingReminderType -> f EndOfMeetingReminderType)
-> CreateEndOfMeetingReminder -> f CreateEndOfMeetingReminder
createEndOfMeetingReminder_reminderType = (CreateEndOfMeetingReminder -> EndOfMeetingReminderType)
-> (CreateEndOfMeetingReminder
-> EndOfMeetingReminderType -> CreateEndOfMeetingReminder)
-> Lens
CreateEndOfMeetingReminder
CreateEndOfMeetingReminder
EndOfMeetingReminderType
EndOfMeetingReminderType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndOfMeetingReminder' {EndOfMeetingReminderType
reminderType :: EndOfMeetingReminderType
$sel:reminderType:CreateEndOfMeetingReminder' :: CreateEndOfMeetingReminder -> EndOfMeetingReminderType
reminderType} -> EndOfMeetingReminderType
reminderType) (\s :: CreateEndOfMeetingReminder
s@CreateEndOfMeetingReminder' {} EndOfMeetingReminderType
a -> CreateEndOfMeetingReminder
s {$sel:reminderType:CreateEndOfMeetingReminder' :: EndOfMeetingReminderType
reminderType = EndOfMeetingReminderType
a} :: CreateEndOfMeetingReminder)
createEndOfMeetingReminder_enabled :: Lens.Lens' CreateEndOfMeetingReminder Prelude.Bool
createEndOfMeetingReminder_enabled :: (Bool -> f Bool)
-> CreateEndOfMeetingReminder -> f CreateEndOfMeetingReminder
createEndOfMeetingReminder_enabled = (CreateEndOfMeetingReminder -> Bool)
-> (CreateEndOfMeetingReminder
-> Bool -> CreateEndOfMeetingReminder)
-> Lens
CreateEndOfMeetingReminder CreateEndOfMeetingReminder Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndOfMeetingReminder' {Bool
enabled :: Bool
$sel:enabled:CreateEndOfMeetingReminder' :: CreateEndOfMeetingReminder -> Bool
enabled} -> Bool
enabled) (\s :: CreateEndOfMeetingReminder
s@CreateEndOfMeetingReminder' {} Bool
a -> CreateEndOfMeetingReminder
s {$sel:enabled:CreateEndOfMeetingReminder' :: Bool
enabled = Bool
a} :: CreateEndOfMeetingReminder)
instance Prelude.Hashable CreateEndOfMeetingReminder
instance Prelude.NFData CreateEndOfMeetingReminder
instance Core.ToJSON CreateEndOfMeetingReminder where
toJSON :: CreateEndOfMeetingReminder -> Value
toJSON CreateEndOfMeetingReminder' {Bool
NonEmpty Int
EndOfMeetingReminderType
enabled :: Bool
reminderType :: EndOfMeetingReminderType
reminderAtMinutes :: NonEmpty Int
$sel:enabled:CreateEndOfMeetingReminder' :: CreateEndOfMeetingReminder -> Bool
$sel:reminderType:CreateEndOfMeetingReminder' :: CreateEndOfMeetingReminder -> EndOfMeetingReminderType
$sel:reminderAtMinutes:CreateEndOfMeetingReminder' :: CreateEndOfMeetingReminder -> NonEmpty Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ReminderAtMinutes" Text -> NonEmpty Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Int
reminderAtMinutes),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ReminderType" Text -> EndOfMeetingReminderType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= EndOfMeetingReminderType
reminderType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
enabled)
]
)