{-# 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.STS.Types.AssumedRoleUser where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AssumedRoleUser = AssumedRoleUser'
{
AssumedRoleUser -> Text
assumedRoleId :: Prelude.Text,
AssumedRoleUser -> Text
arn :: Prelude.Text
}
deriving (AssumedRoleUser -> AssumedRoleUser -> Bool
(AssumedRoleUser -> AssumedRoleUser -> Bool)
-> (AssumedRoleUser -> AssumedRoleUser -> Bool)
-> Eq AssumedRoleUser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssumedRoleUser -> AssumedRoleUser -> Bool
$c/= :: AssumedRoleUser -> AssumedRoleUser -> Bool
== :: AssumedRoleUser -> AssumedRoleUser -> Bool
$c== :: AssumedRoleUser -> AssumedRoleUser -> Bool
Prelude.Eq, ReadPrec [AssumedRoleUser]
ReadPrec AssumedRoleUser
Int -> ReadS AssumedRoleUser
ReadS [AssumedRoleUser]
(Int -> ReadS AssumedRoleUser)
-> ReadS [AssumedRoleUser]
-> ReadPrec AssumedRoleUser
-> ReadPrec [AssumedRoleUser]
-> Read AssumedRoleUser
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssumedRoleUser]
$creadListPrec :: ReadPrec [AssumedRoleUser]
readPrec :: ReadPrec AssumedRoleUser
$creadPrec :: ReadPrec AssumedRoleUser
readList :: ReadS [AssumedRoleUser]
$creadList :: ReadS [AssumedRoleUser]
readsPrec :: Int -> ReadS AssumedRoleUser
$creadsPrec :: Int -> ReadS AssumedRoleUser
Prelude.Read, Int -> AssumedRoleUser -> ShowS
[AssumedRoleUser] -> ShowS
AssumedRoleUser -> String
(Int -> AssumedRoleUser -> ShowS)
-> (AssumedRoleUser -> String)
-> ([AssumedRoleUser] -> ShowS)
-> Show AssumedRoleUser
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssumedRoleUser] -> ShowS
$cshowList :: [AssumedRoleUser] -> ShowS
show :: AssumedRoleUser -> String
$cshow :: AssumedRoleUser -> String
showsPrec :: Int -> AssumedRoleUser -> ShowS
$cshowsPrec :: Int -> AssumedRoleUser -> ShowS
Prelude.Show, (forall x. AssumedRoleUser -> Rep AssumedRoleUser x)
-> (forall x. Rep AssumedRoleUser x -> AssumedRoleUser)
-> Generic AssumedRoleUser
forall x. Rep AssumedRoleUser x -> AssumedRoleUser
forall x. AssumedRoleUser -> Rep AssumedRoleUser x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssumedRoleUser x -> AssumedRoleUser
$cfrom :: forall x. AssumedRoleUser -> Rep AssumedRoleUser x
Prelude.Generic)
newAssumedRoleUser ::
Prelude.Text ->
Prelude.Text ->
AssumedRoleUser
newAssumedRoleUser :: Text -> Text -> AssumedRoleUser
newAssumedRoleUser Text
pAssumedRoleId_ Text
pArn_ =
AssumedRoleUser' :: Text -> Text -> AssumedRoleUser
AssumedRoleUser'
{ $sel:assumedRoleId:AssumedRoleUser' :: Text
assumedRoleId = Text
pAssumedRoleId_,
$sel:arn:AssumedRoleUser' :: Text
arn = Text
pArn_
}
assumedRoleUser_assumedRoleId :: Lens.Lens' AssumedRoleUser Prelude.Text
assumedRoleUser_assumedRoleId :: (Text -> f Text) -> AssumedRoleUser -> f AssumedRoleUser
assumedRoleUser_assumedRoleId = (AssumedRoleUser -> Text)
-> (AssumedRoleUser -> Text -> AssumedRoleUser)
-> Lens AssumedRoleUser AssumedRoleUser Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssumedRoleUser' {Text
assumedRoleId :: Text
$sel:assumedRoleId:AssumedRoleUser' :: AssumedRoleUser -> Text
assumedRoleId} -> Text
assumedRoleId) (\s :: AssumedRoleUser
s@AssumedRoleUser' {} Text
a -> AssumedRoleUser
s {$sel:assumedRoleId:AssumedRoleUser' :: Text
assumedRoleId = Text
a} :: AssumedRoleUser)
assumedRoleUser_arn :: Lens.Lens' AssumedRoleUser Prelude.Text
assumedRoleUser_arn :: (Text -> f Text) -> AssumedRoleUser -> f AssumedRoleUser
assumedRoleUser_arn = (AssumedRoleUser -> Text)
-> (AssumedRoleUser -> Text -> AssumedRoleUser)
-> Lens AssumedRoleUser AssumedRoleUser Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssumedRoleUser' {Text
arn :: Text
$sel:arn:AssumedRoleUser' :: AssumedRoleUser -> Text
arn} -> Text
arn) (\s :: AssumedRoleUser
s@AssumedRoleUser' {} Text
a -> AssumedRoleUser
s {$sel:arn:AssumedRoleUser' :: Text
arn = Text
a} :: AssumedRoleUser)
instance Core.FromXML AssumedRoleUser where
parseXML :: [Node] -> Either String AssumedRoleUser
parseXML [Node]
x =
Text -> Text -> AssumedRoleUser
AssumedRoleUser'
(Text -> Text -> AssumedRoleUser)
-> Either String Text -> Either String (Text -> AssumedRoleUser)
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
"AssumedRoleId")
Either String (Text -> AssumedRoleUser)
-> Either String Text -> Either String AssumedRoleUser
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")
instance Prelude.Hashable AssumedRoleUser
instance Prelude.NFData AssumedRoleUser