{-# 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.ServiceSpecificCredential 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 ServiceSpecificCredential = ServiceSpecificCredential'
{
ServiceSpecificCredential -> ISO8601
createDate :: Core.ISO8601,
ServiceSpecificCredential -> Text
serviceName :: Prelude.Text,
ServiceSpecificCredential -> Text
serviceUserName :: Prelude.Text,
ServiceSpecificCredential -> Sensitive Text
servicePassword :: Core.Sensitive Prelude.Text,
ServiceSpecificCredential -> Text
serviceSpecificCredentialId :: Prelude.Text,
ServiceSpecificCredential -> Text
userName :: Prelude.Text,
ServiceSpecificCredential -> StatusType
status :: StatusType
}
deriving (ServiceSpecificCredential -> ServiceSpecificCredential -> Bool
(ServiceSpecificCredential -> ServiceSpecificCredential -> Bool)
-> (ServiceSpecificCredential -> ServiceSpecificCredential -> Bool)
-> Eq ServiceSpecificCredential
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceSpecificCredential -> ServiceSpecificCredential -> Bool
$c/= :: ServiceSpecificCredential -> ServiceSpecificCredential -> Bool
== :: ServiceSpecificCredential -> ServiceSpecificCredential -> Bool
$c== :: ServiceSpecificCredential -> ServiceSpecificCredential -> Bool
Prelude.Eq, Int -> ServiceSpecificCredential -> ShowS
[ServiceSpecificCredential] -> ShowS
ServiceSpecificCredential -> String
(Int -> ServiceSpecificCredential -> ShowS)
-> (ServiceSpecificCredential -> String)
-> ([ServiceSpecificCredential] -> ShowS)
-> Show ServiceSpecificCredential
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceSpecificCredential] -> ShowS
$cshowList :: [ServiceSpecificCredential] -> ShowS
show :: ServiceSpecificCredential -> String
$cshow :: ServiceSpecificCredential -> String
showsPrec :: Int -> ServiceSpecificCredential -> ShowS
$cshowsPrec :: Int -> ServiceSpecificCredential -> ShowS
Prelude.Show, (forall x.
ServiceSpecificCredential -> Rep ServiceSpecificCredential x)
-> (forall x.
Rep ServiceSpecificCredential x -> ServiceSpecificCredential)
-> Generic ServiceSpecificCredential
forall x.
Rep ServiceSpecificCredential x -> ServiceSpecificCredential
forall x.
ServiceSpecificCredential -> Rep ServiceSpecificCredential x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ServiceSpecificCredential x -> ServiceSpecificCredential
$cfrom :: forall x.
ServiceSpecificCredential -> Rep ServiceSpecificCredential x
Prelude.Generic)
newServiceSpecificCredential ::
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
StatusType ->
ServiceSpecificCredential
newServiceSpecificCredential :: UTCTime
-> Text
-> Text
-> Text
-> Text
-> Text
-> StatusType
-> ServiceSpecificCredential
newServiceSpecificCredential
UTCTime
pCreateDate_
Text
pServiceName_
Text
pServiceUserName_
Text
pServicePassword_
Text
pServiceSpecificCredentialId_
Text
pUserName_
StatusType
pStatus_ =
ServiceSpecificCredential' :: ISO8601
-> Text
-> Text
-> Sensitive Text
-> Text
-> Text
-> StatusType
-> ServiceSpecificCredential
ServiceSpecificCredential'
{ $sel:createDate:ServiceSpecificCredential' :: 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:serviceName:ServiceSpecificCredential' :: Text
serviceName = Text
pServiceName_,
$sel:serviceUserName:ServiceSpecificCredential' :: Text
serviceUserName = Text
pServiceUserName_,
$sel:servicePassword:ServiceSpecificCredential' :: Sensitive Text
servicePassword =
Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pServicePassword_,
$sel:serviceSpecificCredentialId:ServiceSpecificCredential' :: Text
serviceSpecificCredentialId =
Text
pServiceSpecificCredentialId_,
$sel:userName:ServiceSpecificCredential' :: Text
userName = Text
pUserName_,
$sel:status:ServiceSpecificCredential' :: StatusType
status = StatusType
pStatus_
}
serviceSpecificCredential_createDate :: Lens.Lens' ServiceSpecificCredential Prelude.UTCTime
serviceSpecificCredential_createDate :: (UTCTime -> f UTCTime)
-> ServiceSpecificCredential -> f ServiceSpecificCredential
serviceSpecificCredential_createDate = (ServiceSpecificCredential -> ISO8601)
-> (ServiceSpecificCredential
-> ISO8601 -> ServiceSpecificCredential)
-> Lens
ServiceSpecificCredential ServiceSpecificCredential ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredential' {ISO8601
createDate :: ISO8601
$sel:createDate:ServiceSpecificCredential' :: ServiceSpecificCredential -> ISO8601
createDate} -> ISO8601
createDate) (\s :: ServiceSpecificCredential
s@ServiceSpecificCredential' {} ISO8601
a -> ServiceSpecificCredential
s {$sel:createDate:ServiceSpecificCredential' :: ISO8601
createDate = ISO8601
a} :: ServiceSpecificCredential) ((ISO8601 -> f ISO8601)
-> ServiceSpecificCredential -> f ServiceSpecificCredential)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> ServiceSpecificCredential
-> f ServiceSpecificCredential
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
serviceSpecificCredential_serviceName :: Lens.Lens' ServiceSpecificCredential Prelude.Text
serviceSpecificCredential_serviceName :: (Text -> f Text)
-> ServiceSpecificCredential -> f ServiceSpecificCredential
serviceSpecificCredential_serviceName = (ServiceSpecificCredential -> Text)
-> (ServiceSpecificCredential -> Text -> ServiceSpecificCredential)
-> Lens
ServiceSpecificCredential ServiceSpecificCredential Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredential' {Text
serviceName :: Text
$sel:serviceName:ServiceSpecificCredential' :: ServiceSpecificCredential -> Text
serviceName} -> Text
serviceName) (\s :: ServiceSpecificCredential
s@ServiceSpecificCredential' {} Text
a -> ServiceSpecificCredential
s {$sel:serviceName:ServiceSpecificCredential' :: Text
serviceName = Text
a} :: ServiceSpecificCredential)
serviceSpecificCredential_serviceUserName :: Lens.Lens' ServiceSpecificCredential Prelude.Text
serviceSpecificCredential_serviceUserName :: (Text -> f Text)
-> ServiceSpecificCredential -> f ServiceSpecificCredential
serviceSpecificCredential_serviceUserName = (ServiceSpecificCredential -> Text)
-> (ServiceSpecificCredential -> Text -> ServiceSpecificCredential)
-> Lens
ServiceSpecificCredential ServiceSpecificCredential Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredential' {Text
serviceUserName :: Text
$sel:serviceUserName:ServiceSpecificCredential' :: ServiceSpecificCredential -> Text
serviceUserName} -> Text
serviceUserName) (\s :: ServiceSpecificCredential
s@ServiceSpecificCredential' {} Text
a -> ServiceSpecificCredential
s {$sel:serviceUserName:ServiceSpecificCredential' :: Text
serviceUserName = Text
a} :: ServiceSpecificCredential)
serviceSpecificCredential_servicePassword :: Lens.Lens' ServiceSpecificCredential Prelude.Text
serviceSpecificCredential_servicePassword :: (Text -> f Text)
-> ServiceSpecificCredential -> f ServiceSpecificCredential
serviceSpecificCredential_servicePassword = (ServiceSpecificCredential -> Sensitive Text)
-> (ServiceSpecificCredential
-> Sensitive Text -> ServiceSpecificCredential)
-> Lens
ServiceSpecificCredential
ServiceSpecificCredential
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredential' {Sensitive Text
servicePassword :: Sensitive Text
$sel:servicePassword:ServiceSpecificCredential' :: ServiceSpecificCredential -> Sensitive Text
servicePassword} -> Sensitive Text
servicePassword) (\s :: ServiceSpecificCredential
s@ServiceSpecificCredential' {} Sensitive Text
a -> ServiceSpecificCredential
s {$sel:servicePassword:ServiceSpecificCredential' :: Sensitive Text
servicePassword = Sensitive Text
a} :: ServiceSpecificCredential) ((Sensitive Text -> f (Sensitive Text))
-> ServiceSpecificCredential -> f ServiceSpecificCredential)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> ServiceSpecificCredential
-> f ServiceSpecificCredential
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
serviceSpecificCredential_serviceSpecificCredentialId :: Lens.Lens' ServiceSpecificCredential Prelude.Text
serviceSpecificCredential_serviceSpecificCredentialId :: (Text -> f Text)
-> ServiceSpecificCredential -> f ServiceSpecificCredential
serviceSpecificCredential_serviceSpecificCredentialId = (ServiceSpecificCredential -> Text)
-> (ServiceSpecificCredential -> Text -> ServiceSpecificCredential)
-> Lens
ServiceSpecificCredential ServiceSpecificCredential Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredential' {Text
serviceSpecificCredentialId :: Text
$sel:serviceSpecificCredentialId:ServiceSpecificCredential' :: ServiceSpecificCredential -> Text
serviceSpecificCredentialId} -> Text
serviceSpecificCredentialId) (\s :: ServiceSpecificCredential
s@ServiceSpecificCredential' {} Text
a -> ServiceSpecificCredential
s {$sel:serviceSpecificCredentialId:ServiceSpecificCredential' :: Text
serviceSpecificCredentialId = Text
a} :: ServiceSpecificCredential)
serviceSpecificCredential_userName :: Lens.Lens' ServiceSpecificCredential Prelude.Text
serviceSpecificCredential_userName :: (Text -> f Text)
-> ServiceSpecificCredential -> f ServiceSpecificCredential
serviceSpecificCredential_userName = (ServiceSpecificCredential -> Text)
-> (ServiceSpecificCredential -> Text -> ServiceSpecificCredential)
-> Lens
ServiceSpecificCredential ServiceSpecificCredential Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredential' {Text
userName :: Text
$sel:userName:ServiceSpecificCredential' :: ServiceSpecificCredential -> Text
userName} -> Text
userName) (\s :: ServiceSpecificCredential
s@ServiceSpecificCredential' {} Text
a -> ServiceSpecificCredential
s {$sel:userName:ServiceSpecificCredential' :: Text
userName = Text
a} :: ServiceSpecificCredential)
serviceSpecificCredential_status :: Lens.Lens' ServiceSpecificCredential StatusType
serviceSpecificCredential_status :: (StatusType -> f StatusType)
-> ServiceSpecificCredential -> f ServiceSpecificCredential
serviceSpecificCredential_status = (ServiceSpecificCredential -> StatusType)
-> (ServiceSpecificCredential
-> StatusType -> ServiceSpecificCredential)
-> Lens
ServiceSpecificCredential
ServiceSpecificCredential
StatusType
StatusType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSpecificCredential' {StatusType
status :: StatusType
$sel:status:ServiceSpecificCredential' :: ServiceSpecificCredential -> StatusType
status} -> StatusType
status) (\s :: ServiceSpecificCredential
s@ServiceSpecificCredential' {} StatusType
a -> ServiceSpecificCredential
s {$sel:status:ServiceSpecificCredential' :: StatusType
status = StatusType
a} :: ServiceSpecificCredential)
instance Core.FromXML ServiceSpecificCredential where
parseXML :: [Node] -> Either String ServiceSpecificCredential
parseXML [Node]
x =
ISO8601
-> Text
-> Text
-> Sensitive Text
-> Text
-> Text
-> StatusType
-> ServiceSpecificCredential
ServiceSpecificCredential'
(ISO8601
-> Text
-> Text
-> Sensitive Text
-> Text
-> Text
-> StatusType
-> ServiceSpecificCredential)
-> Either String ISO8601
-> Either
String
(Text
-> Text
-> Sensitive Text
-> Text
-> Text
-> StatusType
-> ServiceSpecificCredential)
forall (f :: * -> *) a b. Functor 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
-> Sensitive Text
-> Text
-> Text
-> StatusType
-> ServiceSpecificCredential)
-> Either String Text
-> Either
String
(Text
-> Sensitive Text
-> Text
-> Text
-> StatusType
-> ServiceSpecificCredential)
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")
Either
String
(Text
-> Sensitive Text
-> Text
-> Text
-> StatusType
-> ServiceSpecificCredential)
-> Either String Text
-> Either
String
(Sensitive Text
-> Text -> Text -> StatusType -> ServiceSpecificCredential)
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
(Sensitive Text
-> Text -> Text -> StatusType -> ServiceSpecificCredential)
-> Either String (Sensitive Text)
-> Either
String (Text -> Text -> StatusType -> ServiceSpecificCredential)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Sensitive Text)
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ServicePassword")
Either
String (Text -> Text -> StatusType -> ServiceSpecificCredential)
-> Either String Text
-> Either String (Text -> StatusType -> ServiceSpecificCredential)
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 -> StatusType -> ServiceSpecificCredential)
-> Either String Text
-> Either String (StatusType -> ServiceSpecificCredential)
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 (StatusType -> ServiceSpecificCredential)
-> Either String StatusType
-> Either String ServiceSpecificCredential
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")
instance Prelude.Hashable ServiceSpecificCredential
instance Prelude.NFData ServiceSpecificCredential