{-# 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.CognitoIdentityProvider.AdminSetUserMFAPreference
-- 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)
--
-- Sets the user\'s multi-factor authentication (MFA) preference, including
-- which MFA options are enabled and if any are preferred. Only one factor
-- can be set as preferred. The preferred MFA factor will be used to
-- authenticate a user if multiple factors are enabled. If multiple options
-- are enabled and no preference is set, a challenge to choose an MFA
-- option will be returned during sign in.
module Amazonka.CognitoIdentityProvider.AdminSetUserMFAPreference
  ( -- * Creating a Request
    AdminSetUserMFAPreference (..),
    newAdminSetUserMFAPreference,

    -- * Request Lenses
    adminSetUserMFAPreference_sMSMfaSettings,
    adminSetUserMFAPreference_softwareTokenMfaSettings,
    adminSetUserMFAPreference_username,
    adminSetUserMFAPreference_userPoolId,

    -- * Destructuring the Response
    AdminSetUserMFAPreferenceResponse (..),
    newAdminSetUserMFAPreferenceResponse,

    -- * Response Lenses
    adminSetUserMFAPreferenceResponse_httpStatus,
  )
where

import Amazonka.CognitoIdentityProvider.Types
import qualified Amazonka.Core as Core
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:/ 'newAdminSetUserMFAPreference' smart constructor.
data AdminSetUserMFAPreference = AdminSetUserMFAPreference'
  { -- | The SMS text message MFA settings.
    AdminSetUserMFAPreference -> Maybe SMSMfaSettingsType
sMSMfaSettings :: Prelude.Maybe SMSMfaSettingsType,
    -- | The time-based one-time password software token MFA settings.
    AdminSetUserMFAPreference -> Maybe SoftwareTokenMfaSettingsType
softwareTokenMfaSettings :: Prelude.Maybe SoftwareTokenMfaSettingsType,
    -- | The user pool username or alias.
    AdminSetUserMFAPreference -> Sensitive Text
username :: Core.Sensitive Prelude.Text,
    -- | The user pool ID.
    AdminSetUserMFAPreference -> Text
userPoolId :: Prelude.Text
  }
  deriving (AdminSetUserMFAPreference -> AdminSetUserMFAPreference -> Bool
(AdminSetUserMFAPreference -> AdminSetUserMFAPreference -> Bool)
-> (AdminSetUserMFAPreference -> AdminSetUserMFAPreference -> Bool)
-> Eq AdminSetUserMFAPreference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdminSetUserMFAPreference -> AdminSetUserMFAPreference -> Bool
$c/= :: AdminSetUserMFAPreference -> AdminSetUserMFAPreference -> Bool
== :: AdminSetUserMFAPreference -> AdminSetUserMFAPreference -> Bool
$c== :: AdminSetUserMFAPreference -> AdminSetUserMFAPreference -> Bool
Prelude.Eq, Int -> AdminSetUserMFAPreference -> ShowS
[AdminSetUserMFAPreference] -> ShowS
AdminSetUserMFAPreference -> String
(Int -> AdminSetUserMFAPreference -> ShowS)
-> (AdminSetUserMFAPreference -> String)
-> ([AdminSetUserMFAPreference] -> ShowS)
-> Show AdminSetUserMFAPreference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdminSetUserMFAPreference] -> ShowS
$cshowList :: [AdminSetUserMFAPreference] -> ShowS
show :: AdminSetUserMFAPreference -> String
$cshow :: AdminSetUserMFAPreference -> String
showsPrec :: Int -> AdminSetUserMFAPreference -> ShowS
$cshowsPrec :: Int -> AdminSetUserMFAPreference -> ShowS
Prelude.Show, (forall x.
 AdminSetUserMFAPreference -> Rep AdminSetUserMFAPreference x)
-> (forall x.
    Rep AdminSetUserMFAPreference x -> AdminSetUserMFAPreference)
-> Generic AdminSetUserMFAPreference
forall x.
Rep AdminSetUserMFAPreference x -> AdminSetUserMFAPreference
forall x.
AdminSetUserMFAPreference -> Rep AdminSetUserMFAPreference x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AdminSetUserMFAPreference x -> AdminSetUserMFAPreference
$cfrom :: forall x.
AdminSetUserMFAPreference -> Rep AdminSetUserMFAPreference x
Prelude.Generic)

-- |
-- Create a value of 'AdminSetUserMFAPreference' 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:
--
-- 'sMSMfaSettings', 'adminSetUserMFAPreference_sMSMfaSettings' - The SMS text message MFA settings.
--
-- 'softwareTokenMfaSettings', 'adminSetUserMFAPreference_softwareTokenMfaSettings' - The time-based one-time password software token MFA settings.
--
-- 'username', 'adminSetUserMFAPreference_username' - The user pool username or alias.
--
-- 'userPoolId', 'adminSetUserMFAPreference_userPoolId' - The user pool ID.
newAdminSetUserMFAPreference ::
  -- | 'username'
  Prelude.Text ->
  -- | 'userPoolId'
  Prelude.Text ->
  AdminSetUserMFAPreference
newAdminSetUserMFAPreference :: Text -> Text -> AdminSetUserMFAPreference
newAdminSetUserMFAPreference Text
pUsername_ Text
pUserPoolId_ =
  AdminSetUserMFAPreference' :: Maybe SMSMfaSettingsType
-> Maybe SoftwareTokenMfaSettingsType
-> Sensitive Text
-> Text
-> AdminSetUserMFAPreference
AdminSetUserMFAPreference'
    { $sel:sMSMfaSettings:AdminSetUserMFAPreference' :: Maybe SMSMfaSettingsType
sMSMfaSettings =
        Maybe SMSMfaSettingsType
forall a. Maybe a
Prelude.Nothing,
      $sel:softwareTokenMfaSettings:AdminSetUserMFAPreference' :: Maybe SoftwareTokenMfaSettingsType
softwareTokenMfaSettings = Maybe SoftwareTokenMfaSettingsType
forall a. Maybe a
Prelude.Nothing,
      $sel:username:AdminSetUserMFAPreference' :: Sensitive Text
username = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pUsername_,
      $sel:userPoolId:AdminSetUserMFAPreference' :: Text
userPoolId = Text
pUserPoolId_
    }

-- | The SMS text message MFA settings.
adminSetUserMFAPreference_sMSMfaSettings :: Lens.Lens' AdminSetUserMFAPreference (Prelude.Maybe SMSMfaSettingsType)
adminSetUserMFAPreference_sMSMfaSettings :: (Maybe SMSMfaSettingsType -> f (Maybe SMSMfaSettingsType))
-> AdminSetUserMFAPreference -> f AdminSetUserMFAPreference
adminSetUserMFAPreference_sMSMfaSettings = (AdminSetUserMFAPreference -> Maybe SMSMfaSettingsType)
-> (AdminSetUserMFAPreference
    -> Maybe SMSMfaSettingsType -> AdminSetUserMFAPreference)
-> Lens
     AdminSetUserMFAPreference
     AdminSetUserMFAPreference
     (Maybe SMSMfaSettingsType)
     (Maybe SMSMfaSettingsType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminSetUserMFAPreference' {Maybe SMSMfaSettingsType
sMSMfaSettings :: Maybe SMSMfaSettingsType
$sel:sMSMfaSettings:AdminSetUserMFAPreference' :: AdminSetUserMFAPreference -> Maybe SMSMfaSettingsType
sMSMfaSettings} -> Maybe SMSMfaSettingsType
sMSMfaSettings) (\s :: AdminSetUserMFAPreference
s@AdminSetUserMFAPreference' {} Maybe SMSMfaSettingsType
a -> AdminSetUserMFAPreference
s {$sel:sMSMfaSettings:AdminSetUserMFAPreference' :: Maybe SMSMfaSettingsType
sMSMfaSettings = Maybe SMSMfaSettingsType
a} :: AdminSetUserMFAPreference)

-- | The time-based one-time password software token MFA settings.
adminSetUserMFAPreference_softwareTokenMfaSettings :: Lens.Lens' AdminSetUserMFAPreference (Prelude.Maybe SoftwareTokenMfaSettingsType)
adminSetUserMFAPreference_softwareTokenMfaSettings :: (Maybe SoftwareTokenMfaSettingsType
 -> f (Maybe SoftwareTokenMfaSettingsType))
-> AdminSetUserMFAPreference -> f AdminSetUserMFAPreference
adminSetUserMFAPreference_softwareTokenMfaSettings = (AdminSetUserMFAPreference -> Maybe SoftwareTokenMfaSettingsType)
-> (AdminSetUserMFAPreference
    -> Maybe SoftwareTokenMfaSettingsType -> AdminSetUserMFAPreference)
-> Lens
     AdminSetUserMFAPreference
     AdminSetUserMFAPreference
     (Maybe SoftwareTokenMfaSettingsType)
     (Maybe SoftwareTokenMfaSettingsType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminSetUserMFAPreference' {Maybe SoftwareTokenMfaSettingsType
softwareTokenMfaSettings :: Maybe SoftwareTokenMfaSettingsType
$sel:softwareTokenMfaSettings:AdminSetUserMFAPreference' :: AdminSetUserMFAPreference -> Maybe SoftwareTokenMfaSettingsType
softwareTokenMfaSettings} -> Maybe SoftwareTokenMfaSettingsType
softwareTokenMfaSettings) (\s :: AdminSetUserMFAPreference
s@AdminSetUserMFAPreference' {} Maybe SoftwareTokenMfaSettingsType
a -> AdminSetUserMFAPreference
s {$sel:softwareTokenMfaSettings:AdminSetUserMFAPreference' :: Maybe SoftwareTokenMfaSettingsType
softwareTokenMfaSettings = Maybe SoftwareTokenMfaSettingsType
a} :: AdminSetUserMFAPreference)

-- | The user pool username or alias.
adminSetUserMFAPreference_username :: Lens.Lens' AdminSetUserMFAPreference Prelude.Text
adminSetUserMFAPreference_username :: (Text -> f Text)
-> AdminSetUserMFAPreference -> f AdminSetUserMFAPreference
adminSetUserMFAPreference_username = (AdminSetUserMFAPreference -> Sensitive Text)
-> (AdminSetUserMFAPreference
    -> Sensitive Text -> AdminSetUserMFAPreference)
-> Lens
     AdminSetUserMFAPreference
     AdminSetUserMFAPreference
     (Sensitive Text)
     (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminSetUserMFAPreference' {Sensitive Text
username :: Sensitive Text
$sel:username:AdminSetUserMFAPreference' :: AdminSetUserMFAPreference -> Sensitive Text
username} -> Sensitive Text
username) (\s :: AdminSetUserMFAPreference
s@AdminSetUserMFAPreference' {} Sensitive Text
a -> AdminSetUserMFAPreference
s {$sel:username:AdminSetUserMFAPreference' :: Sensitive Text
username = Sensitive Text
a} :: AdminSetUserMFAPreference) ((Sensitive Text -> f (Sensitive Text))
 -> AdminSetUserMFAPreference -> f AdminSetUserMFAPreference)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> AdminSetUserMFAPreference
-> f AdminSetUserMFAPreference
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The user pool ID.
adminSetUserMFAPreference_userPoolId :: Lens.Lens' AdminSetUserMFAPreference Prelude.Text
adminSetUserMFAPreference_userPoolId :: (Text -> f Text)
-> AdminSetUserMFAPreference -> f AdminSetUserMFAPreference
adminSetUserMFAPreference_userPoolId = (AdminSetUserMFAPreference -> Text)
-> (AdminSetUserMFAPreference -> Text -> AdminSetUserMFAPreference)
-> Lens
     AdminSetUserMFAPreference AdminSetUserMFAPreference Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminSetUserMFAPreference' {Text
userPoolId :: Text
$sel:userPoolId:AdminSetUserMFAPreference' :: AdminSetUserMFAPreference -> Text
userPoolId} -> Text
userPoolId) (\s :: AdminSetUserMFAPreference
s@AdminSetUserMFAPreference' {} Text
a -> AdminSetUserMFAPreference
s {$sel:userPoolId:AdminSetUserMFAPreference' :: Text
userPoolId = Text
a} :: AdminSetUserMFAPreference)

instance Core.AWSRequest AdminSetUserMFAPreference where
  type
    AWSResponse AdminSetUserMFAPreference =
      AdminSetUserMFAPreferenceResponse
  request :: AdminSetUserMFAPreference -> Request AdminSetUserMFAPreference
request = Service
-> AdminSetUserMFAPreference -> Request AdminSetUserMFAPreference
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AdminSetUserMFAPreference
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AdminSetUserMFAPreference)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse AdminSetUserMFAPreference))
-> Logger
-> Service
-> Proxy AdminSetUserMFAPreference
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AdminSetUserMFAPreference)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> AdminSetUserMFAPreferenceResponse
AdminSetUserMFAPreferenceResponse'
            (Int -> AdminSetUserMFAPreferenceResponse)
-> Either String Int
-> Either String AdminSetUserMFAPreferenceResponse
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))
      )

instance Prelude.Hashable AdminSetUserMFAPreference

instance Prelude.NFData AdminSetUserMFAPreference

instance Core.ToHeaders AdminSetUserMFAPreference where
  toHeaders :: AdminSetUserMFAPreference -> ResponseHeaders
toHeaders =
    ResponseHeaders -> AdminSetUserMFAPreference -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSCognitoIdentityProviderService.AdminSetUserMFAPreference" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON AdminSetUserMFAPreference where
  toJSON :: AdminSetUserMFAPreference -> Value
toJSON AdminSetUserMFAPreference' {Maybe SMSMfaSettingsType
Maybe SoftwareTokenMfaSettingsType
Text
Sensitive Text
userPoolId :: Text
username :: Sensitive Text
softwareTokenMfaSettings :: Maybe SoftwareTokenMfaSettingsType
sMSMfaSettings :: Maybe SMSMfaSettingsType
$sel:userPoolId:AdminSetUserMFAPreference' :: AdminSetUserMFAPreference -> Text
$sel:username:AdminSetUserMFAPreference' :: AdminSetUserMFAPreference -> Sensitive Text
$sel:softwareTokenMfaSettings:AdminSetUserMFAPreference' :: AdminSetUserMFAPreference -> Maybe SoftwareTokenMfaSettingsType
$sel:sMSMfaSettings:AdminSetUserMFAPreference' :: AdminSetUserMFAPreference -> Maybe SMSMfaSettingsType
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"SMSMfaSettings" Text -> SMSMfaSettingsType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SMSMfaSettingsType -> Pair)
-> Maybe SMSMfaSettingsType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SMSMfaSettingsType
sMSMfaSettings,
            (Text
"SoftwareTokenMfaSettings" Text -> SoftwareTokenMfaSettingsType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SoftwareTokenMfaSettingsType -> Pair)
-> Maybe SoftwareTokenMfaSettingsType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SoftwareTokenMfaSettingsType
softwareTokenMfaSettings,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Username" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
username),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UserPoolId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userPoolId)
          ]
      )

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

instance Core.ToQuery AdminSetUserMFAPreference where
  toQuery :: AdminSetUserMFAPreference -> QueryString
toQuery = QueryString -> AdminSetUserMFAPreference -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newAdminSetUserMFAPreferenceResponse' smart constructor.
data AdminSetUserMFAPreferenceResponse = AdminSetUserMFAPreferenceResponse'
  { -- | The response's http status code.
    AdminSetUserMFAPreferenceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AdminSetUserMFAPreferenceResponse
-> AdminSetUserMFAPreferenceResponse -> Bool
(AdminSetUserMFAPreferenceResponse
 -> AdminSetUserMFAPreferenceResponse -> Bool)
-> (AdminSetUserMFAPreferenceResponse
    -> AdminSetUserMFAPreferenceResponse -> Bool)
-> Eq AdminSetUserMFAPreferenceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdminSetUserMFAPreferenceResponse
-> AdminSetUserMFAPreferenceResponse -> Bool
$c/= :: AdminSetUserMFAPreferenceResponse
-> AdminSetUserMFAPreferenceResponse -> Bool
== :: AdminSetUserMFAPreferenceResponse
-> AdminSetUserMFAPreferenceResponse -> Bool
$c== :: AdminSetUserMFAPreferenceResponse
-> AdminSetUserMFAPreferenceResponse -> Bool
Prelude.Eq, ReadPrec [AdminSetUserMFAPreferenceResponse]
ReadPrec AdminSetUserMFAPreferenceResponse
Int -> ReadS AdminSetUserMFAPreferenceResponse
ReadS [AdminSetUserMFAPreferenceResponse]
(Int -> ReadS AdminSetUserMFAPreferenceResponse)
-> ReadS [AdminSetUserMFAPreferenceResponse]
-> ReadPrec AdminSetUserMFAPreferenceResponse
-> ReadPrec [AdminSetUserMFAPreferenceResponse]
-> Read AdminSetUserMFAPreferenceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AdminSetUserMFAPreferenceResponse]
$creadListPrec :: ReadPrec [AdminSetUserMFAPreferenceResponse]
readPrec :: ReadPrec AdminSetUserMFAPreferenceResponse
$creadPrec :: ReadPrec AdminSetUserMFAPreferenceResponse
readList :: ReadS [AdminSetUserMFAPreferenceResponse]
$creadList :: ReadS [AdminSetUserMFAPreferenceResponse]
readsPrec :: Int -> ReadS AdminSetUserMFAPreferenceResponse
$creadsPrec :: Int -> ReadS AdminSetUserMFAPreferenceResponse
Prelude.Read, Int -> AdminSetUserMFAPreferenceResponse -> ShowS
[AdminSetUserMFAPreferenceResponse] -> ShowS
AdminSetUserMFAPreferenceResponse -> String
(Int -> AdminSetUserMFAPreferenceResponse -> ShowS)
-> (AdminSetUserMFAPreferenceResponse -> String)
-> ([AdminSetUserMFAPreferenceResponse] -> ShowS)
-> Show AdminSetUserMFAPreferenceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdminSetUserMFAPreferenceResponse] -> ShowS
$cshowList :: [AdminSetUserMFAPreferenceResponse] -> ShowS
show :: AdminSetUserMFAPreferenceResponse -> String
$cshow :: AdminSetUserMFAPreferenceResponse -> String
showsPrec :: Int -> AdminSetUserMFAPreferenceResponse -> ShowS
$cshowsPrec :: Int -> AdminSetUserMFAPreferenceResponse -> ShowS
Prelude.Show, (forall x.
 AdminSetUserMFAPreferenceResponse
 -> Rep AdminSetUserMFAPreferenceResponse x)
-> (forall x.
    Rep AdminSetUserMFAPreferenceResponse x
    -> AdminSetUserMFAPreferenceResponse)
-> Generic AdminSetUserMFAPreferenceResponse
forall x.
Rep AdminSetUserMFAPreferenceResponse x
-> AdminSetUserMFAPreferenceResponse
forall x.
AdminSetUserMFAPreferenceResponse
-> Rep AdminSetUserMFAPreferenceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AdminSetUserMFAPreferenceResponse x
-> AdminSetUserMFAPreferenceResponse
$cfrom :: forall x.
AdminSetUserMFAPreferenceResponse
-> Rep AdminSetUserMFAPreferenceResponse x
Prelude.Generic)

-- |
-- Create a value of 'AdminSetUserMFAPreferenceResponse' 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', 'adminSetUserMFAPreferenceResponse_httpStatus' - The response's http status code.
newAdminSetUserMFAPreferenceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AdminSetUserMFAPreferenceResponse
newAdminSetUserMFAPreferenceResponse :: Int -> AdminSetUserMFAPreferenceResponse
newAdminSetUserMFAPreferenceResponse Int
pHttpStatus_ =
  AdminSetUserMFAPreferenceResponse' :: Int -> AdminSetUserMFAPreferenceResponse
AdminSetUserMFAPreferenceResponse'
    { $sel:httpStatus:AdminSetUserMFAPreferenceResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance
  Prelude.NFData
    AdminSetUserMFAPreferenceResponse