{-# 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.ResyncMFADevice
(
ResyncMFADevice (..),
newResyncMFADevice,
resyncMFADevice_userName,
resyncMFADevice_serialNumber,
resyncMFADevice_authenticationCode1,
resyncMFADevice_authenticationCode2,
ResyncMFADeviceResponse (..),
newResyncMFADeviceResponse,
)
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 ResyncMFADevice = ResyncMFADevice'
{
ResyncMFADevice -> Text
userName :: Prelude.Text,
ResyncMFADevice -> Text
serialNumber :: Prelude.Text,
ResyncMFADevice -> Text
authenticationCode1 :: Prelude.Text,
ResyncMFADevice -> Text
authenticationCode2 :: Prelude.Text
}
deriving (ResyncMFADevice -> ResyncMFADevice -> Bool
(ResyncMFADevice -> ResyncMFADevice -> Bool)
-> (ResyncMFADevice -> ResyncMFADevice -> Bool)
-> Eq ResyncMFADevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResyncMFADevice -> ResyncMFADevice -> Bool
$c/= :: ResyncMFADevice -> ResyncMFADevice -> Bool
== :: ResyncMFADevice -> ResyncMFADevice -> Bool
$c== :: ResyncMFADevice -> ResyncMFADevice -> Bool
Prelude.Eq, ReadPrec [ResyncMFADevice]
ReadPrec ResyncMFADevice
Int -> ReadS ResyncMFADevice
ReadS [ResyncMFADevice]
(Int -> ReadS ResyncMFADevice)
-> ReadS [ResyncMFADevice]
-> ReadPrec ResyncMFADevice
-> ReadPrec [ResyncMFADevice]
-> Read ResyncMFADevice
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResyncMFADevice]
$creadListPrec :: ReadPrec [ResyncMFADevice]
readPrec :: ReadPrec ResyncMFADevice
$creadPrec :: ReadPrec ResyncMFADevice
readList :: ReadS [ResyncMFADevice]
$creadList :: ReadS [ResyncMFADevice]
readsPrec :: Int -> ReadS ResyncMFADevice
$creadsPrec :: Int -> ReadS ResyncMFADevice
Prelude.Read, Int -> ResyncMFADevice -> ShowS
[ResyncMFADevice] -> ShowS
ResyncMFADevice -> String
(Int -> ResyncMFADevice -> ShowS)
-> (ResyncMFADevice -> String)
-> ([ResyncMFADevice] -> ShowS)
-> Show ResyncMFADevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResyncMFADevice] -> ShowS
$cshowList :: [ResyncMFADevice] -> ShowS
show :: ResyncMFADevice -> String
$cshow :: ResyncMFADevice -> String
showsPrec :: Int -> ResyncMFADevice -> ShowS
$cshowsPrec :: Int -> ResyncMFADevice -> ShowS
Prelude.Show, (forall x. ResyncMFADevice -> Rep ResyncMFADevice x)
-> (forall x. Rep ResyncMFADevice x -> ResyncMFADevice)
-> Generic ResyncMFADevice
forall x. Rep ResyncMFADevice x -> ResyncMFADevice
forall x. ResyncMFADevice -> Rep ResyncMFADevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResyncMFADevice x -> ResyncMFADevice
$cfrom :: forall x. ResyncMFADevice -> Rep ResyncMFADevice x
Prelude.Generic)
newResyncMFADevice ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ResyncMFADevice
newResyncMFADevice :: Text -> Text -> Text -> Text -> ResyncMFADevice
newResyncMFADevice
Text
pUserName_
Text
pSerialNumber_
Text
pAuthenticationCode1_
Text
pAuthenticationCode2_ =
ResyncMFADevice' :: Text -> Text -> Text -> Text -> ResyncMFADevice
ResyncMFADevice'
{ $sel:userName:ResyncMFADevice' :: Text
userName = Text
pUserName_,
$sel:serialNumber:ResyncMFADevice' :: Text
serialNumber = Text
pSerialNumber_,
$sel:authenticationCode1:ResyncMFADevice' :: Text
authenticationCode1 = Text
pAuthenticationCode1_,
$sel:authenticationCode2:ResyncMFADevice' :: Text
authenticationCode2 = Text
pAuthenticationCode2_
}
resyncMFADevice_userName :: Lens.Lens' ResyncMFADevice Prelude.Text
resyncMFADevice_userName :: (Text -> f Text) -> ResyncMFADevice -> f ResyncMFADevice
resyncMFADevice_userName = (ResyncMFADevice -> Text)
-> (ResyncMFADevice -> Text -> ResyncMFADevice)
-> Lens ResyncMFADevice ResyncMFADevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResyncMFADevice' {Text
userName :: Text
$sel:userName:ResyncMFADevice' :: ResyncMFADevice -> Text
userName} -> Text
userName) (\s :: ResyncMFADevice
s@ResyncMFADevice' {} Text
a -> ResyncMFADevice
s {$sel:userName:ResyncMFADevice' :: Text
userName = Text
a} :: ResyncMFADevice)
resyncMFADevice_serialNumber :: Lens.Lens' ResyncMFADevice Prelude.Text
resyncMFADevice_serialNumber :: (Text -> f Text) -> ResyncMFADevice -> f ResyncMFADevice
resyncMFADevice_serialNumber = (ResyncMFADevice -> Text)
-> (ResyncMFADevice -> Text -> ResyncMFADevice)
-> Lens ResyncMFADevice ResyncMFADevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResyncMFADevice' {Text
serialNumber :: Text
$sel:serialNumber:ResyncMFADevice' :: ResyncMFADevice -> Text
serialNumber} -> Text
serialNumber) (\s :: ResyncMFADevice
s@ResyncMFADevice' {} Text
a -> ResyncMFADevice
s {$sel:serialNumber:ResyncMFADevice' :: Text
serialNumber = Text
a} :: ResyncMFADevice)
resyncMFADevice_authenticationCode1 :: Lens.Lens' ResyncMFADevice Prelude.Text
resyncMFADevice_authenticationCode1 :: (Text -> f Text) -> ResyncMFADevice -> f ResyncMFADevice
resyncMFADevice_authenticationCode1 = (ResyncMFADevice -> Text)
-> (ResyncMFADevice -> Text -> ResyncMFADevice)
-> Lens ResyncMFADevice ResyncMFADevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResyncMFADevice' {Text
authenticationCode1 :: Text
$sel:authenticationCode1:ResyncMFADevice' :: ResyncMFADevice -> Text
authenticationCode1} -> Text
authenticationCode1) (\s :: ResyncMFADevice
s@ResyncMFADevice' {} Text
a -> ResyncMFADevice
s {$sel:authenticationCode1:ResyncMFADevice' :: Text
authenticationCode1 = Text
a} :: ResyncMFADevice)
resyncMFADevice_authenticationCode2 :: Lens.Lens' ResyncMFADevice Prelude.Text
resyncMFADevice_authenticationCode2 :: (Text -> f Text) -> ResyncMFADevice -> f ResyncMFADevice
resyncMFADevice_authenticationCode2 = (ResyncMFADevice -> Text)
-> (ResyncMFADevice -> Text -> ResyncMFADevice)
-> Lens ResyncMFADevice ResyncMFADevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResyncMFADevice' {Text
authenticationCode2 :: Text
$sel:authenticationCode2:ResyncMFADevice' :: ResyncMFADevice -> Text
authenticationCode2} -> Text
authenticationCode2) (\s :: ResyncMFADevice
s@ResyncMFADevice' {} Text
a -> ResyncMFADevice
s {$sel:authenticationCode2:ResyncMFADevice' :: Text
authenticationCode2 = Text
a} :: ResyncMFADevice)
instance Core.AWSRequest ResyncMFADevice where
type
AWSResponse ResyncMFADevice =
ResyncMFADeviceResponse
request :: ResyncMFADevice -> Request ResyncMFADevice
request = Service -> ResyncMFADevice -> Request ResyncMFADevice
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ResyncMFADevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ResyncMFADevice)))
response =
AWSResponse ResyncMFADevice
-> Logger
-> Service
-> Proxy ResyncMFADevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ResyncMFADevice)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse ResyncMFADevice
ResyncMFADeviceResponse
ResyncMFADeviceResponse'
instance Prelude.Hashable ResyncMFADevice
instance Prelude.NFData ResyncMFADevice
instance Core.ToHeaders ResyncMFADevice where
toHeaders :: ResyncMFADevice -> [Header]
toHeaders = [Header] -> ResyncMFADevice -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ResyncMFADevice where
toPath :: ResyncMFADevice -> ByteString
toPath = ByteString -> ResyncMFADevice -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ResyncMFADevice where
toQuery :: ResyncMFADevice -> QueryString
toQuery ResyncMFADevice' {Text
authenticationCode2 :: Text
authenticationCode1 :: Text
serialNumber :: Text
userName :: Text
$sel:authenticationCode2:ResyncMFADevice' :: ResyncMFADevice -> Text
$sel:authenticationCode1:ResyncMFADevice' :: ResyncMFADevice -> Text
$sel:serialNumber:ResyncMFADevice' :: ResyncMFADevice -> Text
$sel:userName:ResyncMFADevice' :: ResyncMFADevice -> 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
"ResyncMFADevice" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"UserName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
userName,
ByteString
"SerialNumber" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
serialNumber,
ByteString
"AuthenticationCode1" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
authenticationCode1,
ByteString
"AuthenticationCode2" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
authenticationCode2
]
data ResyncMFADeviceResponse = ResyncMFADeviceResponse'
{
}
deriving (ResyncMFADeviceResponse -> ResyncMFADeviceResponse -> Bool
(ResyncMFADeviceResponse -> ResyncMFADeviceResponse -> Bool)
-> (ResyncMFADeviceResponse -> ResyncMFADeviceResponse -> Bool)
-> Eq ResyncMFADeviceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResyncMFADeviceResponse -> ResyncMFADeviceResponse -> Bool
$c/= :: ResyncMFADeviceResponse -> ResyncMFADeviceResponse -> Bool
== :: ResyncMFADeviceResponse -> ResyncMFADeviceResponse -> Bool
$c== :: ResyncMFADeviceResponse -> ResyncMFADeviceResponse -> Bool
Prelude.Eq, ReadPrec [ResyncMFADeviceResponse]
ReadPrec ResyncMFADeviceResponse
Int -> ReadS ResyncMFADeviceResponse
ReadS [ResyncMFADeviceResponse]
(Int -> ReadS ResyncMFADeviceResponse)
-> ReadS [ResyncMFADeviceResponse]
-> ReadPrec ResyncMFADeviceResponse
-> ReadPrec [ResyncMFADeviceResponse]
-> Read ResyncMFADeviceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResyncMFADeviceResponse]
$creadListPrec :: ReadPrec [ResyncMFADeviceResponse]
readPrec :: ReadPrec ResyncMFADeviceResponse
$creadPrec :: ReadPrec ResyncMFADeviceResponse
readList :: ReadS [ResyncMFADeviceResponse]
$creadList :: ReadS [ResyncMFADeviceResponse]
readsPrec :: Int -> ReadS ResyncMFADeviceResponse
$creadsPrec :: Int -> ReadS ResyncMFADeviceResponse
Prelude.Read, Int -> ResyncMFADeviceResponse -> ShowS
[ResyncMFADeviceResponse] -> ShowS
ResyncMFADeviceResponse -> String
(Int -> ResyncMFADeviceResponse -> ShowS)
-> (ResyncMFADeviceResponse -> String)
-> ([ResyncMFADeviceResponse] -> ShowS)
-> Show ResyncMFADeviceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResyncMFADeviceResponse] -> ShowS
$cshowList :: [ResyncMFADeviceResponse] -> ShowS
show :: ResyncMFADeviceResponse -> String
$cshow :: ResyncMFADeviceResponse -> String
showsPrec :: Int -> ResyncMFADeviceResponse -> ShowS
$cshowsPrec :: Int -> ResyncMFADeviceResponse -> ShowS
Prelude.Show, (forall x.
ResyncMFADeviceResponse -> Rep ResyncMFADeviceResponse x)
-> (forall x.
Rep ResyncMFADeviceResponse x -> ResyncMFADeviceResponse)
-> Generic ResyncMFADeviceResponse
forall x. Rep ResyncMFADeviceResponse x -> ResyncMFADeviceResponse
forall x. ResyncMFADeviceResponse -> Rep ResyncMFADeviceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResyncMFADeviceResponse x -> ResyncMFADeviceResponse
$cfrom :: forall x. ResyncMFADeviceResponse -> Rep ResyncMFADeviceResponse x
Prelude.Generic)
newResyncMFADeviceResponse ::
ResyncMFADeviceResponse
newResyncMFADeviceResponse :: ResyncMFADeviceResponse
newResyncMFADeviceResponse = ResyncMFADeviceResponse
ResyncMFADeviceResponse'
instance Prelude.NFData ResyncMFADeviceResponse