{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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 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

-- | /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
(CreateVirtualMFADevice -> CreateVirtualMFADevice -> Bool)
-> (CreateVirtualMFADevice -> CreateVirtualMFADevice -> Bool)
-> Eq CreateVirtualMFADevice
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]
(Int -> ReadS CreateVirtualMFADevice)
-> ReadS [CreateVirtualMFADevice]
-> ReadPrec CreateVirtualMFADevice
-> ReadPrec [CreateVirtualMFADevice]
-> Read 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
(Int -> CreateVirtualMFADevice -> ShowS)
-> (CreateVirtualMFADevice -> String)
-> ([CreateVirtualMFADevice] -> ShowS)
-> Show CreateVirtualMFADevice
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. CreateVirtualMFADevice -> Rep CreateVirtualMFADevice x)
-> (forall x.
    Rep CreateVirtualMFADevice x -> CreateVirtualMFADevice)
-> Generic CreateVirtualMFADevice
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' :: Maybe Text -> Maybe [Tag] -> Text -> CreateVirtualMFADevice
CreateVirtualMFADevice'
    { $sel:path:CreateVirtualMFADevice' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateVirtualMFADevice' :: Maybe [Tag]
tags = Maybe [Tag]
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 :: (Maybe Text -> f (Maybe Text))
-> CreateVirtualMFADevice -> f CreateVirtualMFADevice
createVirtualMFADevice_path = (CreateVirtualMFADevice -> Maybe Text)
-> (CreateVirtualMFADevice -> Maybe Text -> CreateVirtualMFADevice)
-> Lens
     CreateVirtualMFADevice
     CreateVirtualMFADevice
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateVirtualMFADevice -> f CreateVirtualMFADevice
createVirtualMFADevice_tags = (CreateVirtualMFADevice -> Maybe [Tag])
-> (CreateVirtualMFADevice
    -> Maybe [Tag] -> CreateVirtualMFADevice)
-> Lens
     CreateVirtualMFADevice
     CreateVirtualMFADevice
     (Maybe [Tag])
     (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateVirtualMFADevice -> f CreateVirtualMFADevice)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateVirtualMFADevice
-> f CreateVirtualMFADevice
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
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 :: (Text -> f Text)
-> CreateVirtualMFADevice -> f CreateVirtualMFADevice
createVirtualMFADevice_virtualMFADeviceName = (CreateVirtualMFADevice -> Text)
-> (CreateVirtualMFADevice -> Text -> CreateVirtualMFADevice)
-> Lens CreateVirtualMFADevice CreateVirtualMFADevice Text Text
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 :: CreateVirtualMFADevice -> Request CreateVirtualMFADevice
request = Service -> CreateVirtualMFADevice -> Request CreateVirtualMFADevice
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateVirtualMFADevice
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateVirtualMFADevice)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateVirtualMFADevice))
-> Logger
-> Service
-> Proxy CreateVirtualMFADevice
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateVirtualMFADevice)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> 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'
            (Int -> VirtualMFADevice -> CreateVirtualMFADeviceResponse)
-> Either String Int
-> Either
     String (VirtualMFADevice -> CreateVirtualMFADeviceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either String (VirtualMFADevice -> CreateVirtualMFADeviceResponse)
-> Either String VirtualMFADevice
-> Either String CreateVirtualMFADeviceResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String VirtualMFADevice
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"VirtualMFADevice")
      )

instance Prelude.Hashable CreateVirtualMFADevice

instance Prelude.NFData CreateVirtualMFADevice

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

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

instance Core.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
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateVirtualMFADevice" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Path" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
path,
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"VirtualMFADeviceName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: 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
(CreateVirtualMFADeviceResponse
 -> CreateVirtualMFADeviceResponse -> Bool)
-> (CreateVirtualMFADeviceResponse
    -> CreateVirtualMFADeviceResponse -> Bool)
-> Eq CreateVirtualMFADeviceResponse
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
(Int -> CreateVirtualMFADeviceResponse -> ShowS)
-> (CreateVirtualMFADeviceResponse -> String)
-> ([CreateVirtualMFADeviceResponse] -> ShowS)
-> Show CreateVirtualMFADeviceResponse
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.
 CreateVirtualMFADeviceResponse
 -> Rep CreateVirtualMFADeviceResponse x)
-> (forall x.
    Rep CreateVirtualMFADeviceResponse x
    -> CreateVirtualMFADeviceResponse)
-> Generic CreateVirtualMFADeviceResponse
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' :: Int -> VirtualMFADevice -> CreateVirtualMFADeviceResponse
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 :: (Int -> f Int)
-> CreateVirtualMFADeviceResponse
-> f CreateVirtualMFADeviceResponse
createVirtualMFADeviceResponse_httpStatus = (CreateVirtualMFADeviceResponse -> Int)
-> (CreateVirtualMFADeviceResponse
    -> Int -> CreateVirtualMFADeviceResponse)
-> Lens
     CreateVirtualMFADeviceResponse
     CreateVirtualMFADeviceResponse
     Int
     Int
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 :: (VirtualMFADevice -> f VirtualMFADevice)
-> CreateVirtualMFADeviceResponse
-> f CreateVirtualMFADeviceResponse
createVirtualMFADeviceResponse_virtualMFADevice = (CreateVirtualMFADeviceResponse -> VirtualMFADevice)
-> (CreateVirtualMFADeviceResponse
    -> VirtualMFADevice -> CreateVirtualMFADeviceResponse)
-> Lens
     CreateVirtualMFADeviceResponse
     CreateVirtualMFADeviceResponse
     VirtualMFADevice
     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