{-# 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.CodeStar.Types.UserProfileSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UserProfileSummary = UserProfileSummary'
{
UserProfileSummary -> Maybe Text
sshPublicKey :: Prelude.Maybe Prelude.Text,
UserProfileSummary -> Maybe Text
userArn :: Prelude.Maybe Prelude.Text,
UserProfileSummary -> Maybe (Sensitive Text)
emailAddress :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UserProfileSummary -> Maybe (Sensitive Text)
displayName :: Prelude.Maybe (Core.Sensitive Prelude.Text)
}
deriving (UserProfileSummary -> UserProfileSummary -> Bool
(UserProfileSummary -> UserProfileSummary -> Bool)
-> (UserProfileSummary -> UserProfileSummary -> Bool)
-> Eq UserProfileSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserProfileSummary -> UserProfileSummary -> Bool
$c/= :: UserProfileSummary -> UserProfileSummary -> Bool
== :: UserProfileSummary -> UserProfileSummary -> Bool
$c== :: UserProfileSummary -> UserProfileSummary -> Bool
Prelude.Eq, Int -> UserProfileSummary -> ShowS
[UserProfileSummary] -> ShowS
UserProfileSummary -> String
(Int -> UserProfileSummary -> ShowS)
-> (UserProfileSummary -> String)
-> ([UserProfileSummary] -> ShowS)
-> Show UserProfileSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserProfileSummary] -> ShowS
$cshowList :: [UserProfileSummary] -> ShowS
show :: UserProfileSummary -> String
$cshow :: UserProfileSummary -> String
showsPrec :: Int -> UserProfileSummary -> ShowS
$cshowsPrec :: Int -> UserProfileSummary -> ShowS
Prelude.Show, (forall x. UserProfileSummary -> Rep UserProfileSummary x)
-> (forall x. Rep UserProfileSummary x -> UserProfileSummary)
-> Generic UserProfileSummary
forall x. Rep UserProfileSummary x -> UserProfileSummary
forall x. UserProfileSummary -> Rep UserProfileSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UserProfileSummary x -> UserProfileSummary
$cfrom :: forall x. UserProfileSummary -> Rep UserProfileSummary x
Prelude.Generic)
newUserProfileSummary ::
UserProfileSummary
newUserProfileSummary :: UserProfileSummary
newUserProfileSummary =
UserProfileSummary' :: Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> UserProfileSummary
UserProfileSummary'
{ $sel:sshPublicKey:UserProfileSummary' :: Maybe Text
sshPublicKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userArn:UserProfileSummary' :: Maybe Text
userArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:emailAddress:UserProfileSummary' :: Maybe (Sensitive Text)
emailAddress = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:displayName:UserProfileSummary' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing
}
userProfileSummary_sshPublicKey :: Lens.Lens' UserProfileSummary (Prelude.Maybe Prelude.Text)
userProfileSummary_sshPublicKey :: (Maybe Text -> f (Maybe Text))
-> UserProfileSummary -> f UserProfileSummary
userProfileSummary_sshPublicKey = (UserProfileSummary -> Maybe Text)
-> (UserProfileSummary -> Maybe Text -> UserProfileSummary)
-> Lens
UserProfileSummary UserProfileSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserProfileSummary' {Maybe Text
sshPublicKey :: Maybe Text
$sel:sshPublicKey:UserProfileSummary' :: UserProfileSummary -> Maybe Text
sshPublicKey} -> Maybe Text
sshPublicKey) (\s :: UserProfileSummary
s@UserProfileSummary' {} Maybe Text
a -> UserProfileSummary
s {$sel:sshPublicKey:UserProfileSummary' :: Maybe Text
sshPublicKey = Maybe Text
a} :: UserProfileSummary)
userProfileSummary_userArn :: Lens.Lens' UserProfileSummary (Prelude.Maybe Prelude.Text)
userProfileSummary_userArn :: (Maybe Text -> f (Maybe Text))
-> UserProfileSummary -> f UserProfileSummary
userProfileSummary_userArn = (UserProfileSummary -> Maybe Text)
-> (UserProfileSummary -> Maybe Text -> UserProfileSummary)
-> Lens
UserProfileSummary UserProfileSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserProfileSummary' {Maybe Text
userArn :: Maybe Text
$sel:userArn:UserProfileSummary' :: UserProfileSummary -> Maybe Text
userArn} -> Maybe Text
userArn) (\s :: UserProfileSummary
s@UserProfileSummary' {} Maybe Text
a -> UserProfileSummary
s {$sel:userArn:UserProfileSummary' :: Maybe Text
userArn = Maybe Text
a} :: UserProfileSummary)
userProfileSummary_emailAddress :: Lens.Lens' UserProfileSummary (Prelude.Maybe Prelude.Text)
userProfileSummary_emailAddress :: (Maybe Text -> f (Maybe Text))
-> UserProfileSummary -> f UserProfileSummary
userProfileSummary_emailAddress = (UserProfileSummary -> Maybe (Sensitive Text))
-> (UserProfileSummary
-> Maybe (Sensitive Text) -> UserProfileSummary)
-> Lens
UserProfileSummary
UserProfileSummary
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserProfileSummary' {Maybe (Sensitive Text)
emailAddress :: Maybe (Sensitive Text)
$sel:emailAddress:UserProfileSummary' :: UserProfileSummary -> Maybe (Sensitive Text)
emailAddress} -> Maybe (Sensitive Text)
emailAddress) (\s :: UserProfileSummary
s@UserProfileSummary' {} Maybe (Sensitive Text)
a -> UserProfileSummary
s {$sel:emailAddress:UserProfileSummary' :: Maybe (Sensitive Text)
emailAddress = Maybe (Sensitive Text)
a} :: UserProfileSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UserProfileSummary -> f UserProfileSummary)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UserProfileSummary
-> f UserProfileSummary
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
userProfileSummary_displayName :: Lens.Lens' UserProfileSummary (Prelude.Maybe Prelude.Text)
userProfileSummary_displayName :: (Maybe Text -> f (Maybe Text))
-> UserProfileSummary -> f UserProfileSummary
userProfileSummary_displayName = (UserProfileSummary -> Maybe (Sensitive Text))
-> (UserProfileSummary
-> Maybe (Sensitive Text) -> UserProfileSummary)
-> Lens
UserProfileSummary
UserProfileSummary
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserProfileSummary' {Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:displayName:UserProfileSummary' :: UserProfileSummary -> Maybe (Sensitive Text)
displayName} -> Maybe (Sensitive Text)
displayName) (\s :: UserProfileSummary
s@UserProfileSummary' {} Maybe (Sensitive Text)
a -> UserProfileSummary
s {$sel:displayName:UserProfileSummary' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
a} :: UserProfileSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UserProfileSummary -> f UserProfileSummary)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UserProfileSummary
-> f UserProfileSummary
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 UserProfileSummary where
parseJSON :: Value -> Parser UserProfileSummary
parseJSON =
String
-> (Object -> Parser UserProfileSummary)
-> Value
-> Parser UserProfileSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UserProfileSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> UserProfileSummary
UserProfileSummary'
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> UserProfileSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> UserProfileSummary)
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
"sshPublicKey")
Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> UserProfileSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> UserProfileSummary)
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
"userArn")
Parser
(Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> UserProfileSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe (Sensitive Text) -> UserProfileSummary)
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
"emailAddress")
Parser (Maybe (Sensitive Text) -> UserProfileSummary)
-> Parser (Maybe (Sensitive Text)) -> Parser UserProfileSummary
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
"displayName")
)
instance Prelude.Hashable UserProfileSummary
instance Prelude.NFData UserProfileSummary