{-# 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.GetUserPoolMfaConfig
-- 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)
--
-- Gets the user pool multi-factor authentication (MFA) configuration.
module Amazonka.CognitoIdentityProvider.GetUserPoolMfaConfig
  ( -- * Creating a Request
    GetUserPoolMfaConfig (..),
    newGetUserPoolMfaConfig,

    -- * Request Lenses
    getUserPoolMfaConfig_userPoolId,

    -- * Destructuring the Response
    GetUserPoolMfaConfigResponse (..),
    newGetUserPoolMfaConfigResponse,

    -- * Response Lenses
    getUserPoolMfaConfigResponse_smsMfaConfiguration,
    getUserPoolMfaConfigResponse_softwareTokenMfaConfiguration,
    getUserPoolMfaConfigResponse_mfaConfiguration,
    getUserPoolMfaConfigResponse_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:/ 'newGetUserPoolMfaConfig' smart constructor.
data GetUserPoolMfaConfig = GetUserPoolMfaConfig'
  { -- | The user pool ID.
    GetUserPoolMfaConfig -> Text
userPoolId :: Prelude.Text
  }
  deriving (GetUserPoolMfaConfig -> GetUserPoolMfaConfig -> Bool
(GetUserPoolMfaConfig -> GetUserPoolMfaConfig -> Bool)
-> (GetUserPoolMfaConfig -> GetUserPoolMfaConfig -> Bool)
-> Eq GetUserPoolMfaConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUserPoolMfaConfig -> GetUserPoolMfaConfig -> Bool
$c/= :: GetUserPoolMfaConfig -> GetUserPoolMfaConfig -> Bool
== :: GetUserPoolMfaConfig -> GetUserPoolMfaConfig -> Bool
$c== :: GetUserPoolMfaConfig -> GetUserPoolMfaConfig -> Bool
Prelude.Eq, ReadPrec [GetUserPoolMfaConfig]
ReadPrec GetUserPoolMfaConfig
Int -> ReadS GetUserPoolMfaConfig
ReadS [GetUserPoolMfaConfig]
(Int -> ReadS GetUserPoolMfaConfig)
-> ReadS [GetUserPoolMfaConfig]
-> ReadPrec GetUserPoolMfaConfig
-> ReadPrec [GetUserPoolMfaConfig]
-> Read GetUserPoolMfaConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUserPoolMfaConfig]
$creadListPrec :: ReadPrec [GetUserPoolMfaConfig]
readPrec :: ReadPrec GetUserPoolMfaConfig
$creadPrec :: ReadPrec GetUserPoolMfaConfig
readList :: ReadS [GetUserPoolMfaConfig]
$creadList :: ReadS [GetUserPoolMfaConfig]
readsPrec :: Int -> ReadS GetUserPoolMfaConfig
$creadsPrec :: Int -> ReadS GetUserPoolMfaConfig
Prelude.Read, Int -> GetUserPoolMfaConfig -> ShowS
[GetUserPoolMfaConfig] -> ShowS
GetUserPoolMfaConfig -> String
(Int -> GetUserPoolMfaConfig -> ShowS)
-> (GetUserPoolMfaConfig -> String)
-> ([GetUserPoolMfaConfig] -> ShowS)
-> Show GetUserPoolMfaConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUserPoolMfaConfig] -> ShowS
$cshowList :: [GetUserPoolMfaConfig] -> ShowS
show :: GetUserPoolMfaConfig -> String
$cshow :: GetUserPoolMfaConfig -> String
showsPrec :: Int -> GetUserPoolMfaConfig -> ShowS
$cshowsPrec :: Int -> GetUserPoolMfaConfig -> ShowS
Prelude.Show, (forall x. GetUserPoolMfaConfig -> Rep GetUserPoolMfaConfig x)
-> (forall x. Rep GetUserPoolMfaConfig x -> GetUserPoolMfaConfig)
-> Generic GetUserPoolMfaConfig
forall x. Rep GetUserPoolMfaConfig x -> GetUserPoolMfaConfig
forall x. GetUserPoolMfaConfig -> Rep GetUserPoolMfaConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetUserPoolMfaConfig x -> GetUserPoolMfaConfig
$cfrom :: forall x. GetUserPoolMfaConfig -> Rep GetUserPoolMfaConfig x
Prelude.Generic)

-- |
-- Create a value of 'GetUserPoolMfaConfig' 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:
--
-- 'userPoolId', 'getUserPoolMfaConfig_userPoolId' - The user pool ID.
newGetUserPoolMfaConfig ::
  -- | 'userPoolId'
  Prelude.Text ->
  GetUserPoolMfaConfig
newGetUserPoolMfaConfig :: Text -> GetUserPoolMfaConfig
newGetUserPoolMfaConfig Text
pUserPoolId_ =
  GetUserPoolMfaConfig' :: Text -> GetUserPoolMfaConfig
GetUserPoolMfaConfig' {$sel:userPoolId:GetUserPoolMfaConfig' :: Text
userPoolId = Text
pUserPoolId_}

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

instance Core.AWSRequest GetUserPoolMfaConfig where
  type
    AWSResponse GetUserPoolMfaConfig =
      GetUserPoolMfaConfigResponse
  request :: GetUserPoolMfaConfig -> Request GetUserPoolMfaConfig
request = Service -> GetUserPoolMfaConfig -> Request GetUserPoolMfaConfig
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetUserPoolMfaConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetUserPoolMfaConfig)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetUserPoolMfaConfig))
-> Logger
-> Service
-> Proxy GetUserPoolMfaConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetUserPoolMfaConfig)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe SmsMfaConfigType
-> Maybe SoftwareTokenMfaConfigType
-> Maybe UserPoolMfaType
-> Int
-> GetUserPoolMfaConfigResponse
GetUserPoolMfaConfigResponse'
            (Maybe SmsMfaConfigType
 -> Maybe SoftwareTokenMfaConfigType
 -> Maybe UserPoolMfaType
 -> Int
 -> GetUserPoolMfaConfigResponse)
-> Either String (Maybe SmsMfaConfigType)
-> Either
     String
     (Maybe SoftwareTokenMfaConfigType
      -> Maybe UserPoolMfaType -> Int -> GetUserPoolMfaConfigResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe SmsMfaConfigType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SmsMfaConfiguration")
            Either
  String
  (Maybe SoftwareTokenMfaConfigType
   -> Maybe UserPoolMfaType -> Int -> GetUserPoolMfaConfigResponse)
-> Either String (Maybe SoftwareTokenMfaConfigType)
-> Either
     String
     (Maybe UserPoolMfaType -> Int -> GetUserPoolMfaConfigResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe SoftwareTokenMfaConfigType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SoftwareTokenMfaConfiguration")
            Either
  String
  (Maybe UserPoolMfaType -> Int -> GetUserPoolMfaConfigResponse)
-> Either String (Maybe UserPoolMfaType)
-> Either String (Int -> GetUserPoolMfaConfigResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe UserPoolMfaType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MfaConfiguration")
            Either String (Int -> GetUserPoolMfaConfigResponse)
-> Either String Int -> Either String GetUserPoolMfaConfigResponse
forall (f :: * -> *) a b. Applicative f => 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 GetUserPoolMfaConfig

instance Prelude.NFData GetUserPoolMfaConfig

instance Core.ToHeaders GetUserPoolMfaConfig where
  toHeaders :: GetUserPoolMfaConfig -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetUserPoolMfaConfig -> 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.GetUserPoolMfaConfig" ::
                          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 GetUserPoolMfaConfig where
  toJSON :: GetUserPoolMfaConfig -> Value
toJSON GetUserPoolMfaConfig' {Text
userPoolId :: Text
$sel:userPoolId:GetUserPoolMfaConfig' :: GetUserPoolMfaConfig -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [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 GetUserPoolMfaConfig where
  toPath :: GetUserPoolMfaConfig -> ByteString
toPath = ByteString -> GetUserPoolMfaConfig -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newGetUserPoolMfaConfigResponse' smart constructor.
data GetUserPoolMfaConfigResponse = GetUserPoolMfaConfigResponse'
  { -- | The SMS text message multi-factor (MFA) configuration.
    GetUserPoolMfaConfigResponse -> Maybe SmsMfaConfigType
smsMfaConfiguration :: Prelude.Maybe SmsMfaConfigType,
    -- | The software token multi-factor (MFA) configuration.
    GetUserPoolMfaConfigResponse -> Maybe SoftwareTokenMfaConfigType
softwareTokenMfaConfiguration :: Prelude.Maybe SoftwareTokenMfaConfigType,
    -- | The multi-factor (MFA) configuration. Valid values include:
    --
    -- -   @OFF@ MFA will not be used for any users.
    --
    -- -   @ON@ MFA is required for all users to sign in.
    --
    -- -   @OPTIONAL@ MFA will be required only for individual users who have
    --     an MFA factor enabled.
    GetUserPoolMfaConfigResponse -> Maybe UserPoolMfaType
mfaConfiguration :: Prelude.Maybe UserPoolMfaType,
    -- | The response's http status code.
    GetUserPoolMfaConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetUserPoolMfaConfigResponse
-> GetUserPoolMfaConfigResponse -> Bool
(GetUserPoolMfaConfigResponse
 -> GetUserPoolMfaConfigResponse -> Bool)
-> (GetUserPoolMfaConfigResponse
    -> GetUserPoolMfaConfigResponse -> Bool)
-> Eq GetUserPoolMfaConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUserPoolMfaConfigResponse
-> GetUserPoolMfaConfigResponse -> Bool
$c/= :: GetUserPoolMfaConfigResponse
-> GetUserPoolMfaConfigResponse -> Bool
== :: GetUserPoolMfaConfigResponse
-> GetUserPoolMfaConfigResponse -> Bool
$c== :: GetUserPoolMfaConfigResponse
-> GetUserPoolMfaConfigResponse -> Bool
Prelude.Eq, ReadPrec [GetUserPoolMfaConfigResponse]
ReadPrec GetUserPoolMfaConfigResponse
Int -> ReadS GetUserPoolMfaConfigResponse
ReadS [GetUserPoolMfaConfigResponse]
(Int -> ReadS GetUserPoolMfaConfigResponse)
-> ReadS [GetUserPoolMfaConfigResponse]
-> ReadPrec GetUserPoolMfaConfigResponse
-> ReadPrec [GetUserPoolMfaConfigResponse]
-> Read GetUserPoolMfaConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUserPoolMfaConfigResponse]
$creadListPrec :: ReadPrec [GetUserPoolMfaConfigResponse]
readPrec :: ReadPrec GetUserPoolMfaConfigResponse
$creadPrec :: ReadPrec GetUserPoolMfaConfigResponse
readList :: ReadS [GetUserPoolMfaConfigResponse]
$creadList :: ReadS [GetUserPoolMfaConfigResponse]
readsPrec :: Int -> ReadS GetUserPoolMfaConfigResponse
$creadsPrec :: Int -> ReadS GetUserPoolMfaConfigResponse
Prelude.Read, Int -> GetUserPoolMfaConfigResponse -> ShowS
[GetUserPoolMfaConfigResponse] -> ShowS
GetUserPoolMfaConfigResponse -> String
(Int -> GetUserPoolMfaConfigResponse -> ShowS)
-> (GetUserPoolMfaConfigResponse -> String)
-> ([GetUserPoolMfaConfigResponse] -> ShowS)
-> Show GetUserPoolMfaConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUserPoolMfaConfigResponse] -> ShowS
$cshowList :: [GetUserPoolMfaConfigResponse] -> ShowS
show :: GetUserPoolMfaConfigResponse -> String
$cshow :: GetUserPoolMfaConfigResponse -> String
showsPrec :: Int -> GetUserPoolMfaConfigResponse -> ShowS
$cshowsPrec :: Int -> GetUserPoolMfaConfigResponse -> ShowS
Prelude.Show, (forall x.
 GetUserPoolMfaConfigResponse -> Rep GetUserPoolMfaConfigResponse x)
-> (forall x.
    Rep GetUserPoolMfaConfigResponse x -> GetUserPoolMfaConfigResponse)
-> Generic GetUserPoolMfaConfigResponse
forall x.
Rep GetUserPoolMfaConfigResponse x -> GetUserPoolMfaConfigResponse
forall x.
GetUserPoolMfaConfigResponse -> Rep GetUserPoolMfaConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetUserPoolMfaConfigResponse x -> GetUserPoolMfaConfigResponse
$cfrom :: forall x.
GetUserPoolMfaConfigResponse -> Rep GetUserPoolMfaConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetUserPoolMfaConfigResponse' 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:
--
-- 'smsMfaConfiguration', 'getUserPoolMfaConfigResponse_smsMfaConfiguration' - The SMS text message multi-factor (MFA) configuration.
--
-- 'softwareTokenMfaConfiguration', 'getUserPoolMfaConfigResponse_softwareTokenMfaConfiguration' - The software token multi-factor (MFA) configuration.
--
-- 'mfaConfiguration', 'getUserPoolMfaConfigResponse_mfaConfiguration' - The multi-factor (MFA) configuration. Valid values include:
--
-- -   @OFF@ MFA will not be used for any users.
--
-- -   @ON@ MFA is required for all users to sign in.
--
-- -   @OPTIONAL@ MFA will be required only for individual users who have
--     an MFA factor enabled.
--
-- 'httpStatus', 'getUserPoolMfaConfigResponse_httpStatus' - The response's http status code.
newGetUserPoolMfaConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetUserPoolMfaConfigResponse
newGetUserPoolMfaConfigResponse :: Int -> GetUserPoolMfaConfigResponse
newGetUserPoolMfaConfigResponse Int
pHttpStatus_ =
  GetUserPoolMfaConfigResponse' :: Maybe SmsMfaConfigType
-> Maybe SoftwareTokenMfaConfigType
-> Maybe UserPoolMfaType
-> Int
-> GetUserPoolMfaConfigResponse
GetUserPoolMfaConfigResponse'
    { $sel:smsMfaConfiguration:GetUserPoolMfaConfigResponse' :: Maybe SmsMfaConfigType
smsMfaConfiguration =
        Maybe SmsMfaConfigType
forall a. Maybe a
Prelude.Nothing,
      $sel:softwareTokenMfaConfiguration:GetUserPoolMfaConfigResponse' :: Maybe SoftwareTokenMfaConfigType
softwareTokenMfaConfiguration =
        Maybe SoftwareTokenMfaConfigType
forall a. Maybe a
Prelude.Nothing,
      $sel:mfaConfiguration:GetUserPoolMfaConfigResponse' :: Maybe UserPoolMfaType
mfaConfiguration = Maybe UserPoolMfaType
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetUserPoolMfaConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The SMS text message multi-factor (MFA) configuration.
getUserPoolMfaConfigResponse_smsMfaConfiguration :: Lens.Lens' GetUserPoolMfaConfigResponse (Prelude.Maybe SmsMfaConfigType)
getUserPoolMfaConfigResponse_smsMfaConfiguration :: (Maybe SmsMfaConfigType -> f (Maybe SmsMfaConfigType))
-> GetUserPoolMfaConfigResponse -> f GetUserPoolMfaConfigResponse
getUserPoolMfaConfigResponse_smsMfaConfiguration = (GetUserPoolMfaConfigResponse -> Maybe SmsMfaConfigType)
-> (GetUserPoolMfaConfigResponse
    -> Maybe SmsMfaConfigType -> GetUserPoolMfaConfigResponse)
-> Lens
     GetUserPoolMfaConfigResponse
     GetUserPoolMfaConfigResponse
     (Maybe SmsMfaConfigType)
     (Maybe SmsMfaConfigType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUserPoolMfaConfigResponse' {Maybe SmsMfaConfigType
smsMfaConfiguration :: Maybe SmsMfaConfigType
$sel:smsMfaConfiguration:GetUserPoolMfaConfigResponse' :: GetUserPoolMfaConfigResponse -> Maybe SmsMfaConfigType
smsMfaConfiguration} -> Maybe SmsMfaConfigType
smsMfaConfiguration) (\s :: GetUserPoolMfaConfigResponse
s@GetUserPoolMfaConfigResponse' {} Maybe SmsMfaConfigType
a -> GetUserPoolMfaConfigResponse
s {$sel:smsMfaConfiguration:GetUserPoolMfaConfigResponse' :: Maybe SmsMfaConfigType
smsMfaConfiguration = Maybe SmsMfaConfigType
a} :: GetUserPoolMfaConfigResponse)

-- | The software token multi-factor (MFA) configuration.
getUserPoolMfaConfigResponse_softwareTokenMfaConfiguration :: Lens.Lens' GetUserPoolMfaConfigResponse (Prelude.Maybe SoftwareTokenMfaConfigType)
getUserPoolMfaConfigResponse_softwareTokenMfaConfiguration :: (Maybe SoftwareTokenMfaConfigType
 -> f (Maybe SoftwareTokenMfaConfigType))
-> GetUserPoolMfaConfigResponse -> f GetUserPoolMfaConfigResponse
getUserPoolMfaConfigResponse_softwareTokenMfaConfiguration = (GetUserPoolMfaConfigResponse -> Maybe SoftwareTokenMfaConfigType)
-> (GetUserPoolMfaConfigResponse
    -> Maybe SoftwareTokenMfaConfigType
    -> GetUserPoolMfaConfigResponse)
-> Lens
     GetUserPoolMfaConfigResponse
     GetUserPoolMfaConfigResponse
     (Maybe SoftwareTokenMfaConfigType)
     (Maybe SoftwareTokenMfaConfigType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUserPoolMfaConfigResponse' {Maybe SoftwareTokenMfaConfigType
softwareTokenMfaConfiguration :: Maybe SoftwareTokenMfaConfigType
$sel:softwareTokenMfaConfiguration:GetUserPoolMfaConfigResponse' :: GetUserPoolMfaConfigResponse -> Maybe SoftwareTokenMfaConfigType
softwareTokenMfaConfiguration} -> Maybe SoftwareTokenMfaConfigType
softwareTokenMfaConfiguration) (\s :: GetUserPoolMfaConfigResponse
s@GetUserPoolMfaConfigResponse' {} Maybe SoftwareTokenMfaConfigType
a -> GetUserPoolMfaConfigResponse
s {$sel:softwareTokenMfaConfiguration:GetUserPoolMfaConfigResponse' :: Maybe SoftwareTokenMfaConfigType
softwareTokenMfaConfiguration = Maybe SoftwareTokenMfaConfigType
a} :: GetUserPoolMfaConfigResponse)

-- | The multi-factor (MFA) configuration. Valid values include:
--
-- -   @OFF@ MFA will not be used for any users.
--
-- -   @ON@ MFA is required for all users to sign in.
--
-- -   @OPTIONAL@ MFA will be required only for individual users who have
--     an MFA factor enabled.
getUserPoolMfaConfigResponse_mfaConfiguration :: Lens.Lens' GetUserPoolMfaConfigResponse (Prelude.Maybe UserPoolMfaType)
getUserPoolMfaConfigResponse_mfaConfiguration :: (Maybe UserPoolMfaType -> f (Maybe UserPoolMfaType))
-> GetUserPoolMfaConfigResponse -> f GetUserPoolMfaConfigResponse
getUserPoolMfaConfigResponse_mfaConfiguration = (GetUserPoolMfaConfigResponse -> Maybe UserPoolMfaType)
-> (GetUserPoolMfaConfigResponse
    -> Maybe UserPoolMfaType -> GetUserPoolMfaConfigResponse)
-> Lens
     GetUserPoolMfaConfigResponse
     GetUserPoolMfaConfigResponse
     (Maybe UserPoolMfaType)
     (Maybe UserPoolMfaType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUserPoolMfaConfigResponse' {Maybe UserPoolMfaType
mfaConfiguration :: Maybe UserPoolMfaType
$sel:mfaConfiguration:GetUserPoolMfaConfigResponse' :: GetUserPoolMfaConfigResponse -> Maybe UserPoolMfaType
mfaConfiguration} -> Maybe UserPoolMfaType
mfaConfiguration) (\s :: GetUserPoolMfaConfigResponse
s@GetUserPoolMfaConfigResponse' {} Maybe UserPoolMfaType
a -> GetUserPoolMfaConfigResponse
s {$sel:mfaConfiguration:GetUserPoolMfaConfigResponse' :: Maybe UserPoolMfaType
mfaConfiguration = Maybe UserPoolMfaType
a} :: GetUserPoolMfaConfigResponse)

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

instance Prelude.NFData GetUserPoolMfaConfigResponse