{-# 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.IAM.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 -> Text
path :: Prelude.Text,
Group -> Text
groupName :: Prelude.Text,
Group -> Text
groupId :: Prelude.Text,
Group -> Text
arn :: Prelude.Text,
Group -> ISO8601
createDate :: Core.ISO8601
}
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 ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Group
newGroup :: Text -> Text -> Text -> Text -> UTCTime -> Group
newGroup
Text
pPath_
Text
pGroupName_
Text
pGroupId_
Text
pArn_
UTCTime
pCreateDate_ =
Group' :: Text -> Text -> Text -> Text -> ISO8601 -> Group
Group'
{ $sel:path:Group' :: Text
path = Text
pPath_,
$sel:groupName:Group' :: Text
groupName = Text
pGroupName_,
$sel:groupId:Group' :: Text
groupId = Text
pGroupId_,
$sel:arn:Group' :: Text
arn = Text
pArn_,
$sel:createDate:Group' :: ISO8601
createDate = Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601))
-> UTCTime -> ISO8601
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreateDate_
}
group_path :: Lens.Lens' Group Prelude.Text
group_path :: (Text -> f Text) -> Group -> f Group
group_path = (Group -> Text)
-> (Group -> Text -> Group) -> Lens Group Group Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Group' {Text
path :: Text
$sel:path:Group' :: Group -> Text
path} -> Text
path) (\s :: Group
s@Group' {} Text
a -> Group
s {$sel:path:Group' :: Text
path = Text
a} :: Group)
group_groupName :: Lens.Lens' Group Prelude.Text
group_groupName :: (Text -> f Text) -> Group -> f Group
group_groupName = (Group -> Text)
-> (Group -> Text -> Group) -> Lens Group Group Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Group' {Text
groupName :: Text
$sel:groupName:Group' :: Group -> Text
groupName} -> Text
groupName) (\s :: Group
s@Group' {} Text
a -> Group
s {$sel:groupName:Group' :: Text
groupName = Text
a} :: Group)
group_groupId :: Lens.Lens' Group Prelude.Text
group_groupId :: (Text -> f Text) -> Group -> f Group
group_groupId = (Group -> Text)
-> (Group -> Text -> Group) -> Lens Group Group Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Group' {Text
groupId :: Text
$sel:groupId:Group' :: Group -> Text
groupId} -> Text
groupId) (\s :: Group
s@Group' {} Text
a -> Group
s {$sel:groupId:Group' :: Text
groupId = Text
a} :: Group)
group_arn :: Lens.Lens' Group Prelude.Text
group_arn :: (Text -> f Text) -> Group -> f Group
group_arn = (Group -> Text)
-> (Group -> Text -> Group) -> Lens Group Group Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Group' {Text
arn :: Text
$sel:arn:Group' :: Group -> Text
arn} -> Text
arn) (\s :: Group
s@Group' {} Text
a -> Group
s {$sel:arn:Group' :: Text
arn = Text
a} :: Group)
group_createDate :: Lens.Lens' Group Prelude.UTCTime
group_createDate :: (UTCTime -> f UTCTime) -> Group -> f Group
group_createDate = (Group -> ISO8601)
-> (Group -> ISO8601 -> Group) -> Lens Group Group ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Group' {ISO8601
createDate :: ISO8601
$sel:createDate:Group' :: Group -> ISO8601
createDate} -> ISO8601
createDate) (\s :: Group
s@Group' {} ISO8601
a -> Group
s {$sel:createDate:Group' :: ISO8601
createDate = ISO8601
a} :: Group) ((ISO8601 -> f ISO8601) -> Group -> f Group)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> Group
-> f Group
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromXML Group where
parseXML :: [Node] -> Either String Group
parseXML [Node]
x =
Text -> Text -> Text -> Text -> ISO8601 -> Group
Group'
(Text -> Text -> Text -> Text -> ISO8601 -> Group)
-> Either String Text
-> Either String (Text -> Text -> Text -> ISO8601 -> Group)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Path")
Either String (Text -> Text -> Text -> ISO8601 -> Group)
-> Either String Text
-> Either String (Text -> Text -> ISO8601 -> Group)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"GroupName")
Either String (Text -> Text -> ISO8601 -> Group)
-> Either String Text -> Either String (Text -> ISO8601 -> Group)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"GroupId")
Either String (Text -> ISO8601 -> Group)
-> Either String Text -> Either String (ISO8601 -> Group)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Arn")
Either String (ISO8601 -> Group)
-> Either String ISO8601 -> Either String Group
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ISO8601
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"CreateDate")
instance Prelude.Hashable Group
instance Prelude.NFData Group