{-# 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.Participant where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Participant = Participant'
{
Participant -> Maybe (Sensitive Text)
phoneNumber :: Prelude.Maybe (Core.Sensitive Prelude.Text),
Participant -> Maybe (Sensitive Text)
proxyPhoneNumber :: Prelude.Maybe (Core.Sensitive Prelude.Text)
}
deriving (Participant -> Participant -> Bool
(Participant -> Participant -> Bool)
-> (Participant -> Participant -> Bool) -> Eq Participant
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Participant -> Participant -> Bool
$c/= :: Participant -> Participant -> Bool
== :: Participant -> Participant -> Bool
$c== :: Participant -> Participant -> Bool
Prelude.Eq, Int -> Participant -> ShowS
[Participant] -> ShowS
Participant -> String
(Int -> Participant -> ShowS)
-> (Participant -> String)
-> ([Participant] -> ShowS)
-> Show Participant
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Participant] -> ShowS
$cshowList :: [Participant] -> ShowS
show :: Participant -> String
$cshow :: Participant -> String
showsPrec :: Int -> Participant -> ShowS
$cshowsPrec :: Int -> Participant -> ShowS
Prelude.Show, (forall x. Participant -> Rep Participant x)
-> (forall x. Rep Participant x -> Participant)
-> Generic Participant
forall x. Rep Participant x -> Participant
forall x. Participant -> Rep Participant x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Participant x -> Participant
$cfrom :: forall x. Participant -> Rep Participant x
Prelude.Generic)
newParticipant ::
Participant
newParticipant :: Participant
newParticipant =
Participant' :: Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Participant
Participant'
{ $sel:phoneNumber:Participant' :: Maybe (Sensitive Text)
phoneNumber = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:proxyPhoneNumber:Participant' :: Maybe (Sensitive Text)
proxyPhoneNumber = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing
}
participant_phoneNumber :: Lens.Lens' Participant (Prelude.Maybe Prelude.Text)
participant_phoneNumber :: (Maybe Text -> f (Maybe Text)) -> Participant -> f Participant
participant_phoneNumber = (Participant -> Maybe (Sensitive Text))
-> (Participant -> Maybe (Sensitive Text) -> Participant)
-> Lens
Participant
Participant
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Participant' {Maybe (Sensitive Text)
phoneNumber :: Maybe (Sensitive Text)
$sel:phoneNumber:Participant' :: Participant -> Maybe (Sensitive Text)
phoneNumber} -> Maybe (Sensitive Text)
phoneNumber) (\s :: Participant
s@Participant' {} Maybe (Sensitive Text)
a -> Participant
s {$sel:phoneNumber:Participant' :: Maybe (Sensitive Text)
phoneNumber = Maybe (Sensitive Text)
a} :: Participant) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> Participant -> f Participant)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Participant
-> f Participant
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
participant_proxyPhoneNumber :: Lens.Lens' Participant (Prelude.Maybe Prelude.Text)
participant_proxyPhoneNumber :: (Maybe Text -> f (Maybe Text)) -> Participant -> f Participant
participant_proxyPhoneNumber = (Participant -> Maybe (Sensitive Text))
-> (Participant -> Maybe (Sensitive Text) -> Participant)
-> Lens
Participant
Participant
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Participant' {Maybe (Sensitive Text)
proxyPhoneNumber :: Maybe (Sensitive Text)
$sel:proxyPhoneNumber:Participant' :: Participant -> Maybe (Sensitive Text)
proxyPhoneNumber} -> Maybe (Sensitive Text)
proxyPhoneNumber) (\s :: Participant
s@Participant' {} Maybe (Sensitive Text)
a -> Participant
s {$sel:proxyPhoneNumber:Participant' :: Maybe (Sensitive Text)
proxyPhoneNumber = Maybe (Sensitive Text)
a} :: Participant) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> Participant -> f Participant)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Participant
-> f Participant
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 Participant where
parseJSON :: Value -> Parser Participant
parseJSON =
String
-> (Object -> Parser Participant) -> Value -> Parser Participant
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Participant"
( \Object
x ->
Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Participant
Participant'
(Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Participant)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe (Sensitive Text) -> Participant)
forall (f :: * -> *) a b. Functor 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
"PhoneNumber")
Parser (Maybe (Sensitive Text) -> Participant)
-> Parser (Maybe (Sensitive Text)) -> Parser Participant
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
"ProxyPhoneNumber")
)
instance Prelude.Hashable Participant
instance Prelude.NFData Participant