{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.IAM.UpdateLoginProfile
(
UpdateLoginProfile (..),
newUpdateLoginProfile,
updateLoginProfile_password,
updateLoginProfile_passwordResetRequired,
updateLoginProfile_userName,
UpdateLoginProfileResponse (..),
newUpdateLoginProfileResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IAM.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateLoginProfile = UpdateLoginProfile'
{
UpdateLoginProfile -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Data.Sensitive Prelude.Text),
UpdateLoginProfile -> Maybe Bool
passwordResetRequired :: Prelude.Maybe Prelude.Bool,
UpdateLoginProfile -> Text
userName :: Prelude.Text
}
deriving (UpdateLoginProfile -> UpdateLoginProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLoginProfile -> UpdateLoginProfile -> Bool
$c/= :: UpdateLoginProfile -> UpdateLoginProfile -> Bool
== :: UpdateLoginProfile -> UpdateLoginProfile -> Bool
$c== :: UpdateLoginProfile -> UpdateLoginProfile -> Bool
Prelude.Eq, Int -> UpdateLoginProfile -> ShowS
[UpdateLoginProfile] -> ShowS
UpdateLoginProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLoginProfile] -> ShowS
$cshowList :: [UpdateLoginProfile] -> ShowS
show :: UpdateLoginProfile -> String
$cshow :: UpdateLoginProfile -> String
showsPrec :: Int -> UpdateLoginProfile -> ShowS
$cshowsPrec :: Int -> UpdateLoginProfile -> ShowS
Prelude.Show, forall x. Rep UpdateLoginProfile x -> UpdateLoginProfile
forall x. UpdateLoginProfile -> Rep UpdateLoginProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateLoginProfile x -> UpdateLoginProfile
$cfrom :: forall x. UpdateLoginProfile -> Rep UpdateLoginProfile x
Prelude.Generic)
newUpdateLoginProfile ::
Prelude.Text ->
UpdateLoginProfile
newUpdateLoginProfile :: Text -> UpdateLoginProfile
newUpdateLoginProfile Text
pUserName_ =
UpdateLoginProfile'
{ $sel:password:UpdateLoginProfile' :: Maybe (Sensitive Text)
password = forall a. Maybe a
Prelude.Nothing,
$sel:passwordResetRequired:UpdateLoginProfile' :: Maybe Bool
passwordResetRequired = forall a. Maybe a
Prelude.Nothing,
$sel:userName:UpdateLoginProfile' :: Text
userName = Text
pUserName_
}
updateLoginProfile_password :: Lens.Lens' UpdateLoginProfile (Prelude.Maybe Prelude.Text)
updateLoginProfile_password :: Lens' UpdateLoginProfile (Maybe Text)
updateLoginProfile_password = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoginProfile' {Maybe (Sensitive Text)
password :: Maybe (Sensitive Text)
$sel:password:UpdateLoginProfile' :: UpdateLoginProfile -> Maybe (Sensitive Text)
password} -> Maybe (Sensitive Text)
password) (\s :: UpdateLoginProfile
s@UpdateLoginProfile' {} Maybe (Sensitive Text)
a -> UpdateLoginProfile
s {$sel:password:UpdateLoginProfile' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
a} :: UpdateLoginProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
updateLoginProfile_passwordResetRequired :: Lens.Lens' UpdateLoginProfile (Prelude.Maybe Prelude.Bool)
updateLoginProfile_passwordResetRequired :: Lens' UpdateLoginProfile (Maybe Bool)
updateLoginProfile_passwordResetRequired = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoginProfile' {Maybe Bool
passwordResetRequired :: Maybe Bool
$sel:passwordResetRequired:UpdateLoginProfile' :: UpdateLoginProfile -> Maybe Bool
passwordResetRequired} -> Maybe Bool
passwordResetRequired) (\s :: UpdateLoginProfile
s@UpdateLoginProfile' {} Maybe Bool
a -> UpdateLoginProfile
s {$sel:passwordResetRequired:UpdateLoginProfile' :: Maybe Bool
passwordResetRequired = Maybe Bool
a} :: UpdateLoginProfile)
updateLoginProfile_userName :: Lens.Lens' UpdateLoginProfile Prelude.Text
updateLoginProfile_userName :: Lens' UpdateLoginProfile Text
updateLoginProfile_userName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLoginProfile' {Text
userName :: Text
$sel:userName:UpdateLoginProfile' :: UpdateLoginProfile -> Text
userName} -> Text
userName) (\s :: UpdateLoginProfile
s@UpdateLoginProfile' {} Text
a -> UpdateLoginProfile
s {$sel:userName:UpdateLoginProfile' :: Text
userName = Text
a} :: UpdateLoginProfile)
instance Core.AWSRequest UpdateLoginProfile where
type
AWSResponse UpdateLoginProfile =
UpdateLoginProfileResponse
request :: (Service -> Service)
-> UpdateLoginProfile -> Request UpdateLoginProfile
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateLoginProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateLoginProfile)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull UpdateLoginProfileResponse
UpdateLoginProfileResponse'
instance Prelude.Hashable UpdateLoginProfile where
hashWithSalt :: Int -> UpdateLoginProfile -> Int
hashWithSalt Int
_salt UpdateLoginProfile' {Maybe Bool
Maybe (Sensitive Text)
Text
userName :: Text
passwordResetRequired :: Maybe Bool
password :: Maybe (Sensitive Text)
$sel:userName:UpdateLoginProfile' :: UpdateLoginProfile -> Text
$sel:passwordResetRequired:UpdateLoginProfile' :: UpdateLoginProfile -> Maybe Bool
$sel:password:UpdateLoginProfile' :: UpdateLoginProfile -> Maybe (Sensitive Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
password
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
passwordResetRequired
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userName
instance Prelude.NFData UpdateLoginProfile where
rnf :: UpdateLoginProfile -> ()
rnf UpdateLoginProfile' {Maybe Bool
Maybe (Sensitive Text)
Text
userName :: Text
passwordResetRequired :: Maybe Bool
password :: Maybe (Sensitive Text)
$sel:userName:UpdateLoginProfile' :: UpdateLoginProfile -> Text
$sel:passwordResetRequired:UpdateLoginProfile' :: UpdateLoginProfile -> Maybe Bool
$sel:password:UpdateLoginProfile' :: UpdateLoginProfile -> Maybe (Sensitive Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
password
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
passwordResetRequired
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
userName
instance Data.ToHeaders UpdateLoginProfile where
toHeaders :: UpdateLoginProfile -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath UpdateLoginProfile where
toPath :: UpdateLoginProfile -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UpdateLoginProfile where
toQuery :: UpdateLoginProfile -> QueryString
toQuery UpdateLoginProfile' {Maybe Bool
Maybe (Sensitive Text)
Text
userName :: Text
passwordResetRequired :: Maybe Bool
password :: Maybe (Sensitive Text)
$sel:userName:UpdateLoginProfile' :: UpdateLoginProfile -> Text
$sel:passwordResetRequired:UpdateLoginProfile' :: UpdateLoginProfile -> Maybe Bool
$sel:password:UpdateLoginProfile' :: UpdateLoginProfile -> Maybe (Sensitive Text)
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"UpdateLoginProfile" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"Password" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe (Sensitive Text)
password,
ByteString
"PasswordResetRequired"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
passwordResetRequired,
ByteString
"UserName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
userName
]
data UpdateLoginProfileResponse = UpdateLoginProfileResponse'
{
}
deriving (UpdateLoginProfileResponse -> UpdateLoginProfileResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLoginProfileResponse -> UpdateLoginProfileResponse -> Bool
$c/= :: UpdateLoginProfileResponse -> UpdateLoginProfileResponse -> Bool
== :: UpdateLoginProfileResponse -> UpdateLoginProfileResponse -> Bool
$c== :: UpdateLoginProfileResponse -> UpdateLoginProfileResponse -> Bool
Prelude.Eq, ReadPrec [UpdateLoginProfileResponse]
ReadPrec UpdateLoginProfileResponse
Int -> ReadS UpdateLoginProfileResponse
ReadS [UpdateLoginProfileResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLoginProfileResponse]
$creadListPrec :: ReadPrec [UpdateLoginProfileResponse]
readPrec :: ReadPrec UpdateLoginProfileResponse
$creadPrec :: ReadPrec UpdateLoginProfileResponse
readList :: ReadS [UpdateLoginProfileResponse]
$creadList :: ReadS [UpdateLoginProfileResponse]
readsPrec :: Int -> ReadS UpdateLoginProfileResponse
$creadsPrec :: Int -> ReadS UpdateLoginProfileResponse
Prelude.Read, Int -> UpdateLoginProfileResponse -> ShowS
[UpdateLoginProfileResponse] -> ShowS
UpdateLoginProfileResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLoginProfileResponse] -> ShowS
$cshowList :: [UpdateLoginProfileResponse] -> ShowS
show :: UpdateLoginProfileResponse -> String
$cshow :: UpdateLoginProfileResponse -> String
showsPrec :: Int -> UpdateLoginProfileResponse -> ShowS
$cshowsPrec :: Int -> UpdateLoginProfileResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateLoginProfileResponse x -> UpdateLoginProfileResponse
forall x.
UpdateLoginProfileResponse -> Rep UpdateLoginProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLoginProfileResponse x -> UpdateLoginProfileResponse
$cfrom :: forall x.
UpdateLoginProfileResponse -> Rep UpdateLoginProfileResponse x
Prelude.Generic)
newUpdateLoginProfileResponse ::
UpdateLoginProfileResponse
newUpdateLoginProfileResponse :: UpdateLoginProfileResponse
newUpdateLoginProfileResponse =
UpdateLoginProfileResponse
UpdateLoginProfileResponse'
instance Prelude.NFData UpdateLoginProfileResponse where
rnf :: UpdateLoginProfileResponse -> ()
rnf UpdateLoginProfileResponse
_ = ()