{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IAM.CreateVirtualMFADevice
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new virtual MFA device for the Amazon Web Services account.
-- After creating the virtual MFA, use EnableMFADevice to attach the MFA
-- device to an IAM user. For more information about creating and working
-- with virtual MFA devices, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html Using a virtual MFA device>
-- in the /IAM User Guide/.
--
-- For information about the maximum number of MFA devices you can create,
-- see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html IAM and STS quotas>
-- in the /IAM User Guide/.
--
-- The seed information contained in the QR code and the Base32 string
-- should be treated like any other secret access information. In other
-- words, protect the seed information as you would your Amazon Web
-- Services access keys or your passwords. After you provision your virtual
-- device, you should ensure that the information is destroyed following
-- secure procedures.
module Amazonka.IAM.CreateVirtualMFADevice
  ( -- * Creating a Request
    CreateVirtualMFADevice (..),
    newCreateVirtualMFADevice,

    -- * Request Lenses
    createVirtualMFADevice_path,
    createVirtualMFADevice_tags,
    createVirtualMFADevice_virtualMFADeviceName,

    -- * Destructuring the Response
    CreateVirtualMFADeviceResponse (..),
    newCreateVirtualMFADeviceResponse,

    -- * Response Lenses
    createVirtualMFADeviceResponse_httpStatus,
    createVirtualMFADeviceResponse_virtualMFADevice,
  )
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

-- | /See:/ 'newCreateVirtualMFADevice' smart constructor.
data CreateVirtualMFADevice = CreateVirtualMFADevice'
  { -- | The path for the virtual MFA device. For more information about paths,
    -- see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM identifiers>
    -- in the /IAM User Guide/.
    --
    -- This parameter is optional. If it is not included, it defaults to a
    -- slash (\/).
    --
    -- This parameter allows (through its
    -- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
    -- consisting of either a forward slash (\/) by itself or a string that
    -- must begin and end with forward slashes. In addition, it can contain any
    -- ASCII character from the ! (@\\u0021@) through the DEL character
    -- (@\\u007F@), including most punctuation characters, digits, and upper
    -- and lowercased letters.
    CreateVirtualMFADevice -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
    -- | A list of tags that you want to attach to the new IAM virtual MFA
    -- device. Each tag consists of a key name and an associated value. For
    -- more information about tagging, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
    -- in the /IAM User Guide/.
    --
    -- If any one of the tags is invalid or if you exceed the allowed maximum
    -- number of tags, then the entire request fails and the resource is not
    -- created.
    CreateVirtualMFADevice -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the virtual MFA device. Use with path to uniquely identify a
    -- virtual MFA device.
    --
    -- This parameter allows (through its
    -- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
    -- consisting of upper and lowercase alphanumeric characters with no
    -- spaces. You can also include any of the following characters: _+=,.\@-
    CreateVirtualMFADevice -> Text
virtualMFADeviceName :: Prelude.Text
  }
  deriving (CreateVirtualMFADevice -> CreateVirtualMFADevice -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVirtualMFADevice -> CreateVirtualMFADevice -> Bool
$c/= :: CreateVirtualMFADevice -> CreateVirtualMFADevice -> Bool
== :: CreateVirtualMFADevice -> CreateVirtualMFADevice -> Bool
$c== :: CreateVirtualMFADevice -> CreateVirtualMFADevice -> Bool
Prelude.Eq, ReadPrec [CreateVirtualMFADevice]
ReadPrec CreateVirtualMFADevice
Int -> ReadS CreateVirtualMFADevice
ReadS [CreateVirtualMFADevice]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVirtualMFADevice]
$creadListPrec :: ReadPrec [CreateVirtualMFADevice]
readPrec :: ReadPrec CreateVirtualMFADevice
$creadPrec :: ReadPrec CreateVirtualMFADevice
readList :: ReadS [CreateVirtualMFADevice]
$creadList :: ReadS [CreateVirtualMFADevice]
readsPrec :: Int -> ReadS CreateVirtualMFADevice
$creadsPrec :: Int -> ReadS CreateVirtualMFADevice
Prelude.Read, Int -> CreateVirtualMFADevice -> ShowS
[CreateVirtualMFADevice] -> ShowS
CreateVirtualMFADevice -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVirtualMFADevice] -> ShowS
$cshowList :: [CreateVirtualMFADevice] -> ShowS
show :: CreateVirtualMFADevice -> String
$cshow :: CreateVirtualMFADevice -> String
showsPrec :: Int -> CreateVirtualMFADevice -> ShowS
$cshowsPrec :: Int -> CreateVirtualMFADevice -> ShowS
Prelude.Show, forall x. Rep CreateVirtualMFADevice x -> CreateVirtualMFADevice
forall x. CreateVirtualMFADevice -> Rep CreateVirtualMFADevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateVirtualMFADevice x -> CreateVirtualMFADevice
$cfrom :: forall x. CreateVirtualMFADevice -> Rep CreateVirtualMFADevice x
Prelude.Generic)

-- |
-- Create a value of 'CreateVirtualMFADevice' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'path', 'createVirtualMFADevice_path' - The path for the virtual MFA device. For more information about paths,
-- see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM identifiers>
-- in the /IAM User Guide/.
--
-- This parameter is optional. If it is not included, it defaults to a
-- slash (\/).
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of either a forward slash (\/) by itself or a string that
-- must begin and end with forward slashes. In addition, it can contain any
-- ASCII character from the ! (@\\u0021@) through the DEL character
-- (@\\u007F@), including most punctuation characters, digits, and upper
-- and lowercased letters.
--
-- 'tags', 'createVirtualMFADevice_tags' - A list of tags that you want to attach to the new IAM virtual MFA
-- device. Each tag consists of a key name and an associated value. For
-- more information about tagging, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
-- in the /IAM User Guide/.
--
-- If any one of the tags is invalid or if you exceed the allowed maximum
-- number of tags, then the entire request fails and the resource is not
-- created.
--
-- 'virtualMFADeviceName', 'createVirtualMFADevice_virtualMFADeviceName' - The name of the virtual MFA device. Use with path to uniquely identify a
-- virtual MFA device.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
newCreateVirtualMFADevice ::
  -- | 'virtualMFADeviceName'
  Prelude.Text ->
  CreateVirtualMFADevice
newCreateVirtualMFADevice :: Text -> CreateVirtualMFADevice
newCreateVirtualMFADevice Text
pVirtualMFADeviceName_ =
  CreateVirtualMFADevice'
    { $sel:path:CreateVirtualMFADevice' :: Maybe Text
path = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateVirtualMFADevice' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:virtualMFADeviceName:CreateVirtualMFADevice' :: Text
virtualMFADeviceName = Text
pVirtualMFADeviceName_
    }

-- | The path for the virtual MFA device. For more information about paths,
-- see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html IAM identifiers>
-- in the /IAM User Guide/.
--
-- This parameter is optional. If it is not included, it defaults to a
-- slash (\/).
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of either a forward slash (\/) by itself or a string that
-- must begin and end with forward slashes. In addition, it can contain any
-- ASCII character from the ! (@\\u0021@) through the DEL character
-- (@\\u007F@), including most punctuation characters, digits, and upper
-- and lowercased letters.
createVirtualMFADevice_path :: Lens.Lens' CreateVirtualMFADevice (Prelude.Maybe Prelude.Text)
createVirtualMFADevice_path :: Lens' CreateVirtualMFADevice (Maybe Text)
createVirtualMFADevice_path = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualMFADevice' {Maybe Text
path :: Maybe Text
$sel:path:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Maybe Text
path} -> Maybe Text
path) (\s :: CreateVirtualMFADevice
s@CreateVirtualMFADevice' {} Maybe Text
a -> CreateVirtualMFADevice
s {$sel:path:CreateVirtualMFADevice' :: Maybe Text
path = Maybe Text
a} :: CreateVirtualMFADevice)

-- | A list of tags that you want to attach to the new IAM virtual MFA
-- device. Each tag consists of a key name and an associated value. For
-- more information about tagging, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
-- in the /IAM User Guide/.
--
-- If any one of the tags is invalid or if you exceed the allowed maximum
-- number of tags, then the entire request fails and the resource is not
-- created.
createVirtualMFADevice_tags :: Lens.Lens' CreateVirtualMFADevice (Prelude.Maybe [Tag])
createVirtualMFADevice_tags :: Lens' CreateVirtualMFADevice (Maybe [Tag])
createVirtualMFADevice_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualMFADevice' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateVirtualMFADevice
s@CreateVirtualMFADevice' {} Maybe [Tag]
a -> CreateVirtualMFADevice
s {$sel:tags:CreateVirtualMFADevice' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateVirtualMFADevice) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the virtual MFA device. Use with path to uniquely identify a
-- virtual MFA device.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
createVirtualMFADevice_virtualMFADeviceName :: Lens.Lens' CreateVirtualMFADevice Prelude.Text
createVirtualMFADevice_virtualMFADeviceName :: Lens' CreateVirtualMFADevice Text
createVirtualMFADevice_virtualMFADeviceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualMFADevice' {Text
virtualMFADeviceName :: Text
$sel:virtualMFADeviceName:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Text
virtualMFADeviceName} -> Text
virtualMFADeviceName) (\s :: CreateVirtualMFADevice
s@CreateVirtualMFADevice' {} Text
a -> CreateVirtualMFADevice
s {$sel:virtualMFADeviceName:CreateVirtualMFADevice' :: Text
virtualMFADeviceName = Text
a} :: CreateVirtualMFADevice)

instance Core.AWSRequest CreateVirtualMFADevice where
  type
    AWSResponse CreateVirtualMFADevice =
      CreateVirtualMFADeviceResponse
  request :: (Service -> Service)
-> CreateVirtualMFADevice -> Request CreateVirtualMFADevice
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 CreateVirtualMFADevice
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateVirtualMFADevice)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateVirtualMFADeviceResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> VirtualMFADevice -> CreateVirtualMFADeviceResponse
CreateVirtualMFADeviceResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"VirtualMFADevice")
      )

instance Prelude.Hashable CreateVirtualMFADevice where
  hashWithSalt :: Int -> CreateVirtualMFADevice -> Int
hashWithSalt Int
_salt CreateVirtualMFADevice' {Maybe [Tag]
Maybe Text
Text
virtualMFADeviceName :: Text
tags :: Maybe [Tag]
path :: Maybe Text
$sel:virtualMFADeviceName:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Text
$sel:tags:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Maybe [Tag]
$sel:path:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
path
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
virtualMFADeviceName

instance Prelude.NFData CreateVirtualMFADevice where
  rnf :: CreateVirtualMFADevice -> ()
rnf CreateVirtualMFADevice' {Maybe [Tag]
Maybe Text
Text
virtualMFADeviceName :: Text
tags :: Maybe [Tag]
path :: Maybe Text
$sel:virtualMFADeviceName:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Text
$sel:tags:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Maybe [Tag]
$sel:path:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
path
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
virtualMFADeviceName

instance Data.ToHeaders CreateVirtualMFADevice where
  toHeaders :: CreateVirtualMFADevice -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath CreateVirtualMFADevice where
  toPath :: CreateVirtualMFADevice -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery CreateVirtualMFADevice where
  toQuery :: CreateVirtualMFADevice -> QueryString
toQuery CreateVirtualMFADevice' {Maybe [Tag]
Maybe Text
Text
virtualMFADeviceName :: Text
tags :: Maybe [Tag]
path :: Maybe Text
$sel:virtualMFADeviceName:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Text
$sel:tags:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Maybe [Tag]
$sel:path:CreateVirtualMFADevice' :: CreateVirtualMFADevice -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateVirtualMFADevice" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Path" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
path,
        ByteString
"Tags"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"VirtualMFADeviceName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
virtualMFADeviceName
      ]

-- | Contains the response to a successful CreateVirtualMFADevice request.
--
-- /See:/ 'newCreateVirtualMFADeviceResponse' smart constructor.
data CreateVirtualMFADeviceResponse = CreateVirtualMFADeviceResponse'
  { -- | The response's http status code.
    CreateVirtualMFADeviceResponse -> Int
httpStatus :: Prelude.Int,
    -- | A structure containing details about the new virtual MFA device.
    CreateVirtualMFADeviceResponse -> VirtualMFADevice
virtualMFADevice :: VirtualMFADevice
  }
  deriving (CreateVirtualMFADeviceResponse
-> CreateVirtualMFADeviceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVirtualMFADeviceResponse
-> CreateVirtualMFADeviceResponse -> Bool
$c/= :: CreateVirtualMFADeviceResponse
-> CreateVirtualMFADeviceResponse -> Bool
== :: CreateVirtualMFADeviceResponse
-> CreateVirtualMFADeviceResponse -> Bool
$c== :: CreateVirtualMFADeviceResponse
-> CreateVirtualMFADeviceResponse -> Bool
Prelude.Eq, Int -> CreateVirtualMFADeviceResponse -> ShowS
[CreateVirtualMFADeviceResponse] -> ShowS
CreateVirtualMFADeviceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVirtualMFADeviceResponse] -> ShowS
$cshowList :: [CreateVirtualMFADeviceResponse] -> ShowS
show :: CreateVirtualMFADeviceResponse -> String
$cshow :: CreateVirtualMFADeviceResponse -> String
showsPrec :: Int -> CreateVirtualMFADeviceResponse -> ShowS
$cshowsPrec :: Int -> CreateVirtualMFADeviceResponse -> ShowS
Prelude.Show, forall x.
Rep CreateVirtualMFADeviceResponse x
-> CreateVirtualMFADeviceResponse
forall x.
CreateVirtualMFADeviceResponse
-> Rep CreateVirtualMFADeviceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVirtualMFADeviceResponse x
-> CreateVirtualMFADeviceResponse
$cfrom :: forall x.
CreateVirtualMFADeviceResponse
-> Rep CreateVirtualMFADeviceResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateVirtualMFADeviceResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'createVirtualMFADeviceResponse_httpStatus' - The response's http status code.
--
-- 'virtualMFADevice', 'createVirtualMFADeviceResponse_virtualMFADevice' - A structure containing details about the new virtual MFA device.
newCreateVirtualMFADeviceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'virtualMFADevice'
  VirtualMFADevice ->
  CreateVirtualMFADeviceResponse
newCreateVirtualMFADeviceResponse :: Int -> VirtualMFADevice -> CreateVirtualMFADeviceResponse
newCreateVirtualMFADeviceResponse
  Int
pHttpStatus_
  VirtualMFADevice
pVirtualMFADevice_ =
    CreateVirtualMFADeviceResponse'
      { $sel:httpStatus:CreateVirtualMFADeviceResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:virtualMFADevice:CreateVirtualMFADeviceResponse' :: VirtualMFADevice
virtualMFADevice = VirtualMFADevice
pVirtualMFADevice_
      }

-- | The response's http status code.
createVirtualMFADeviceResponse_httpStatus :: Lens.Lens' CreateVirtualMFADeviceResponse Prelude.Int
createVirtualMFADeviceResponse_httpStatus :: Lens' CreateVirtualMFADeviceResponse Int
createVirtualMFADeviceResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualMFADeviceResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateVirtualMFADeviceResponse' :: CreateVirtualMFADeviceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateVirtualMFADeviceResponse
s@CreateVirtualMFADeviceResponse' {} Int
a -> CreateVirtualMFADeviceResponse
s {$sel:httpStatus:CreateVirtualMFADeviceResponse' :: Int
httpStatus = Int
a} :: CreateVirtualMFADeviceResponse)

-- | A structure containing details about the new virtual MFA device.
createVirtualMFADeviceResponse_virtualMFADevice :: Lens.Lens' CreateVirtualMFADeviceResponse VirtualMFADevice
createVirtualMFADeviceResponse_virtualMFADevice :: Lens' CreateVirtualMFADeviceResponse VirtualMFADevice
createVirtualMFADeviceResponse_virtualMFADevice = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVirtualMFADeviceResponse' {VirtualMFADevice
virtualMFADevice :: VirtualMFADevice
$sel:virtualMFADevice:CreateVirtualMFADeviceResponse' :: CreateVirtualMFADeviceResponse -> VirtualMFADevice
virtualMFADevice} -> VirtualMFADevice
virtualMFADevice) (\s :: CreateVirtualMFADeviceResponse
s@CreateVirtualMFADeviceResponse' {} VirtualMFADevice
a -> CreateVirtualMFADeviceResponse
s {$sel:virtualMFADevice:CreateVirtualMFADeviceResponse' :: VirtualMFADevice
virtualMFADevice = VirtualMFADevice
a} :: CreateVirtualMFADeviceResponse)

instance
  Prelude.NFData
    CreateVirtualMFADeviceResponse
  where
  rnf :: CreateVirtualMFADeviceResponse -> ()
rnf CreateVirtualMFADeviceResponse' {Int
VirtualMFADevice
virtualMFADevice :: VirtualMFADevice
httpStatus :: Int
$sel:virtualMFADevice:CreateVirtualMFADeviceResponse' :: CreateVirtualMFADeviceResponse -> VirtualMFADevice
$sel:httpStatus:CreateVirtualMFADeviceResponse' :: CreateVirtualMFADeviceResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VirtualMFADevice
virtualMFADevice