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