{-# 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.Chime.Types.Attendee where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Attendee = Attendee'
{
Attendee -> Maybe Text
attendeeId :: Prelude.Maybe Prelude.Text,
Attendee -> Maybe (Sensitive Text)
joinToken :: Prelude.Maybe (Core.Sensitive Prelude.Text),
Attendee -> Maybe (Sensitive Text)
externalUserId :: Prelude.Maybe (Core.Sensitive Prelude.Text)
}
deriving (Attendee -> Attendee -> Bool
(Attendee -> Attendee -> Bool)
-> (Attendee -> Attendee -> Bool) -> Eq Attendee
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Attendee -> Attendee -> Bool
$c/= :: Attendee -> Attendee -> Bool
== :: Attendee -> Attendee -> Bool
$c== :: Attendee -> Attendee -> Bool
Prelude.Eq, Int -> Attendee -> ShowS
[Attendee] -> ShowS
Attendee -> String
(Int -> Attendee -> ShowS)
-> (Attendee -> String) -> ([Attendee] -> ShowS) -> Show Attendee
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Attendee] -> ShowS
$cshowList :: [Attendee] -> ShowS
show :: Attendee -> String
$cshow :: Attendee -> String
showsPrec :: Int -> Attendee -> ShowS
$cshowsPrec :: Int -> Attendee -> ShowS
Prelude.Show, (forall x. Attendee -> Rep Attendee x)
-> (forall x. Rep Attendee x -> Attendee) -> Generic Attendee
forall x. Rep Attendee x -> Attendee
forall x. Attendee -> Rep Attendee x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Attendee x -> Attendee
$cfrom :: forall x. Attendee -> Rep Attendee x
Prelude.Generic)
newAttendee ::
Attendee
newAttendee :: Attendee
newAttendee =
Attendee' :: Maybe Text
-> Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Attendee
Attendee'
{ $sel:attendeeId:Attendee' :: Maybe Text
attendeeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:joinToken:Attendee' :: Maybe (Sensitive Text)
joinToken = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:externalUserId:Attendee' :: Maybe (Sensitive Text)
externalUserId = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing
}
attendee_attendeeId :: Lens.Lens' Attendee (Prelude.Maybe Prelude.Text)
attendee_attendeeId :: (Maybe Text -> f (Maybe Text)) -> Attendee -> f Attendee
attendee_attendeeId = (Attendee -> Maybe Text)
-> (Attendee -> Maybe Text -> Attendee)
-> Lens Attendee Attendee (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attendee' {Maybe Text
attendeeId :: Maybe Text
$sel:attendeeId:Attendee' :: Attendee -> Maybe Text
attendeeId} -> Maybe Text
attendeeId) (\s :: Attendee
s@Attendee' {} Maybe Text
a -> Attendee
s {$sel:attendeeId:Attendee' :: Maybe Text
attendeeId = Maybe Text
a} :: Attendee)
attendee_joinToken :: Lens.Lens' Attendee (Prelude.Maybe Prelude.Text)
attendee_joinToken :: (Maybe Text -> f (Maybe Text)) -> Attendee -> f Attendee
attendee_joinToken = (Attendee -> Maybe (Sensitive Text))
-> (Attendee -> Maybe (Sensitive Text) -> Attendee)
-> Lens
Attendee Attendee (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attendee' {Maybe (Sensitive Text)
joinToken :: Maybe (Sensitive Text)
$sel:joinToken:Attendee' :: Attendee -> Maybe (Sensitive Text)
joinToken} -> Maybe (Sensitive Text)
joinToken) (\s :: Attendee
s@Attendee' {} Maybe (Sensitive Text)
a -> Attendee
s {$sel:joinToken:Attendee' :: Maybe (Sensitive Text)
joinToken = Maybe (Sensitive Text)
a} :: Attendee) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> Attendee -> f Attendee)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Attendee
-> f Attendee
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
attendee_externalUserId :: Lens.Lens' Attendee (Prelude.Maybe Prelude.Text)
attendee_externalUserId :: (Maybe Text -> f (Maybe Text)) -> Attendee -> f Attendee
attendee_externalUserId = (Attendee -> Maybe (Sensitive Text))
-> (Attendee -> Maybe (Sensitive Text) -> Attendee)
-> Lens
Attendee Attendee (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attendee' {Maybe (Sensitive Text)
externalUserId :: Maybe (Sensitive Text)
$sel:externalUserId:Attendee' :: Attendee -> Maybe (Sensitive Text)
externalUserId} -> Maybe (Sensitive Text)
externalUserId) (\s :: Attendee
s@Attendee' {} Maybe (Sensitive Text)
a -> Attendee
s {$sel:externalUserId:Attendee' :: Maybe (Sensitive Text)
externalUserId = Maybe (Sensitive Text)
a} :: Attendee) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> Attendee -> f Attendee)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Attendee
-> f Attendee
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.FromJSON Attendee where
parseJSON :: Value -> Parser Attendee
parseJSON =
String -> (Object -> Parser Attendee) -> Value -> Parser Attendee
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Attendee"
( \Object
x ->
Maybe Text
-> Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Attendee
Attendee'
(Maybe Text
-> Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Attendee)
-> Parser (Maybe Text)
-> Parser
(Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Attendee)
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
"AttendeeId")
Parser
(Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Attendee)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe (Sensitive Text) -> Attendee)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JoinToken")
Parser (Maybe (Sensitive Text) -> Attendee)
-> Parser (Maybe (Sensitive Text)) -> Parser Attendee
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExternalUserId")
)
instance Prelude.Hashable Attendee
instance Prelude.NFData Attendee