{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data AssumedRoleUser = AssumedRoleUser'
{
AssumedRoleUser -> Text
assumedRoleId :: Prelude.Text,
AssumedRoleUser -> Text
arn :: Prelude.Text
}
deriving (AssumedRoleUser -> AssumedRoleUser -> Bool
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]
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
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. 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'
{ $sel:assumedRoleId:AssumedRoleUser' :: Text
assumedRoleId = Text
pAssumedRoleId_,
$sel:arn:AssumedRoleUser' :: Text
arn = Text
pArn_
}
assumedRoleUser_assumedRoleId :: Lens.Lens' AssumedRoleUser Prelude.Text
assumedRoleUser_assumedRoleId :: Lens' AssumedRoleUser Text
assumedRoleUser_assumedRoleId = 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 :: Lens' AssumedRoleUser Text
assumedRoleUser_arn = 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 Data.FromXML AssumedRoleUser where
parseXML :: [Node] -> Either String AssumedRoleUser
parseXML [Node]
x =
Text -> Text -> AssumedRoleUser
AssumedRoleUser'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"AssumedRoleId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Arn")
instance Prelude.Hashable AssumedRoleUser where
hashWithSalt :: Int -> AssumedRoleUser -> Int
hashWithSalt Int
_salt AssumedRoleUser' {Text
arn :: Text
assumedRoleId :: Text
$sel:arn:AssumedRoleUser' :: AssumedRoleUser -> Text
$sel:assumedRoleId:AssumedRoleUser' :: AssumedRoleUser -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
assumedRoleId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData AssumedRoleUser where
rnf :: AssumedRoleUser -> ()
rnf AssumedRoleUser' {Text
arn :: Text
assumedRoleId :: Text
$sel:arn:AssumedRoleUser' :: AssumedRoleUser -> Text
$sel:assumedRoleId:AssumedRoleUser' :: AssumedRoleUser -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
assumedRoleId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn