{-# 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.ServiceSpecificCredentialMetadata where
import qualified Amazonka.Core as Core
import Amazonka.IAM.Types.StatusType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ServiceSpecificCredentialMetadata = ServiceSpecificCredentialMetadata'
{
ServiceSpecificCredentialMetadata -> Text
userName :: Prelude.Text,
ServiceSpecificCredentialMetadata -> StatusType
status :: StatusType,
ServiceSpecificCredentialMetadata -> Text
serviceUserName :: Prelude.Text,
ServiceSpecificCredentialMetadata -> ISO8601
createDate :: Core.ISO8601,
ServiceSpecificCredentialMetadata -> Text
serviceSpecificCredentialId :: Prelude.Text,
ServiceSpecificCredentialMetadata -> Text
serviceName :: Prelude.Text
}
deriving (ServiceSpecificCredentialMetadata
-> ServiceSpecificCredentialMetadata -> Bool
(ServiceSpecificCredentialMetadata
-> ServiceSpecificCredentialMetadata -> Bool)
-> (ServiceSpecificCredentialMetadata
-> ServiceSpecificCredentialMetadata -> Bool)
-> Eq ServiceSpecificCredentialMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceSpecificCredentialMetadata
-> ServiceSpecificCredentialMetadata -> Bool
$c/= :: ServiceSpecificCredentialMetadata
-> ServiceSpecificCredentialMetadata -> Bool
== :: ServiceSpecificCredentialMetadata
-> ServiceSpecificCredentialMetadata -> Bool
$c== :: ServiceSpecificCredentialMetadata
-> ServiceSpecificCredentialMetadata -> Bool
Prelude.Eq, ReadPrec [ServiceSpecificCredentialMetadata]
ReadPrec ServiceSpecificCredentialMetadata
Int -> ReadS ServiceSpecificCredentialMetadata
ReadS [ServiceSpecificCredentialMetadata]
(Int -> ReadS ServiceSpecificCredentialMetadata)
-> ReadS [ServiceSpecificCredentialMetadata]
-> ReadPrec ServiceSpecificCredentialMetadata
-> ReadPrec [ServiceSpecificCredentialMetadata]
-> Read ServiceSpecificCredentialMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceSpecificCredentialMetadata]
$creadListPrec :: ReadPrec [ServiceSpecificCredentialMetadata]
readPrec :: ReadPrec ServiceSpecificCredentialMetadata
$creadPrec :: ReadPrec ServiceSpecificCredentialMetadata
readList :: ReadS [ServiceSpecificCredentialMetadata]
$creadList :: ReadS [ServiceSpecificCredentialMetadata]
readsPrec :: Int -> ReadS ServiceSpecificCredentialMetadata
$creadsPrec :: Int -> ReadS ServiceSpecificCredentialMetadata
Prelude.Read, Int -> ServiceSpecificCredentialMetadata -> ShowS
[ServiceSpecificCredentialMetadata] -> ShowS
ServiceSpecificCredentialMetadata -> String
(Int -> ServiceSpecificCredentialMetadata -> ShowS)
-> (ServiceSpecificCredentialMetadata -> String)
-> ([ServiceSpecificCredentialMetadata] -> ShowS)
-> Show ServiceSpecificCredentialMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceSpecificCredentialMetadata] -> ShowS
$cshowList :: [ServiceSpecificCredentialMetadata] -> ShowS
show :: ServiceSpecificCredentialMetadata -> String
$cshow :: ServiceSpecificCredentialMetadata -> String
showsPrec :: Int -> ServiceSpecificCredentialMetadata -> ShowS
$cshowsPrec :: Int -> ServiceSpecificCredentialMetadata -> ShowS
Prelude.Show, (forall x.
ServiceSpecificCredentialMetadata
-> Rep ServiceSpecificCredentialMetadata x)
-> (forall x.
Rep ServiceSpecificCredentialMetadata x
-> ServiceSpecificCredentialMetadata)
-> Generic ServiceSpecificCredentialMetadata
forall x.
Rep ServiceSpecificCredentialMetadata x
-> ServiceSpecificCredentialMetadata
forall x.
ServiceSpecificCredentialMetadata
-> Rep ServiceSpecificCredentialMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ServiceSpecificCredentialMetadata x
-> ServiceSpecificCredentialMetadata
$cfrom :: forall x.
ServiceSpecificCredentialMetadata
-> Rep ServiceSpecificCredentialMetadata x
Prelude.Generic)
newServiceSpecificCredentialMetadata ::
Prelude.Text ->
StatusType ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
ServiceSpecificCredentialMetadata
newServiceSpecificCredentialMetadata :: Text
-> StatusType
-> Text
-> UTCTime
-> Text
-> Text
-> ServiceSpecificCredentialMetadata
newServiceSpecificCredentialMetadata
Text
pUserName_
StatusType
pStatus_
Text
pServiceUserName_
UTCTime
pCreateDate_
Text
pServiceSpecificCredentialId_
Text
pServiceName_ =
ServiceSpecificCredentialMetadata' :: Text
-> StatusType
-> Text
-> ISO8601
-> Text
-> Text
-> ServiceSpecificCredentialMetadata
ServiceSpecificCredentialMetadata'
{ $sel:userName:ServiceSpecificCredentialMetadata' :: Text
userName =
Text
pUserName_,
$sel:status:ServiceSpecificCredentialMetadata' :: StatusType
status = StatusType
pStatus_,
$sel:serviceUserName:ServiceSpecificCredentialMetadata' :: Text
serviceUserName = Text
pServiceUserName_,
$sel:createDate:ServiceSpecificCredentialMetadata' :: 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_,
$sel:serviceSpecificCredentialId:ServiceSpecificCredentialMetadata' :: Text
serviceSpecificCredentialId =
Text
pServiceSpecificCredentialId_,
$sel:serviceName:ServiceSpecificCredentialMetadata' :: Text
serviceName = Text
pServiceName_
}
serviceSpecificCredentialMetadata_userName :: Lens.Lens' ServiceSpecificCredentialMetadata Prelude.Text
serviceSpecificCredentialMetadata_userName :: (Text -> f Text)
-> ServiceSpecificCredentialMetadata
-> f ServiceSpecificCredentialMetadata
serviceSpecificCredentialMetadata_userName = (ServiceSpecificCredentialMetadata -> Text)
-> (ServiceSpecificCredentialMetadata
-> Text -> ServiceSpecificCredentialMetadata)
-> Lens
ServiceSpecificCredentialMetadata
ServiceSpecificCredentialMetadata
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredentialMetadata' {Text
userName :: Text
$sel:userName:ServiceSpecificCredentialMetadata' :: ServiceSpecificCredentialMetadata -> Text
userName} -> Text
userName) (\s :: ServiceSpecificCredentialMetadata
s@ServiceSpecificCredentialMetadata' {} Text
a -> ServiceSpecificCredentialMetadata
s {$sel:userName:ServiceSpecificCredentialMetadata' :: Text
userName = Text
a} :: ServiceSpecificCredentialMetadata)
serviceSpecificCredentialMetadata_status :: Lens.Lens' ServiceSpecificCredentialMetadata StatusType
serviceSpecificCredentialMetadata_status :: (StatusType -> f StatusType)
-> ServiceSpecificCredentialMetadata
-> f ServiceSpecificCredentialMetadata
serviceSpecificCredentialMetadata_status = (ServiceSpecificCredentialMetadata -> StatusType)
-> (ServiceSpecificCredentialMetadata
-> StatusType -> ServiceSpecificCredentialMetadata)
-> Lens
ServiceSpecificCredentialMetadata
ServiceSpecificCredentialMetadata
StatusType
StatusType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredentialMetadata' {StatusType
status :: StatusType
$sel:status:ServiceSpecificCredentialMetadata' :: ServiceSpecificCredentialMetadata -> StatusType
status} -> StatusType
status) (\s :: ServiceSpecificCredentialMetadata
s@ServiceSpecificCredentialMetadata' {} StatusType
a -> ServiceSpecificCredentialMetadata
s {$sel:status:ServiceSpecificCredentialMetadata' :: StatusType
status = StatusType
a} :: ServiceSpecificCredentialMetadata)
serviceSpecificCredentialMetadata_serviceUserName :: Lens.Lens' ServiceSpecificCredentialMetadata Prelude.Text
serviceSpecificCredentialMetadata_serviceUserName :: (Text -> f Text)
-> ServiceSpecificCredentialMetadata
-> f ServiceSpecificCredentialMetadata
serviceSpecificCredentialMetadata_serviceUserName = (ServiceSpecificCredentialMetadata -> Text)
-> (ServiceSpecificCredentialMetadata
-> Text -> ServiceSpecificCredentialMetadata)
-> Lens
ServiceSpecificCredentialMetadata
ServiceSpecificCredentialMetadata
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredentialMetadata' {Text
serviceUserName :: Text
$sel:serviceUserName:ServiceSpecificCredentialMetadata' :: ServiceSpecificCredentialMetadata -> Text
serviceUserName} -> Text
serviceUserName) (\s :: ServiceSpecificCredentialMetadata
s@ServiceSpecificCredentialMetadata' {} Text
a -> ServiceSpecificCredentialMetadata
s {$sel:serviceUserName:ServiceSpecificCredentialMetadata' :: Text
serviceUserName = Text
a} :: ServiceSpecificCredentialMetadata)
serviceSpecificCredentialMetadata_createDate :: Lens.Lens' ServiceSpecificCredentialMetadata Prelude.UTCTime
serviceSpecificCredentialMetadata_createDate :: (UTCTime -> f UTCTime)
-> ServiceSpecificCredentialMetadata
-> f ServiceSpecificCredentialMetadata
serviceSpecificCredentialMetadata_createDate = (ServiceSpecificCredentialMetadata -> ISO8601)
-> (ServiceSpecificCredentialMetadata
-> ISO8601 -> ServiceSpecificCredentialMetadata)
-> Lens
ServiceSpecificCredentialMetadata
ServiceSpecificCredentialMetadata
ISO8601
ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredentialMetadata' {ISO8601
createDate :: ISO8601
$sel:createDate:ServiceSpecificCredentialMetadata' :: ServiceSpecificCredentialMetadata -> ISO8601
createDate} -> ISO8601
createDate) (\s :: ServiceSpecificCredentialMetadata
s@ServiceSpecificCredentialMetadata' {} ISO8601
a -> ServiceSpecificCredentialMetadata
s {$sel:createDate:ServiceSpecificCredentialMetadata' :: ISO8601
createDate = ISO8601
a} :: ServiceSpecificCredentialMetadata) ((ISO8601 -> f ISO8601)
-> ServiceSpecificCredentialMetadata
-> f ServiceSpecificCredentialMetadata)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> ServiceSpecificCredentialMetadata
-> f ServiceSpecificCredentialMetadata
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
serviceSpecificCredentialMetadata_serviceSpecificCredentialId :: Lens.Lens' ServiceSpecificCredentialMetadata Prelude.Text
serviceSpecificCredentialMetadata_serviceSpecificCredentialId :: (Text -> f Text)
-> ServiceSpecificCredentialMetadata
-> f ServiceSpecificCredentialMetadata
serviceSpecificCredentialMetadata_serviceSpecificCredentialId = (ServiceSpecificCredentialMetadata -> Text)
-> (ServiceSpecificCredentialMetadata
-> Text -> ServiceSpecificCredentialMetadata)
-> Lens
ServiceSpecificCredentialMetadata
ServiceSpecificCredentialMetadata
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredentialMetadata' {Text
serviceSpecificCredentialId :: Text
$sel:serviceSpecificCredentialId:ServiceSpecificCredentialMetadata' :: ServiceSpecificCredentialMetadata -> Text
serviceSpecificCredentialId} -> Text
serviceSpecificCredentialId) (\s :: ServiceSpecificCredentialMetadata
s@ServiceSpecificCredentialMetadata' {} Text
a -> ServiceSpecificCredentialMetadata
s {$sel:serviceSpecificCredentialId:ServiceSpecificCredentialMetadata' :: Text
serviceSpecificCredentialId = Text
a} :: ServiceSpecificCredentialMetadata)
serviceSpecificCredentialMetadata_serviceName :: Lens.Lens' ServiceSpecificCredentialMetadata Prelude.Text
serviceSpecificCredentialMetadata_serviceName :: (Text -> f Text)
-> ServiceSpecificCredentialMetadata
-> f ServiceSpecificCredentialMetadata
serviceSpecificCredentialMetadata_serviceName = (ServiceSpecificCredentialMetadata -> Text)
-> (ServiceSpecificCredentialMetadata
-> Text -> ServiceSpecificCredentialMetadata)
-> Lens
ServiceSpecificCredentialMetadata
ServiceSpecificCredentialMetadata
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredentialMetadata' {Text
serviceName :: Text
$sel:serviceName:ServiceSpecificCredentialMetadata' :: ServiceSpecificCredentialMetadata -> Text
serviceName} -> Text
serviceName) (\s :: ServiceSpecificCredentialMetadata
s@ServiceSpecificCredentialMetadata' {} Text
a -> ServiceSpecificCredentialMetadata
s {$sel:serviceName:ServiceSpecificCredentialMetadata' :: Text
serviceName = Text
a} :: ServiceSpecificCredentialMetadata)
instance
Core.FromXML
ServiceSpecificCredentialMetadata
where
parseXML :: [Node] -> Either String ServiceSpecificCredentialMetadata
parseXML [Node]
x =
Text
-> StatusType
-> Text
-> ISO8601
-> Text
-> Text
-> ServiceSpecificCredentialMetadata
ServiceSpecificCredentialMetadata'
(Text
-> StatusType
-> Text
-> ISO8601
-> Text
-> Text
-> ServiceSpecificCredentialMetadata)
-> Either String Text
-> Either
String
(StatusType
-> Text
-> ISO8601
-> Text
-> Text
-> ServiceSpecificCredentialMetadata)
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
"UserName")
Either
String
(StatusType
-> Text
-> ISO8601
-> Text
-> Text
-> ServiceSpecificCredentialMetadata)
-> Either String StatusType
-> Either
String
(Text
-> ISO8601 -> Text -> Text -> ServiceSpecificCredentialMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String StatusType
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Status")
Either
String
(Text
-> ISO8601 -> Text -> Text -> ServiceSpecificCredentialMetadata)
-> Either String Text
-> Either
String
(ISO8601 -> Text -> Text -> ServiceSpecificCredentialMetadata)
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
"ServiceUserName")
Either
String
(ISO8601 -> Text -> Text -> ServiceSpecificCredentialMetadata)
-> Either String ISO8601
-> Either
String (Text -> Text -> ServiceSpecificCredentialMetadata)
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")
Either String (Text -> Text -> ServiceSpecificCredentialMetadata)
-> Either String Text
-> Either String (Text -> ServiceSpecificCredentialMetadata)
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
"ServiceSpecificCredentialId")
Either String (Text -> ServiceSpecificCredentialMetadata)
-> Either String Text
-> Either String ServiceSpecificCredentialMetadata
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
"ServiceName")
instance
Prelude.Hashable
ServiceSpecificCredentialMetadata
instance
Prelude.NFData
ServiceSpecificCredentialMetadata