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