{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IAM.Types.User
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IAM.Types.User where

import qualified Amazonka.Core as Core
import Amazonka.IAM.Types.AttachedPermissionsBoundary
import Amazonka.IAM.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains information about an IAM user entity.
--
-- This data type is used as a response element in the following
-- operations:
--
-- -   CreateUser
--
-- -   GetUser
--
-- -   ListUsers
--
-- /See:/ 'newUser' smart constructor.
data User = User'
  { -- | The date and time, in
    -- <http://www.iso.org/iso/iso8601 ISO 8601 date-time format>, when the
    -- user\'s password was last used to sign in to an Amazon Web Services
    -- website. For a list of Amazon Web Services websites that capture a
    -- user\'s last sign-in time, see the
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html Credential reports>
    -- topic in the /IAM User Guide/. If a password is used more than once in a
    -- five-minute span, only the first use is returned in this field. If the
    -- field is null (no value), then it indicates that they never signed in
    -- with a password. This can be because:
    --
    -- -   The user never had a password.
    --
    -- -   A password exists but has not been used since IAM started tracking
    --     this information on October 20, 2014.
    --
    -- A null value does not mean that the user /never/ had a password. Also,
    -- if the user does not currently have a password but had one in the past,
    -- then this field contains the date and time the most recent password was
    -- used.
    --
    -- This value is returned only in the GetUser and ListUsers operations.
    User -> Maybe ISO8601
passwordLastUsed :: Prelude.Maybe Core.ISO8601,
    -- | The path to the user. For more information about paths, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM identifiers>
    -- in the /IAM User Guide/.
    --
    -- The ARN of the policy used to set the permissions boundary for the user.
    User -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
    -- | For more information about permissions boundaries, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html Permissions boundaries for IAM identities>
    -- in the /IAM User Guide/.
    User -> Maybe AttachedPermissionsBoundary
permissionsBoundary :: Prelude.Maybe AttachedPermissionsBoundary,
    -- | A list of tags that are associated with the user. For more information
    -- about tagging, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
    -- in the /IAM User Guide/.
    User -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The friendly name identifying the user.
    User -> Text
userName :: Prelude.Text,
    -- | The stable and unique string identifying the user. For more information
    -- about IDs, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM identifiers>
    -- in the /IAM User Guide/.
    User -> Text
userId :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) that identifies the user. For more
    -- information about ARNs and how to use ARNs in policies, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM Identifiers>
    -- in the /IAM User Guide/.
    User -> Text
arn :: Prelude.Text,
    -- | The date and time, in
    -- <http://www.iso.org/iso/iso8601 ISO 8601 date-time format>, when the
    -- user was created.
    User -> ISO8601
createDate :: Core.ISO8601
  }
  deriving (User -> User -> Bool
(User -> User -> Bool) -> (User -> User -> Bool) -> Eq User
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: User -> User -> Bool
$c/= :: User -> User -> Bool
== :: User -> User -> Bool
$c== :: User -> User -> Bool
Prelude.Eq, ReadPrec [User]
ReadPrec User
Int -> ReadS User
ReadS [User]
(Int -> ReadS User)
-> ReadS [User] -> ReadPrec User -> ReadPrec [User] -> Read User
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [User]
$creadListPrec :: ReadPrec [User]
readPrec :: ReadPrec User
$creadPrec :: ReadPrec User
readList :: ReadS [User]
$creadList :: ReadS [User]
readsPrec :: Int -> ReadS User
$creadsPrec :: Int -> ReadS User
Prelude.Read, Int -> User -> ShowS
[User] -> ShowS
User -> String
(Int -> User -> ShowS)
-> (User -> String) -> ([User] -> ShowS) -> Show User
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [User] -> ShowS
$cshowList :: [User] -> ShowS
show :: User -> String
$cshow :: User -> String
showsPrec :: Int -> User -> ShowS
$cshowsPrec :: Int -> User -> ShowS
Prelude.Show, (forall x. User -> Rep User x)
-> (forall x. Rep User x -> User) -> Generic User
forall x. Rep User x -> User
forall x. User -> Rep User x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep User x -> User
$cfrom :: forall x. User -> Rep User x
Prelude.Generic)

-- |
-- Create a value of 'User' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'passwordLastUsed', 'user_passwordLastUsed' - The date and time, in
-- <http://www.iso.org/iso/iso8601 ISO 8601 date-time format>, when the
-- user\'s password was last used to sign in to an Amazon Web Services
-- website. For a list of Amazon Web Services websites that capture a
-- user\'s last sign-in time, see the
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html Credential reports>
-- topic in the /IAM User Guide/. If a password is used more than once in a
-- five-minute span, only the first use is returned in this field. If the
-- field is null (no value), then it indicates that they never signed in
-- with a password. This can be because:
--
-- -   The user never had a password.
--
-- -   A password exists but has not been used since IAM started tracking
--     this information on October 20, 2014.
--
-- A null value does not mean that the user /never/ had a password. Also,
-- if the user does not currently have a password but had one in the past,
-- then this field contains the date and time the most recent password was
-- used.
--
-- This value is returned only in the GetUser and ListUsers operations.
--
-- 'path', 'user_path' - The path to the user. For more information about paths, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM identifiers>
-- in the /IAM User Guide/.
--
-- The ARN of the policy used to set the permissions boundary for the user.
--
-- 'permissionsBoundary', 'user_permissionsBoundary' - For more information about permissions boundaries, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html Permissions boundaries for IAM identities>
-- in the /IAM User Guide/.
--
-- 'tags', 'user_tags' - A list of tags that are associated with the user. For more information
-- about tagging, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
-- in the /IAM User Guide/.
--
-- 'userName', 'user_userName' - The friendly name identifying the user.
--
-- 'userId', 'user_userId' - The stable and unique string identifying the user. For more information
-- about IDs, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM identifiers>
-- in the /IAM User Guide/.
--
-- 'arn', 'user_arn' - The Amazon Resource Name (ARN) that identifies the user. For more
-- information about ARNs and how to use ARNs in policies, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM Identifiers>
-- in the /IAM User Guide/.
--
-- 'createDate', 'user_createDate' - The date and time, in
-- <http://www.iso.org/iso/iso8601 ISO 8601 date-time format>, when the
-- user was created.
newUser ::
  -- | 'userName'
  Prelude.Text ->
  -- | 'userId'
  Prelude.Text ->
  -- | 'arn'
  Prelude.Text ->
  -- | 'createDate'
  Prelude.UTCTime ->
  User
newUser :: Text -> Text -> Text -> UTCTime -> User
newUser Text
pUserName_ Text
pUserId_ Text
pArn_ UTCTime
pCreateDate_ =
  User' :: Maybe ISO8601
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> ISO8601
-> User
User'
    { $sel:passwordLastUsed:User' :: Maybe ISO8601
passwordLastUsed = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:path:User' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:permissionsBoundary:User' :: Maybe AttachedPermissionsBoundary
permissionsBoundary = Maybe AttachedPermissionsBoundary
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:User' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:userName:User' :: Text
userName = Text
pUserName_,
      $sel:userId:User' :: Text
userId = Text
pUserId_,
      $sel:arn:User' :: Text
arn = Text
pArn_,
      $sel:createDate:User' :: 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_
    }

-- | The date and time, in
-- <http://www.iso.org/iso/iso8601 ISO 8601 date-time format>, when the
-- user\'s password was last used to sign in to an Amazon Web Services
-- website. For a list of Amazon Web Services websites that capture a
-- user\'s last sign-in time, see the
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html Credential reports>
-- topic in the /IAM User Guide/. If a password is used more than once in a
-- five-minute span, only the first use is returned in this field. If the
-- field is null (no value), then it indicates that they never signed in
-- with a password. This can be because:
--
-- -   The user never had a password.
--
-- -   A password exists but has not been used since IAM started tracking
--     this information on October 20, 2014.
--
-- A null value does not mean that the user /never/ had a password. Also,
-- if the user does not currently have a password but had one in the past,
-- then this field contains the date and time the most recent password was
-- used.
--
-- This value is returned only in the GetUser and ListUsers operations.
user_passwordLastUsed :: Lens.Lens' User (Prelude.Maybe Prelude.UTCTime)
user_passwordLastUsed :: (Maybe UTCTime -> f (Maybe UTCTime)) -> User -> f User
user_passwordLastUsed = (User -> Maybe ISO8601)
-> (User -> Maybe ISO8601 -> User)
-> Lens User User (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe ISO8601
passwordLastUsed :: Maybe ISO8601
$sel:passwordLastUsed:User' :: User -> Maybe ISO8601
passwordLastUsed} -> Maybe ISO8601
passwordLastUsed) (\s :: User
s@User' {} Maybe ISO8601
a -> User
s {$sel:passwordLastUsed:User' :: Maybe ISO8601
passwordLastUsed = Maybe ISO8601
a} :: User) ((Maybe ISO8601 -> f (Maybe ISO8601)) -> User -> f User)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> User
-> f User
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

-- | The path to the user. For more information about paths, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM identifiers>
-- in the /IAM User Guide/.
--
-- The ARN of the policy used to set the permissions boundary for the user.
user_path :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_path :: (Maybe Text -> f (Maybe Text)) -> User -> f User
user_path = (User -> Maybe Text)
-> (User -> Maybe Text -> User)
-> Lens User User (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
path :: Maybe Text
$sel:path:User' :: User -> Maybe Text
path} -> Maybe Text
path) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:path:User' :: Maybe Text
path = Maybe Text
a} :: User)

-- | For more information about permissions boundaries, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html Permissions boundaries for IAM identities>
-- in the /IAM User Guide/.
user_permissionsBoundary :: Lens.Lens' User (Prelude.Maybe AttachedPermissionsBoundary)
user_permissionsBoundary :: (Maybe AttachedPermissionsBoundary
 -> f (Maybe AttachedPermissionsBoundary))
-> User -> f User
user_permissionsBoundary = (User -> Maybe AttachedPermissionsBoundary)
-> (User -> Maybe AttachedPermissionsBoundary -> User)
-> Lens
     User
     User
     (Maybe AttachedPermissionsBoundary)
     (Maybe AttachedPermissionsBoundary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe AttachedPermissionsBoundary
permissionsBoundary :: Maybe AttachedPermissionsBoundary
$sel:permissionsBoundary:User' :: User -> Maybe AttachedPermissionsBoundary
permissionsBoundary} -> Maybe AttachedPermissionsBoundary
permissionsBoundary) (\s :: User
s@User' {} Maybe AttachedPermissionsBoundary
a -> User
s {$sel:permissionsBoundary:User' :: Maybe AttachedPermissionsBoundary
permissionsBoundary = Maybe AttachedPermissionsBoundary
a} :: User)

-- | A list of tags that are associated with the user. For more information
-- about tagging, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
-- in the /IAM User Guide/.
user_tags :: Lens.Lens' User (Prelude.Maybe [Tag])
user_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> User -> f User
user_tags = (User -> Maybe [Tag])
-> (User -> Maybe [Tag] -> User)
-> Lens User User (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:User' :: User -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: User
s@User' {} Maybe [Tag]
a -> User
s {$sel:tags:User' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: User) ((Maybe [Tag] -> f (Maybe [Tag])) -> User -> f User)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> User
-> f User
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

-- | The friendly name identifying the user.
user_userName :: Lens.Lens' User Prelude.Text
user_userName :: (Text -> f Text) -> User -> f User
user_userName = (User -> Text)
-> (User -> Text -> User) -> Lens User User Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Text
userName :: Text
$sel:userName:User' :: User -> Text
userName} -> Text
userName) (\s :: User
s@User' {} Text
a -> User
s {$sel:userName:User' :: Text
userName = Text
a} :: User)

-- | The stable and unique string identifying the user. For more information
-- about IDs, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM identifiers>
-- in the /IAM User Guide/.
user_userId :: Lens.Lens' User Prelude.Text
user_userId :: (Text -> f Text) -> User -> f User
user_userId = (User -> Text)
-> (User -> Text -> User) -> Lens User User Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Text
userId :: Text
$sel:userId:User' :: User -> Text
userId} -> Text
userId) (\s :: User
s@User' {} Text
a -> User
s {$sel:userId:User' :: Text
userId = Text
a} :: User)

-- | The Amazon Resource Name (ARN) that identifies the user. For more
-- information about ARNs and how to use ARNs in policies, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM Identifiers>
-- in the /IAM User Guide/.
user_arn :: Lens.Lens' User Prelude.Text
user_arn :: (Text -> f Text) -> User -> f User
user_arn = (User -> Text)
-> (User -> Text -> User) -> Lens User User Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Text
arn :: Text
$sel:arn:User' :: User -> Text
arn} -> Text
arn) (\s :: User
s@User' {} Text
a -> User
s {$sel:arn:User' :: Text
arn = Text
a} :: User)

-- | The date and time, in
-- <http://www.iso.org/iso/iso8601 ISO 8601 date-time format>, when the
-- user was created.
user_createDate :: Lens.Lens' User Prelude.UTCTime
user_createDate :: (UTCTime -> f UTCTime) -> User -> f User
user_createDate = (User -> ISO8601)
-> (User -> ISO8601 -> User) -> Lens User User ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {ISO8601
createDate :: ISO8601
$sel:createDate:User' :: User -> ISO8601
createDate} -> ISO8601
createDate) (\s :: User
s@User' {} ISO8601
a -> User
s {$sel:createDate:User' :: ISO8601
createDate = ISO8601
a} :: User) ((ISO8601 -> f ISO8601) -> User -> f User)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> User
-> f User
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 User where
  parseXML :: [Node] -> Either String User
parseXML [Node]
x =
    Maybe ISO8601
-> Maybe Text
-> Maybe AttachedPermissionsBoundary
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> ISO8601
-> User
User'
      (Maybe ISO8601
 -> Maybe Text
 -> Maybe AttachedPermissionsBoundary
 -> Maybe [Tag]
 -> Text
 -> Text
 -> Text
 -> ISO8601
 -> User)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe AttachedPermissionsBoundary
      -> Maybe [Tag]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> User)
forall (f :: * -> *) a b. Functor 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
"PasswordLastUsed")
      Either
  String
  (Maybe Text
   -> Maybe AttachedPermissionsBoundary
   -> Maybe [Tag]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> User)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe AttachedPermissionsBoundary
      -> Maybe [Tag] -> Text -> Text -> Text -> ISO8601 -> User)
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 AttachedPermissionsBoundary
   -> Maybe [Tag] -> Text -> Text -> Text -> ISO8601 -> User)
-> Either String (Maybe AttachedPermissionsBoundary)
-> Either
     String (Maybe [Tag] -> Text -> Text -> Text -> ISO8601 -> User)
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 [Tag] -> Text -> Text -> Text -> ISO8601 -> User)
-> Either String (Maybe [Tag])
-> Either String (Text -> Text -> Text -> ISO8601 -> User)
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 (Text -> Text -> Text -> ISO8601 -> User)
-> Either String Text
-> Either String (Text -> Text -> ISO8601 -> User)
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
"UserName")
      Either String (Text -> Text -> ISO8601 -> User)
-> Either String Text -> Either String (Text -> ISO8601 -> User)
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
"UserId")
      Either String (Text -> ISO8601 -> User)
-> Either String Text -> Either String (ISO8601 -> User)
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 -> User)
-> Either String ISO8601 -> Either String User
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 User

instance Prelude.NFData User