{-# 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.TagMFADevice
(
TagMFADevice (..),
newTagMFADevice,
tagMFADevice_serialNumber,
tagMFADevice_tags,
TagMFADeviceResponse (..),
newTagMFADeviceResponse,
)
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 TagMFADevice = TagMFADevice'
{
TagMFADevice -> Text
serialNumber :: Prelude.Text,
TagMFADevice -> [Tag]
tags :: [Tag]
}
deriving (TagMFADevice -> TagMFADevice -> Bool
(TagMFADevice -> TagMFADevice -> Bool)
-> (TagMFADevice -> TagMFADevice -> Bool) -> Eq TagMFADevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TagMFADevice -> TagMFADevice -> Bool
$c/= :: TagMFADevice -> TagMFADevice -> Bool
== :: TagMFADevice -> TagMFADevice -> Bool
$c== :: TagMFADevice -> TagMFADevice -> Bool
Prelude.Eq, ReadPrec [TagMFADevice]
ReadPrec TagMFADevice
Int -> ReadS TagMFADevice
ReadS [TagMFADevice]
(Int -> ReadS TagMFADevice)
-> ReadS [TagMFADevice]
-> ReadPrec TagMFADevice
-> ReadPrec [TagMFADevice]
-> Read TagMFADevice
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TagMFADevice]
$creadListPrec :: ReadPrec [TagMFADevice]
readPrec :: ReadPrec TagMFADevice
$creadPrec :: ReadPrec TagMFADevice
readList :: ReadS [TagMFADevice]
$creadList :: ReadS [TagMFADevice]
readsPrec :: Int -> ReadS TagMFADevice
$creadsPrec :: Int -> ReadS TagMFADevice
Prelude.Read, Int -> TagMFADevice -> ShowS
[TagMFADevice] -> ShowS
TagMFADevice -> String
(Int -> TagMFADevice -> ShowS)
-> (TagMFADevice -> String)
-> ([TagMFADevice] -> ShowS)
-> Show TagMFADevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TagMFADevice] -> ShowS
$cshowList :: [TagMFADevice] -> ShowS
show :: TagMFADevice -> String
$cshow :: TagMFADevice -> String
showsPrec :: Int -> TagMFADevice -> ShowS
$cshowsPrec :: Int -> TagMFADevice -> ShowS
Prelude.Show, (forall x. TagMFADevice -> Rep TagMFADevice x)
-> (forall x. Rep TagMFADevice x -> TagMFADevice)
-> Generic TagMFADevice
forall x. Rep TagMFADevice x -> TagMFADevice
forall x. TagMFADevice -> Rep TagMFADevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TagMFADevice x -> TagMFADevice
$cfrom :: forall x. TagMFADevice -> Rep TagMFADevice x
Prelude.Generic)
newTagMFADevice ::
Prelude.Text ->
TagMFADevice
newTagMFADevice :: Text -> TagMFADevice
newTagMFADevice Text
pSerialNumber_ =
TagMFADevice' :: Text -> [Tag] -> TagMFADevice
TagMFADevice'
{ $sel:serialNumber:TagMFADevice' :: Text
serialNumber = Text
pSerialNumber_,
$sel:tags:TagMFADevice' :: [Tag]
tags = [Tag]
forall a. Monoid a => a
Prelude.mempty
}
tagMFADevice_serialNumber :: Lens.Lens' TagMFADevice Prelude.Text
tagMFADevice_serialNumber :: (Text -> f Text) -> TagMFADevice -> f TagMFADevice
tagMFADevice_serialNumber = (TagMFADevice -> Text)
-> (TagMFADevice -> Text -> TagMFADevice)
-> Lens TagMFADevice TagMFADevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagMFADevice' {Text
serialNumber :: Text
$sel:serialNumber:TagMFADevice' :: TagMFADevice -> Text
serialNumber} -> Text
serialNumber) (\s :: TagMFADevice
s@TagMFADevice' {} Text
a -> TagMFADevice
s {$sel:serialNumber:TagMFADevice' :: Text
serialNumber = Text
a} :: TagMFADevice)
tagMFADevice_tags :: Lens.Lens' TagMFADevice [Tag]
tagMFADevice_tags :: ([Tag] -> f [Tag]) -> TagMFADevice -> f TagMFADevice
tagMFADevice_tags = (TagMFADevice -> [Tag])
-> (TagMFADevice -> [Tag] -> TagMFADevice)
-> Lens TagMFADevice TagMFADevice [Tag] [Tag]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagMFADevice' {[Tag]
tags :: [Tag]
$sel:tags:TagMFADevice' :: TagMFADevice -> [Tag]
tags} -> [Tag]
tags) (\s :: TagMFADevice
s@TagMFADevice' {} [Tag]
a -> TagMFADevice
s {$sel:tags:TagMFADevice' :: [Tag]
tags = [Tag]
a} :: TagMFADevice) (([Tag] -> f [Tag]) -> TagMFADevice -> f TagMFADevice)
-> (([Tag] -> f [Tag]) -> [Tag] -> f [Tag])
-> ([Tag] -> f [Tag])
-> TagMFADevice
-> f TagMFADevice
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Tag] -> f [Tag]) -> [Tag] -> f [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest TagMFADevice where
type AWSResponse TagMFADevice = TagMFADeviceResponse
request :: TagMFADevice -> Request TagMFADevice
request = Service -> TagMFADevice -> Request TagMFADevice
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy TagMFADevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TagMFADevice)))
response = AWSResponse TagMFADevice
-> Logger
-> Service
-> Proxy TagMFADevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TagMFADevice)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse TagMFADevice
TagMFADeviceResponse
TagMFADeviceResponse'
instance Prelude.Hashable TagMFADevice
instance Prelude.NFData TagMFADevice
instance Core.ToHeaders TagMFADevice where
toHeaders :: TagMFADevice -> [Header]
toHeaders = [Header] -> TagMFADevice -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath TagMFADevice where
toPath :: TagMFADevice -> ByteString
toPath = ByteString -> TagMFADevice -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery TagMFADevice where
toQuery :: TagMFADevice -> QueryString
toQuery TagMFADevice' {[Tag]
Text
tags :: [Tag]
serialNumber :: Text
$sel:tags:TagMFADevice' :: TagMFADevice -> [Tag]
$sel:serialNumber:TagMFADevice' :: TagMFADevice -> 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
"TagMFADevice" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"SerialNumber" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
serialNumber,
ByteString
"Tags" ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [Tag]
tags
]
data TagMFADeviceResponse = TagMFADeviceResponse'
{
}
deriving (TagMFADeviceResponse -> TagMFADeviceResponse -> Bool
(TagMFADeviceResponse -> TagMFADeviceResponse -> Bool)
-> (TagMFADeviceResponse -> TagMFADeviceResponse -> Bool)
-> Eq TagMFADeviceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TagMFADeviceResponse -> TagMFADeviceResponse -> Bool
$c/= :: TagMFADeviceResponse -> TagMFADeviceResponse -> Bool
== :: TagMFADeviceResponse -> TagMFADeviceResponse -> Bool
$c== :: TagMFADeviceResponse -> TagMFADeviceResponse -> Bool
Prelude.Eq, ReadPrec [TagMFADeviceResponse]
ReadPrec TagMFADeviceResponse
Int -> ReadS TagMFADeviceResponse
ReadS [TagMFADeviceResponse]
(Int -> ReadS TagMFADeviceResponse)
-> ReadS [TagMFADeviceResponse]
-> ReadPrec TagMFADeviceResponse
-> ReadPrec [TagMFADeviceResponse]
-> Read TagMFADeviceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TagMFADeviceResponse]
$creadListPrec :: ReadPrec [TagMFADeviceResponse]
readPrec :: ReadPrec TagMFADeviceResponse
$creadPrec :: ReadPrec TagMFADeviceResponse
readList :: ReadS [TagMFADeviceResponse]
$creadList :: ReadS [TagMFADeviceResponse]
readsPrec :: Int -> ReadS TagMFADeviceResponse
$creadsPrec :: Int -> ReadS TagMFADeviceResponse
Prelude.Read, Int -> TagMFADeviceResponse -> ShowS
[TagMFADeviceResponse] -> ShowS
TagMFADeviceResponse -> String
(Int -> TagMFADeviceResponse -> ShowS)
-> (TagMFADeviceResponse -> String)
-> ([TagMFADeviceResponse] -> ShowS)
-> Show TagMFADeviceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TagMFADeviceResponse] -> ShowS
$cshowList :: [TagMFADeviceResponse] -> ShowS
show :: TagMFADeviceResponse -> String
$cshow :: TagMFADeviceResponse -> String
showsPrec :: Int -> TagMFADeviceResponse -> ShowS
$cshowsPrec :: Int -> TagMFADeviceResponse -> ShowS
Prelude.Show, (forall x. TagMFADeviceResponse -> Rep TagMFADeviceResponse x)
-> (forall x. Rep TagMFADeviceResponse x -> TagMFADeviceResponse)
-> Generic TagMFADeviceResponse
forall x. Rep TagMFADeviceResponse x -> TagMFADeviceResponse
forall x. TagMFADeviceResponse -> Rep TagMFADeviceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TagMFADeviceResponse x -> TagMFADeviceResponse
$cfrom :: forall x. TagMFADeviceResponse -> Rep TagMFADeviceResponse x
Prelude.Generic)
newTagMFADeviceResponse ::
TagMFADeviceResponse
newTagMFADeviceResponse :: TagMFADeviceResponse
newTagMFADeviceResponse = TagMFADeviceResponse
TagMFADeviceResponse'
instance Prelude.NFData TagMFADeviceResponse