{-# 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.TeamMember where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TeamMember = TeamMember'
{
TeamMember -> Maybe Bool
remoteAccessAllowed :: Prelude.Maybe Prelude.Bool,
TeamMember -> Text
userArn :: Prelude.Text,
TeamMember -> Text
projectRole :: Prelude.Text
}
deriving (TeamMember -> TeamMember -> Bool
(TeamMember -> TeamMember -> Bool)
-> (TeamMember -> TeamMember -> Bool) -> Eq TeamMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TeamMember -> TeamMember -> Bool
$c/= :: TeamMember -> TeamMember -> Bool
== :: TeamMember -> TeamMember -> Bool
$c== :: TeamMember -> TeamMember -> Bool
Prelude.Eq, ReadPrec [TeamMember]
ReadPrec TeamMember
Int -> ReadS TeamMember
ReadS [TeamMember]
(Int -> ReadS TeamMember)
-> ReadS [TeamMember]
-> ReadPrec TeamMember
-> ReadPrec [TeamMember]
-> Read TeamMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TeamMember]
$creadListPrec :: ReadPrec [TeamMember]
readPrec :: ReadPrec TeamMember
$creadPrec :: ReadPrec TeamMember
readList :: ReadS [TeamMember]
$creadList :: ReadS [TeamMember]
readsPrec :: Int -> ReadS TeamMember
$creadsPrec :: Int -> ReadS TeamMember
Prelude.Read, Int -> TeamMember -> ShowS
[TeamMember] -> ShowS
TeamMember -> String
(Int -> TeamMember -> ShowS)
-> (TeamMember -> String)
-> ([TeamMember] -> ShowS)
-> Show TeamMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TeamMember] -> ShowS
$cshowList :: [TeamMember] -> ShowS
show :: TeamMember -> String
$cshow :: TeamMember -> String
showsPrec :: Int -> TeamMember -> ShowS
$cshowsPrec :: Int -> TeamMember -> ShowS
Prelude.Show, (forall x. TeamMember -> Rep TeamMember x)
-> (forall x. Rep TeamMember x -> TeamMember) -> Generic TeamMember
forall x. Rep TeamMember x -> TeamMember
forall x. TeamMember -> Rep TeamMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TeamMember x -> TeamMember
$cfrom :: forall x. TeamMember -> Rep TeamMember x
Prelude.Generic)
newTeamMember ::
Prelude.Text ->
Prelude.Text ->
TeamMember
newTeamMember :: Text -> Text -> TeamMember
newTeamMember Text
pUserArn_ Text
pProjectRole_ =
TeamMember' :: Maybe Bool -> Text -> Text -> TeamMember
TeamMember'
{ $sel:remoteAccessAllowed:TeamMember' :: Maybe Bool
remoteAccessAllowed = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:userArn:TeamMember' :: Text
userArn = Text
pUserArn_,
$sel:projectRole:TeamMember' :: Text
projectRole = Text
pProjectRole_
}
teamMember_remoteAccessAllowed :: Lens.Lens' TeamMember (Prelude.Maybe Prelude.Bool)
teamMember_remoteAccessAllowed :: (Maybe Bool -> f (Maybe Bool)) -> TeamMember -> f TeamMember
teamMember_remoteAccessAllowed = (TeamMember -> Maybe Bool)
-> (TeamMember -> Maybe Bool -> TeamMember)
-> Lens TeamMember TeamMember (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TeamMember' {Maybe Bool
remoteAccessAllowed :: Maybe Bool
$sel:remoteAccessAllowed:TeamMember' :: TeamMember -> Maybe Bool
remoteAccessAllowed} -> Maybe Bool
remoteAccessAllowed) (\s :: TeamMember
s@TeamMember' {} Maybe Bool
a -> TeamMember
s {$sel:remoteAccessAllowed:TeamMember' :: Maybe Bool
remoteAccessAllowed = Maybe Bool
a} :: TeamMember)
teamMember_userArn :: Lens.Lens' TeamMember Prelude.Text
teamMember_userArn :: (Text -> f Text) -> TeamMember -> f TeamMember
teamMember_userArn = (TeamMember -> Text)
-> (TeamMember -> Text -> TeamMember)
-> Lens TeamMember TeamMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TeamMember' {Text
userArn :: Text
$sel:userArn:TeamMember' :: TeamMember -> Text
userArn} -> Text
userArn) (\s :: TeamMember
s@TeamMember' {} Text
a -> TeamMember
s {$sel:userArn:TeamMember' :: Text
userArn = Text
a} :: TeamMember)
teamMember_projectRole :: Lens.Lens' TeamMember Prelude.Text
teamMember_projectRole :: (Text -> f Text) -> TeamMember -> f TeamMember
teamMember_projectRole = (TeamMember -> Text)
-> (TeamMember -> Text -> TeamMember)
-> Lens TeamMember TeamMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TeamMember' {Text
projectRole :: Text
$sel:projectRole:TeamMember' :: TeamMember -> Text
projectRole} -> Text
projectRole) (\s :: TeamMember
s@TeamMember' {} Text
a -> TeamMember
s {$sel:projectRole:TeamMember' :: Text
projectRole = Text
a} :: TeamMember)
instance Core.FromJSON TeamMember where
parseJSON :: Value -> Parser TeamMember
parseJSON =
String
-> (Object -> Parser TeamMember) -> Value -> Parser TeamMember
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TeamMember"
( \Object
x ->
Maybe Bool -> Text -> Text -> TeamMember
TeamMember'
(Maybe Bool -> Text -> Text -> TeamMember)
-> Parser (Maybe Bool) -> Parser (Text -> Text -> TeamMember)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"remoteAccessAllowed")
Parser (Text -> Text -> TeamMember)
-> Parser Text -> Parser (Text -> TeamMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"userArn")
Parser (Text -> TeamMember) -> Parser Text -> Parser TeamMember
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"projectRole")
)
instance Prelude.Hashable TeamMember
instance Prelude.NFData TeamMember