{-# 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.UserSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UserSummary = UserSummary'
{
UserSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
UserSummary -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
UserSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (UserSummary -> UserSummary -> Bool
(UserSummary -> UserSummary -> Bool)
-> (UserSummary -> UserSummary -> Bool) -> Eq UserSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserSummary -> UserSummary -> Bool
$c/= :: UserSummary -> UserSummary -> Bool
== :: UserSummary -> UserSummary -> Bool
$c== :: UserSummary -> UserSummary -> Bool
Prelude.Eq, ReadPrec [UserSummary]
ReadPrec UserSummary
Int -> ReadS UserSummary
ReadS [UserSummary]
(Int -> ReadS UserSummary)
-> ReadS [UserSummary]
-> ReadPrec UserSummary
-> ReadPrec [UserSummary]
-> Read UserSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserSummary]
$creadListPrec :: ReadPrec [UserSummary]
readPrec :: ReadPrec UserSummary
$creadPrec :: ReadPrec UserSummary
readList :: ReadS [UserSummary]
$creadList :: ReadS [UserSummary]
readsPrec :: Int -> ReadS UserSummary
$creadsPrec :: Int -> ReadS UserSummary
Prelude.Read, Int -> UserSummary -> ShowS
[UserSummary] -> ShowS
UserSummary -> String
(Int -> UserSummary -> ShowS)
-> (UserSummary -> String)
-> ([UserSummary] -> ShowS)
-> Show UserSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserSummary] -> ShowS
$cshowList :: [UserSummary] -> ShowS
show :: UserSummary -> String
$cshow :: UserSummary -> String
showsPrec :: Int -> UserSummary -> ShowS
$cshowsPrec :: Int -> UserSummary -> ShowS
Prelude.Show, (forall x. UserSummary -> Rep UserSummary x)
-> (forall x. Rep UserSummary x -> UserSummary)
-> Generic UserSummary
forall x. Rep UserSummary x -> UserSummary
forall x. UserSummary -> Rep UserSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UserSummary x -> UserSummary
$cfrom :: forall x. UserSummary -> Rep UserSummary x
Prelude.Generic)
newUserSummary ::
UserSummary
newUserSummary :: UserSummary
newUserSummary =
UserSummary' :: Maybe Text -> Maybe Text -> Maybe Text -> UserSummary
UserSummary'
{ $sel:arn:UserSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:username:UserSummary' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:UserSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
userSummary_arn :: Lens.Lens' UserSummary (Prelude.Maybe Prelude.Text)
userSummary_arn :: (Maybe Text -> f (Maybe Text)) -> UserSummary -> f UserSummary
userSummary_arn = (UserSummary -> Maybe Text)
-> (UserSummary -> Maybe Text -> UserSummary)
-> Lens UserSummary UserSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:UserSummary' :: UserSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: UserSummary
s@UserSummary' {} Maybe Text
a -> UserSummary
s {$sel:arn:UserSummary' :: Maybe Text
arn = Maybe Text
a} :: UserSummary)
userSummary_username :: Lens.Lens' UserSummary (Prelude.Maybe Prelude.Text)
userSummary_username :: (Maybe Text -> f (Maybe Text)) -> UserSummary -> f UserSummary
userSummary_username = (UserSummary -> Maybe Text)
-> (UserSummary -> Maybe Text -> UserSummary)
-> Lens UserSummary UserSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserSummary' {Maybe Text
username :: Maybe Text
$sel:username:UserSummary' :: UserSummary -> Maybe Text
username} -> Maybe Text
username) (\s :: UserSummary
s@UserSummary' {} Maybe Text
a -> UserSummary
s {$sel:username:UserSummary' :: Maybe Text
username = Maybe Text
a} :: UserSummary)
userSummary_id :: Lens.Lens' UserSummary (Prelude.Maybe Prelude.Text)
userSummary_id :: (Maybe Text -> f (Maybe Text)) -> UserSummary -> f UserSummary
userSummary_id = (UserSummary -> Maybe Text)
-> (UserSummary -> Maybe Text -> UserSummary)
-> Lens UserSummary UserSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserSummary' {Maybe Text
id :: Maybe Text
$sel:id:UserSummary' :: UserSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: UserSummary
s@UserSummary' {} Maybe Text
a -> UserSummary
s {$sel:id:UserSummary' :: Maybe Text
id = Maybe Text
a} :: UserSummary)
instance Core.FromJSON UserSummary where
parseJSON :: Value -> Parser UserSummary
parseJSON =
String
-> (Object -> Parser UserSummary) -> Value -> Parser UserSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UserSummary"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> UserSummary
UserSummary'
(Maybe Text -> Maybe Text -> Maybe Text -> UserSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> UserSummary)
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
"Arn")
Parser (Maybe Text -> Maybe Text -> UserSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> UserSummary)
forall (f :: * -> *) a b. Applicative f => 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
"Username")
Parser (Maybe Text -> UserSummary)
-> Parser (Maybe Text) -> Parser UserSummary
forall (f :: * -> *) a b. Applicative f => 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
"Id")
)
instance Prelude.Hashable UserSummary
instance Prelude.NFData UserSummary