{-# 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.MeetingSetting where
import Amazonka.AlexaBusiness.Types.RequirePin
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MeetingSetting = MeetingSetting'
{
MeetingSetting -> RequirePin
requirePin :: RequirePin
}
deriving (MeetingSetting -> MeetingSetting -> Bool
(MeetingSetting -> MeetingSetting -> Bool)
-> (MeetingSetting -> MeetingSetting -> Bool) -> Eq MeetingSetting
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MeetingSetting -> MeetingSetting -> Bool
$c/= :: MeetingSetting -> MeetingSetting -> Bool
== :: MeetingSetting -> MeetingSetting -> Bool
$c== :: MeetingSetting -> MeetingSetting -> Bool
Prelude.Eq, ReadPrec [MeetingSetting]
ReadPrec MeetingSetting
Int -> ReadS MeetingSetting
ReadS [MeetingSetting]
(Int -> ReadS MeetingSetting)
-> ReadS [MeetingSetting]
-> ReadPrec MeetingSetting
-> ReadPrec [MeetingSetting]
-> Read MeetingSetting
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MeetingSetting]
$creadListPrec :: ReadPrec [MeetingSetting]
readPrec :: ReadPrec MeetingSetting
$creadPrec :: ReadPrec MeetingSetting
readList :: ReadS [MeetingSetting]
$creadList :: ReadS [MeetingSetting]
readsPrec :: Int -> ReadS MeetingSetting
$creadsPrec :: Int -> ReadS MeetingSetting
Prelude.Read, Int -> MeetingSetting -> ShowS
[MeetingSetting] -> ShowS
MeetingSetting -> String
(Int -> MeetingSetting -> ShowS)
-> (MeetingSetting -> String)
-> ([MeetingSetting] -> ShowS)
-> Show MeetingSetting
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MeetingSetting] -> ShowS
$cshowList :: [MeetingSetting] -> ShowS
show :: MeetingSetting -> String
$cshow :: MeetingSetting -> String
showsPrec :: Int -> MeetingSetting -> ShowS
$cshowsPrec :: Int -> MeetingSetting -> ShowS
Prelude.Show, (forall x. MeetingSetting -> Rep MeetingSetting x)
-> (forall x. Rep MeetingSetting x -> MeetingSetting)
-> Generic MeetingSetting
forall x. Rep MeetingSetting x -> MeetingSetting
forall x. MeetingSetting -> Rep MeetingSetting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MeetingSetting x -> MeetingSetting
$cfrom :: forall x. MeetingSetting -> Rep MeetingSetting x
Prelude.Generic)
newMeetingSetting ::
RequirePin ->
MeetingSetting
newMeetingSetting :: RequirePin -> MeetingSetting
newMeetingSetting RequirePin
pRequirePin_ =
MeetingSetting' :: RequirePin -> MeetingSetting
MeetingSetting' {$sel:requirePin:MeetingSetting' :: RequirePin
requirePin = RequirePin
pRequirePin_}
meetingSetting_requirePin :: Lens.Lens' MeetingSetting RequirePin
meetingSetting_requirePin :: (RequirePin -> f RequirePin) -> MeetingSetting -> f MeetingSetting
meetingSetting_requirePin = (MeetingSetting -> RequirePin)
-> (MeetingSetting -> RequirePin -> MeetingSetting)
-> Lens MeetingSetting MeetingSetting RequirePin RequirePin
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MeetingSetting' {RequirePin
requirePin :: RequirePin
$sel:requirePin:MeetingSetting' :: MeetingSetting -> RequirePin
requirePin} -> RequirePin
requirePin) (\s :: MeetingSetting
s@MeetingSetting' {} RequirePin
a -> MeetingSetting
s {$sel:requirePin:MeetingSetting' :: RequirePin
requirePin = RequirePin
a} :: MeetingSetting)
instance Core.FromJSON MeetingSetting where
parseJSON :: Value -> Parser MeetingSetting
parseJSON =
String
-> (Object -> Parser MeetingSetting)
-> Value
-> Parser MeetingSetting
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MeetingSetting"
( \Object
x ->
RequirePin -> MeetingSetting
MeetingSetting' (RequirePin -> MeetingSetting)
-> Parser RequirePin -> Parser MeetingSetting
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser RequirePin
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RequirePin")
)
instance Prelude.Hashable MeetingSetting
instance Prelude.NFData MeetingSetting
instance Core.ToJSON MeetingSetting where
toJSON :: MeetingSetting -> Value
toJSON MeetingSetting' {RequirePin
requirePin :: RequirePin
$sel:requirePin:MeetingSetting' :: MeetingSetting -> RequirePin
..} =
[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
"RequirePin" Text -> RequirePin -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= RequirePin
requirePin)]
)