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