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