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