{-# 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.UserDetail where
import qualified Amazonka.Core as Core
import Amazonka.IAM.Types.AttachedPermissionsBoundary
import Amazonka.IAM.Types.AttachedPolicy
import Amazonka.IAM.Types.PolicyDetail
import Amazonka.IAM.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UserDetail = UserDetail'
{
UserDetail -> Maybe [Text]
groupList :: Prelude.Maybe [Prelude.Text],
UserDetail -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
UserDetail -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
UserDetail -> Maybe ISO8601
createDate :: Prelude.Maybe Core.ISO8601,
UserDetail -> Maybe Text
userName :: Prelude.Maybe Prelude.Text,
UserDetail -> Maybe Text
userId :: Prelude.Maybe Prelude.Text,
UserDetail -> Maybe AttachedPermissionsBoundary
permissionsBoundary :: Prelude.Maybe AttachedPermissionsBoundary,
UserDetail -> Maybe [PolicyDetail]
userPolicyList :: Prelude.Maybe [PolicyDetail],
UserDetail -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
UserDetail -> Maybe [AttachedPolicy]
attachedManagedPolicies :: Prelude.Maybe [AttachedPolicy]
}
deriving (UserDetail -> UserDetail -> Bool
(UserDetail -> UserDetail -> Bool)
-> (UserDetail -> UserDetail -> Bool) -> Eq UserDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserDetail -> UserDetail -> Bool
$c/= :: UserDetail -> UserDetail -> Bool
== :: UserDetail -> UserDetail -> Bool
$c== :: UserDetail -> UserDetail -> Bool
Prelude.Eq, ReadPrec [UserDetail]
ReadPrec UserDetail
Int -> ReadS UserDetail
ReadS [UserDetail]
(Int -> ReadS UserDetail)
-> ReadS [UserDetail]
-> ReadPrec UserDetail
-> ReadPrec [UserDetail]
-> Read UserDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserDetail]
$creadListPrec :: ReadPrec [UserDetail]
readPrec :: ReadPrec UserDetail
$creadPrec :: ReadPrec UserDetail
readList :: ReadS [UserDetail]
$creadList :: ReadS [UserDetail]
readsPrec :: Int -> ReadS UserDetail
$creadsPrec :: Int -> ReadS UserDetail
Prelude.Read, Int -> UserDetail -> ShowS
[UserDetail] -> ShowS
UserDetail -> String
(Int -> UserDetail -> ShowS)
-> (UserDetail -> String)
-> ([UserDetail] -> ShowS)
-> Show UserDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserDetail] -> ShowS
$cshowList :: [UserDetail] -> ShowS
show :: UserDetail -> String
$cshow :: UserDetail -> String
showsPrec :: Int -> UserDetail -> ShowS
$cshowsPrec :: Int -> UserDetail -> ShowS
Prelude.Show, (forall x. UserDetail -> Rep UserDetail x)
-> (forall x. Rep UserDetail x -> UserDetail) -> Generic UserDetail
forall x. Rep UserDetail x -> UserDetail
forall x. UserDetail -> Rep UserDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UserDetail x -> UserDetail
$cfrom :: forall x. UserDetail -> Rep UserDetail x
Prelude.Generic)
newUserDetail ::
UserDetail
newUserDetail :: UserDetail
newUserDetail =
UserDetail' :: Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail
UserDetail'
{ $sel:groupList:UserDetail' :: Maybe [Text]
groupList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:arn:UserDetail' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:path:UserDetail' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createDate:UserDetail' :: Maybe ISO8601
createDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:userName:UserDetail' :: Maybe Text
userName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userId:UserDetail' :: Maybe Text
userId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:permissionsBoundary:UserDetail' :: Maybe AttachedPermissionsBoundary
permissionsBoundary = Maybe AttachedPermissionsBoundary
forall a. Maybe a
Prelude.Nothing,
$sel:userPolicyList:UserDetail' :: Maybe [PolicyDetail]
userPolicyList = Maybe [PolicyDetail]
forall a. Maybe a
Prelude.Nothing,
$sel:tags:UserDetail' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:attachedManagedPolicies:UserDetail' :: Maybe [AttachedPolicy]
attachedManagedPolicies = Maybe [AttachedPolicy]
forall a. Maybe a
Prelude.Nothing
}
userDetail_groupList :: Lens.Lens' UserDetail (Prelude.Maybe [Prelude.Text])
userDetail_groupList :: (Maybe [Text] -> f (Maybe [Text])) -> UserDetail -> f UserDetail
userDetail_groupList = (UserDetail -> Maybe [Text])
-> (UserDetail -> Maybe [Text] -> UserDetail)
-> Lens UserDetail UserDetail (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe [Text]
groupList :: Maybe [Text]
$sel:groupList:UserDetail' :: UserDetail -> Maybe [Text]
groupList} -> Maybe [Text]
groupList) (\s :: UserDetail
s@UserDetail' {} Maybe [Text]
a -> UserDetail
s {$sel:groupList:UserDetail' :: Maybe [Text]
groupList = Maybe [Text]
a} :: UserDetail) ((Maybe [Text] -> f (Maybe [Text])) -> UserDetail -> f UserDetail)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UserDetail
-> f UserDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
userDetail_arn :: Lens.Lens' UserDetail (Prelude.Maybe Prelude.Text)
userDetail_arn :: (Maybe Text -> f (Maybe Text)) -> UserDetail -> f UserDetail
userDetail_arn = (UserDetail -> Maybe Text)
-> (UserDetail -> Maybe Text -> UserDetail)
-> Lens UserDetail UserDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe Text
arn :: Maybe Text
$sel:arn:UserDetail' :: UserDetail -> Maybe Text
arn} -> Maybe Text
arn) (\s :: UserDetail
s@UserDetail' {} Maybe Text
a -> UserDetail
s {$sel:arn:UserDetail' :: Maybe Text
arn = Maybe Text
a} :: UserDetail)
userDetail_path :: Lens.Lens' UserDetail (Prelude.Maybe Prelude.Text)
userDetail_path :: (Maybe Text -> f (Maybe Text)) -> UserDetail -> f UserDetail
userDetail_path = (UserDetail -> Maybe Text)
-> (UserDetail -> Maybe Text -> UserDetail)
-> Lens UserDetail UserDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe Text
path :: Maybe Text
$sel:path:UserDetail' :: UserDetail -> Maybe Text
path} -> Maybe Text
path) (\s :: UserDetail
s@UserDetail' {} Maybe Text
a -> UserDetail
s {$sel:path:UserDetail' :: Maybe Text
path = Maybe Text
a} :: UserDetail)
userDetail_createDate :: Lens.Lens' UserDetail (Prelude.Maybe Prelude.UTCTime)
userDetail_createDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> UserDetail -> f UserDetail
userDetail_createDate = (UserDetail -> Maybe ISO8601)
-> (UserDetail -> Maybe ISO8601 -> UserDetail)
-> Lens UserDetail UserDetail (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe ISO8601
createDate :: Maybe ISO8601
$sel:createDate:UserDetail' :: UserDetail -> Maybe ISO8601
createDate} -> Maybe ISO8601
createDate) (\s :: UserDetail
s@UserDetail' {} Maybe ISO8601
a -> UserDetail
s {$sel:createDate:UserDetail' :: Maybe ISO8601
createDate = Maybe ISO8601
a} :: UserDetail) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> UserDetail -> f UserDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UserDetail
-> f UserDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
userDetail_userName :: Lens.Lens' UserDetail (Prelude.Maybe Prelude.Text)
userDetail_userName :: (Maybe Text -> f (Maybe Text)) -> UserDetail -> f UserDetail
userDetail_userName = (UserDetail -> Maybe Text)
-> (UserDetail -> Maybe Text -> UserDetail)
-> Lens UserDetail UserDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe Text
userName :: Maybe Text
$sel:userName:UserDetail' :: UserDetail -> Maybe Text
userName} -> Maybe Text
userName) (\s :: UserDetail
s@UserDetail' {} Maybe Text
a -> UserDetail
s {$sel:userName:UserDetail' :: Maybe Text
userName = Maybe Text
a} :: UserDetail)
userDetail_userId :: Lens.Lens' UserDetail (Prelude.Maybe Prelude.Text)
userDetail_userId :: (Maybe Text -> f (Maybe Text)) -> UserDetail -> f UserDetail
userDetail_userId = (UserDetail -> Maybe Text)
-> (UserDetail -> Maybe Text -> UserDetail)
-> Lens UserDetail UserDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe Text
userId :: Maybe Text
$sel:userId:UserDetail' :: UserDetail -> Maybe Text
userId} -> Maybe Text
userId) (\s :: UserDetail
s@UserDetail' {} Maybe Text
a -> UserDetail
s {$sel:userId:UserDetail' :: Maybe Text
userId = Maybe Text
a} :: UserDetail)
userDetail_permissionsBoundary :: Lens.Lens' UserDetail (Prelude.Maybe AttachedPermissionsBoundary)
userDetail_permissionsBoundary :: (Maybe AttachedPermissionsBoundary
-> f (Maybe AttachedPermissionsBoundary))
-> UserDetail -> f UserDetail
userDetail_permissionsBoundary = (UserDetail -> Maybe AttachedPermissionsBoundary)
-> (UserDetail -> Maybe AttachedPermissionsBoundary -> UserDetail)
-> Lens
UserDetail
UserDetail
(Maybe AttachedPermissionsBoundary)
(Maybe AttachedPermissionsBoundary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe AttachedPermissionsBoundary
permissionsBoundary :: Maybe AttachedPermissionsBoundary
$sel:permissionsBoundary:UserDetail' :: UserDetail -> Maybe AttachedPermissionsBoundary
permissionsBoundary} -> Maybe AttachedPermissionsBoundary
permissionsBoundary) (\s :: UserDetail
s@UserDetail' {} Maybe AttachedPermissionsBoundary
a -> UserDetail
s {$sel:permissionsBoundary:UserDetail' :: Maybe AttachedPermissionsBoundary
permissionsBoundary = Maybe AttachedPermissionsBoundary
a} :: UserDetail)
userDetail_userPolicyList :: Lens.Lens' UserDetail (Prelude.Maybe [PolicyDetail])
userDetail_userPolicyList :: (Maybe [PolicyDetail] -> f (Maybe [PolicyDetail]))
-> UserDetail -> f UserDetail
userDetail_userPolicyList = (UserDetail -> Maybe [PolicyDetail])
-> (UserDetail -> Maybe [PolicyDetail] -> UserDetail)
-> Lens
UserDetail UserDetail (Maybe [PolicyDetail]) (Maybe [PolicyDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe [PolicyDetail]
userPolicyList :: Maybe [PolicyDetail]
$sel:userPolicyList:UserDetail' :: UserDetail -> Maybe [PolicyDetail]
userPolicyList} -> Maybe [PolicyDetail]
userPolicyList) (\s :: UserDetail
s@UserDetail' {} Maybe [PolicyDetail]
a -> UserDetail
s {$sel:userPolicyList:UserDetail' :: Maybe [PolicyDetail]
userPolicyList = Maybe [PolicyDetail]
a} :: UserDetail) ((Maybe [PolicyDetail] -> f (Maybe [PolicyDetail]))
-> UserDetail -> f UserDetail)
-> ((Maybe [PolicyDetail] -> f (Maybe [PolicyDetail]))
-> Maybe [PolicyDetail] -> f (Maybe [PolicyDetail]))
-> (Maybe [PolicyDetail] -> f (Maybe [PolicyDetail]))
-> UserDetail
-> f UserDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [PolicyDetail] [PolicyDetail] [PolicyDetail] [PolicyDetail]
-> Iso
(Maybe [PolicyDetail])
(Maybe [PolicyDetail])
(Maybe [PolicyDetail])
(Maybe [PolicyDetail])
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 [PolicyDetail] [PolicyDetail] [PolicyDetail] [PolicyDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
userDetail_tags :: Lens.Lens' UserDetail (Prelude.Maybe [Tag])
userDetail_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> UserDetail -> f UserDetail
userDetail_tags = (UserDetail -> Maybe [Tag])
-> (UserDetail -> Maybe [Tag] -> UserDetail)
-> Lens UserDetail UserDetail (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:UserDetail' :: UserDetail -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: UserDetail
s@UserDetail' {} Maybe [Tag]
a -> UserDetail
s {$sel:tags:UserDetail' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: UserDetail) ((Maybe [Tag] -> f (Maybe [Tag])) -> UserDetail -> f UserDetail)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> UserDetail
-> f UserDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
userDetail_attachedManagedPolicies :: Lens.Lens' UserDetail (Prelude.Maybe [AttachedPolicy])
userDetail_attachedManagedPolicies :: (Maybe [AttachedPolicy] -> f (Maybe [AttachedPolicy]))
-> UserDetail -> f UserDetail
userDetail_attachedManagedPolicies = (UserDetail -> Maybe [AttachedPolicy])
-> (UserDetail -> Maybe [AttachedPolicy] -> UserDetail)
-> Lens
UserDetail
UserDetail
(Maybe [AttachedPolicy])
(Maybe [AttachedPolicy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDetail' {Maybe [AttachedPolicy]
attachedManagedPolicies :: Maybe [AttachedPolicy]
$sel:attachedManagedPolicies:UserDetail' :: UserDetail -> Maybe [AttachedPolicy]
attachedManagedPolicies} -> Maybe [AttachedPolicy]
attachedManagedPolicies) (\s :: UserDetail
s@UserDetail' {} Maybe [AttachedPolicy]
a -> UserDetail
s {$sel:attachedManagedPolicies:UserDetail' :: Maybe [AttachedPolicy]
attachedManagedPolicies = Maybe [AttachedPolicy]
a} :: UserDetail) ((Maybe [AttachedPolicy] -> f (Maybe [AttachedPolicy]))
-> UserDetail -> f UserDetail)
-> ((Maybe [AttachedPolicy] -> f (Maybe [AttachedPolicy]))
-> Maybe [AttachedPolicy] -> f (Maybe [AttachedPolicy]))
-> (Maybe [AttachedPolicy] -> f (Maybe [AttachedPolicy]))
-> UserDetail
-> f UserDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AttachedPolicy] [AttachedPolicy] [AttachedPolicy] [AttachedPolicy]
-> Iso
(Maybe [AttachedPolicy])
(Maybe [AttachedPolicy])
(Maybe [AttachedPolicy])
(Maybe [AttachedPolicy])
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
[AttachedPolicy] [AttachedPolicy] [AttachedPolicy] [AttachedPolicy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromXML UserDetail where
parseXML :: [Node] -> Either String UserDetail
parseXML [Node]
x =
Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail
UserDetail'
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
-> Either String (Maybe [Text])
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"GroupList" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Arn")
Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
-> Either String (Maybe Text)
-> Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Path")
Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CreateDate")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UserName")
Either
String
(Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
-> Either String (Maybe Text)
-> Either
String
(Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UserId")
Either
String
(Maybe AttachedPermissionsBoundary
-> Maybe [PolicyDetail]
-> Maybe [Tag]
-> Maybe [AttachedPolicy]
-> UserDetail)
-> Either String (Maybe AttachedPermissionsBoundary)
-> Either
String
(Maybe [PolicyDetail]
-> Maybe [Tag] -> Maybe [AttachedPolicy] -> UserDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe AttachedPermissionsBoundary)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PermissionsBoundary")
Either
String
(Maybe [PolicyDetail]
-> Maybe [Tag] -> Maybe [AttachedPolicy] -> UserDetail)
-> Either String (Maybe [PolicyDetail])
-> Either
String (Maybe [Tag] -> Maybe [AttachedPolicy] -> UserDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UserPolicyList" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [PolicyDetail]))
-> Either String (Maybe [PolicyDetail])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [PolicyDetail])
-> [Node] -> Either String (Maybe [PolicyDetail])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [PolicyDetail]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Maybe [Tag] -> Maybe [AttachedPolicy] -> UserDetail)
-> Either String (Maybe [Tag])
-> Either String (Maybe [AttachedPolicy] -> UserDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Tags" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [Tag]))
-> Either String (Maybe [Tag])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Tag])
-> [Node] -> Either String (Maybe [Tag])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Maybe [AttachedPolicy] -> UserDetail)
-> Either String (Maybe [AttachedPolicy])
-> Either String UserDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AttachedManagedPolicies"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [AttachedPolicy]))
-> Either String (Maybe [AttachedPolicy])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [AttachedPolicy])
-> [Node] -> Either String (Maybe [AttachedPolicy])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [AttachedPolicy]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
instance Prelude.Hashable UserDetail
instance Prelude.NFData UserDetail