{-# 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 Amazonka.IAM.Types
import qualified Amazonka.Lens as Lens
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 (Core.Sensitive Prelude.Text),
UpdateLoginProfile -> Maybe Bool
passwordResetRequired :: Prelude.Maybe Prelude.Bool,
UpdateLoginProfile -> Text
userName :: Prelude.Text
}
deriving (UpdateLoginProfile -> UpdateLoginProfile -> Bool
(UpdateLoginProfile -> UpdateLoginProfile -> Bool)
-> (UpdateLoginProfile -> UpdateLoginProfile -> Bool)
-> Eq UpdateLoginProfile
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
(Int -> UpdateLoginProfile -> ShowS)
-> (UpdateLoginProfile -> String)
-> ([UpdateLoginProfile] -> ShowS)
-> Show UpdateLoginProfile
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. UpdateLoginProfile -> Rep UpdateLoginProfile x)
-> (forall x. Rep UpdateLoginProfile x -> UpdateLoginProfile)
-> Generic UpdateLoginProfile
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' :: Maybe (Sensitive Text) -> Maybe Bool -> Text -> UpdateLoginProfile
UpdateLoginProfile'
{ $sel:password:UpdateLoginProfile' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:passwordResetRequired:UpdateLoginProfile' :: Maybe Bool
passwordResetRequired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:userName:UpdateLoginProfile' :: Text
userName = Text
pUserName_
}
updateLoginProfile_password :: Lens.Lens' UpdateLoginProfile (Prelude.Maybe Prelude.Text)
updateLoginProfile_password :: (Maybe Text -> f (Maybe Text))
-> UpdateLoginProfile -> f UpdateLoginProfile
updateLoginProfile_password = (UpdateLoginProfile -> Maybe (Sensitive Text))
-> (UpdateLoginProfile
-> Maybe (Sensitive Text) -> UpdateLoginProfile)
-> Lens
UpdateLoginProfile
UpdateLoginProfile
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateLoginProfile -> f UpdateLoginProfile)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateLoginProfile
-> f UpdateLoginProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
updateLoginProfile_passwordResetRequired :: Lens.Lens' UpdateLoginProfile (Prelude.Maybe Prelude.Bool)
updateLoginProfile_passwordResetRequired :: (Maybe Bool -> f (Maybe Bool))
-> UpdateLoginProfile -> f UpdateLoginProfile
updateLoginProfile_passwordResetRequired = (UpdateLoginProfile -> Maybe Bool)
-> (UpdateLoginProfile -> Maybe Bool -> UpdateLoginProfile)
-> Lens
UpdateLoginProfile UpdateLoginProfile (Maybe Bool) (Maybe Bool)
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 :: (Text -> f Text) -> UpdateLoginProfile -> f UpdateLoginProfile
updateLoginProfile_userName = (UpdateLoginProfile -> Text)
-> (UpdateLoginProfile -> Text -> UpdateLoginProfile)
-> Lens UpdateLoginProfile UpdateLoginProfile Text Text
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 :: UpdateLoginProfile -> Request UpdateLoginProfile
request = Service -> UpdateLoginProfile -> Request UpdateLoginProfile
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateLoginProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateLoginProfile)))
response =
AWSResponse UpdateLoginProfile
-> Logger
-> Service
-> Proxy UpdateLoginProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateLoginProfile)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse UpdateLoginProfile
UpdateLoginProfileResponse
UpdateLoginProfileResponse'
instance Prelude.Hashable UpdateLoginProfile
instance Prelude.NFData UpdateLoginProfile
instance Core.ToHeaders UpdateLoginProfile where
toHeaders :: UpdateLoginProfile -> [Header]
toHeaders = [Header] -> UpdateLoginProfile -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath UpdateLoginProfile where
toPath :: UpdateLoginProfile -> ByteString
toPath = ByteString -> UpdateLoginProfile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.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)
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"UpdateLoginProfile" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"Password" ByteString -> Maybe (Sensitive Text) -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe (Sensitive Text)
password,
ByteString
"PasswordResetRequired"
ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
passwordResetRequired,
ByteString
"UserName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
userName
]
data UpdateLoginProfileResponse = UpdateLoginProfileResponse'
{
}
deriving (UpdateLoginProfileResponse -> UpdateLoginProfileResponse -> Bool
(UpdateLoginProfileResponse -> UpdateLoginProfileResponse -> Bool)
-> (UpdateLoginProfileResponse
-> UpdateLoginProfileResponse -> Bool)
-> Eq UpdateLoginProfileResponse
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]
(Int -> ReadS UpdateLoginProfileResponse)
-> ReadS [UpdateLoginProfileResponse]
-> ReadPrec UpdateLoginProfileResponse
-> ReadPrec [UpdateLoginProfileResponse]
-> Read 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
(Int -> UpdateLoginProfileResponse -> ShowS)
-> (UpdateLoginProfileResponse -> String)
-> ([UpdateLoginProfileResponse] -> ShowS)
-> Show UpdateLoginProfileResponse
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.
UpdateLoginProfileResponse -> Rep UpdateLoginProfileResponse x)
-> (forall x.
Rep UpdateLoginProfileResponse x -> UpdateLoginProfileResponse)
-> Generic UpdateLoginProfileResponse
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