{-# 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.ListMFADevices
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the MFA devices for an IAM user. If the request includes a IAM
-- user name, then this operation lists all the MFA devices associated with
-- the specified user. If you do not specify a user name, IAM determines
-- the user name implicitly based on the Amazon Web Services access key ID
-- signing the request for this operation.
--
-- You can paginate the results using the @MaxItems@ and @Marker@
-- parameters.
--
-- This operation returns paginated results.
module Amazonka.IAM.ListMFADevices
  ( -- * Creating a Request
    ListMFADevices (..),
    newListMFADevices,

    -- * Request Lenses
    listMFADevices_marker,
    listMFADevices_maxItems,
    listMFADevices_userName,

    -- * Destructuring the Response
    ListMFADevicesResponse (..),
    newListMFADevicesResponse,

    -- * Response Lenses
    listMFADevicesResponse_isTruncated,
    listMFADevicesResponse_marker,
    listMFADevicesResponse_httpStatus,
    listMFADevicesResponse_mfaDevices,
  )
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:/ 'newListMFADevices' smart constructor.
data ListMFADevices = ListMFADevices'
  { -- | Use this parameter only when paginating results and only after you
    -- receive a response indicating that the results are truncated. Set it to
    -- the value of the @Marker@ element in the response that you received to
    -- indicate where the next call should start.
    ListMFADevices -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Use this only when paginating results to indicate the maximum number of
    -- items you want in the response. If additional items exist beyond the
    -- maximum you specify, the @IsTruncated@ response element is @true@.
    --
    -- If you do not include this parameter, the number of items defaults to
    -- 100. Note that IAM might return fewer results, even when there are more
    -- results available. In that case, the @IsTruncated@ response element
    -- returns @true@, and @Marker@ contains a value to include in the
    -- subsequent call that tells the service where to continue from.
    ListMFADevices -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The name of the user whose MFA devices you want to list.
    --
    -- 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: _+=,.\@-
    ListMFADevices -> Maybe Text
userName :: Prelude.Maybe Prelude.Text
  }
  deriving (ListMFADevices -> ListMFADevices -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMFADevices -> ListMFADevices -> Bool
$c/= :: ListMFADevices -> ListMFADevices -> Bool
== :: ListMFADevices -> ListMFADevices -> Bool
$c== :: ListMFADevices -> ListMFADevices -> Bool
Prelude.Eq, ReadPrec [ListMFADevices]
ReadPrec ListMFADevices
Int -> ReadS ListMFADevices
ReadS [ListMFADevices]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMFADevices]
$creadListPrec :: ReadPrec [ListMFADevices]
readPrec :: ReadPrec ListMFADevices
$creadPrec :: ReadPrec ListMFADevices
readList :: ReadS [ListMFADevices]
$creadList :: ReadS [ListMFADevices]
readsPrec :: Int -> ReadS ListMFADevices
$creadsPrec :: Int -> ReadS ListMFADevices
Prelude.Read, Int -> ListMFADevices -> ShowS
[ListMFADevices] -> ShowS
ListMFADevices -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMFADevices] -> ShowS
$cshowList :: [ListMFADevices] -> ShowS
show :: ListMFADevices -> String
$cshow :: ListMFADevices -> String
showsPrec :: Int -> ListMFADevices -> ShowS
$cshowsPrec :: Int -> ListMFADevices -> ShowS
Prelude.Show, forall x. Rep ListMFADevices x -> ListMFADevices
forall x. ListMFADevices -> Rep ListMFADevices x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMFADevices x -> ListMFADevices
$cfrom :: forall x. ListMFADevices -> Rep ListMFADevices x
Prelude.Generic)

-- |
-- Create a value of 'ListMFADevices' 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:
--
-- 'marker', 'listMFADevices_marker' - Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
--
-- 'maxItems', 'listMFADevices_maxItems' - Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
--
-- 'userName', 'listMFADevices_userName' - The name of the user whose MFA devices you want to list.
--
-- 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: _+=,.\@-
newListMFADevices ::
  ListMFADevices
newListMFADevices :: ListMFADevices
newListMFADevices =
  ListMFADevices'
    { $sel:marker:ListMFADevices' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListMFADevices' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:userName:ListMFADevices' :: Maybe Text
userName = forall a. Maybe a
Prelude.Nothing
    }

-- | Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
listMFADevices_marker :: Lens.Lens' ListMFADevices (Prelude.Maybe Prelude.Text)
listMFADevices_marker :: Lens' ListMFADevices (Maybe Text)
listMFADevices_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADevices' {Maybe Text
marker :: Maybe Text
$sel:marker:ListMFADevices' :: ListMFADevices -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListMFADevices
s@ListMFADevices' {} Maybe Text
a -> ListMFADevices
s {$sel:marker:ListMFADevices' :: Maybe Text
marker = Maybe Text
a} :: ListMFADevices)

-- | Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
listMFADevices_maxItems :: Lens.Lens' ListMFADevices (Prelude.Maybe Prelude.Natural)
listMFADevices_maxItems :: Lens' ListMFADevices (Maybe Natural)
listMFADevices_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADevices' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListMFADevices' :: ListMFADevices -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListMFADevices
s@ListMFADevices' {} Maybe Natural
a -> ListMFADevices
s {$sel:maxItems:ListMFADevices' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListMFADevices)

-- | The name of the user whose MFA devices you want to list.
--
-- 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: _+=,.\@-
listMFADevices_userName :: Lens.Lens' ListMFADevices (Prelude.Maybe Prelude.Text)
listMFADevices_userName :: Lens' ListMFADevices (Maybe Text)
listMFADevices_userName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADevices' {Maybe Text
userName :: Maybe Text
$sel:userName:ListMFADevices' :: ListMFADevices -> Maybe Text
userName} -> Maybe Text
userName) (\s :: ListMFADevices
s@ListMFADevices' {} Maybe Text
a -> ListMFADevices
s {$sel:userName:ListMFADevices' :: Maybe Text
userName = Maybe Text
a} :: ListMFADevices)

instance Core.AWSPager ListMFADevices where
  page :: ListMFADevices
-> AWSResponse ListMFADevices -> Maybe ListMFADevices
page ListMFADevices
rq AWSResponse ListMFADevices
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMFADevices
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListMFADevicesResponse (Maybe Bool)
listMFADevicesResponse_isTruncated
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListMFADevices
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListMFADevicesResponse (Maybe Text)
listMFADevicesResponse_marker
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListMFADevices
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListMFADevices (Maybe Text)
listMFADevices_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListMFADevices
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListMFADevicesResponse (Maybe Text)
listMFADevicesResponse_marker
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListMFADevices where
  type
    AWSResponse ListMFADevices =
      ListMFADevicesResponse
  request :: (Service -> Service) -> ListMFADevices -> Request ListMFADevices
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 ListMFADevices
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListMFADevices)))
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
"ListMFADevicesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool
-> Maybe Text -> Int -> [MFADevice] -> ListMFADevicesResponse
ListMFADevicesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"IsTruncated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            forall (f :: * -> *) a b. Applicative f => 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 (Maybe a)
Data..@? Text
"MFADevices"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable ListMFADevices where
  hashWithSalt :: Int -> ListMFADevices -> Int
hashWithSalt Int
_salt ListMFADevices' {Maybe Natural
Maybe Text
userName :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:userName:ListMFADevices' :: ListMFADevices -> Maybe Text
$sel:maxItems:ListMFADevices' :: ListMFADevices -> Maybe Natural
$sel:marker:ListMFADevices' :: ListMFADevices -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxItems
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userName

instance Prelude.NFData ListMFADevices where
  rnf :: ListMFADevices -> ()
rnf ListMFADevices' {Maybe Natural
Maybe Text
userName :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:userName:ListMFADevices' :: ListMFADevices -> Maybe Text
$sel:maxItems:ListMFADevices' :: ListMFADevices -> Maybe Natural
$sel:marker:ListMFADevices' :: ListMFADevices -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxItems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userName

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

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

instance Data.ToQuery ListMFADevices where
  toQuery :: ListMFADevices -> QueryString
toQuery ListMFADevices' {Maybe Natural
Maybe Text
userName :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:userName:ListMFADevices' :: ListMFADevices -> Maybe Text
$sel:maxItems:ListMFADevices' :: ListMFADevices -> Maybe Natural
$sel:marker:ListMFADevices' :: ListMFADevices -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListMFADevices" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxItems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxItems,
        ByteString
"UserName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
userName
      ]

-- | Contains the response to a successful ListMFADevices request.
--
-- /See:/ 'newListMFADevicesResponse' smart constructor.
data ListMFADevicesResponse = ListMFADevicesResponse'
  { -- | A flag that indicates whether there are more items to return. If your
    -- results were truncated, you can make a subsequent pagination request
    -- using the @Marker@ request parameter to retrieve more items. Note that
    -- IAM might return fewer than the @MaxItems@ number of results even when
    -- there are more results available. We recommend that you check
    -- @IsTruncated@ after every call to ensure that you receive all your
    -- results.
    ListMFADevicesResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | When @IsTruncated@ is @true@, this element is present and contains the
    -- value to use for the @Marker@ parameter in a subsequent pagination
    -- request.
    ListMFADevicesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListMFADevicesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of MFA devices.
    ListMFADevicesResponse -> [MFADevice]
mfaDevices :: [MFADevice]
  }
  deriving (ListMFADevicesResponse -> ListMFADevicesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMFADevicesResponse -> ListMFADevicesResponse -> Bool
$c/= :: ListMFADevicesResponse -> ListMFADevicesResponse -> Bool
== :: ListMFADevicesResponse -> ListMFADevicesResponse -> Bool
$c== :: ListMFADevicesResponse -> ListMFADevicesResponse -> Bool
Prelude.Eq, ReadPrec [ListMFADevicesResponse]
ReadPrec ListMFADevicesResponse
Int -> ReadS ListMFADevicesResponse
ReadS [ListMFADevicesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMFADevicesResponse]
$creadListPrec :: ReadPrec [ListMFADevicesResponse]
readPrec :: ReadPrec ListMFADevicesResponse
$creadPrec :: ReadPrec ListMFADevicesResponse
readList :: ReadS [ListMFADevicesResponse]
$creadList :: ReadS [ListMFADevicesResponse]
readsPrec :: Int -> ReadS ListMFADevicesResponse
$creadsPrec :: Int -> ReadS ListMFADevicesResponse
Prelude.Read, Int -> ListMFADevicesResponse -> ShowS
[ListMFADevicesResponse] -> ShowS
ListMFADevicesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMFADevicesResponse] -> ShowS
$cshowList :: [ListMFADevicesResponse] -> ShowS
show :: ListMFADevicesResponse -> String
$cshow :: ListMFADevicesResponse -> String
showsPrec :: Int -> ListMFADevicesResponse -> ShowS
$cshowsPrec :: Int -> ListMFADevicesResponse -> ShowS
Prelude.Show, forall x. Rep ListMFADevicesResponse x -> ListMFADevicesResponse
forall x. ListMFADevicesResponse -> Rep ListMFADevicesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMFADevicesResponse x -> ListMFADevicesResponse
$cfrom :: forall x. ListMFADevicesResponse -> Rep ListMFADevicesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMFADevicesResponse' 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:
--
-- 'isTruncated', 'listMFADevicesResponse_isTruncated' - A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
--
-- 'marker', 'listMFADevicesResponse_marker' - When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
--
-- 'httpStatus', 'listMFADevicesResponse_httpStatus' - The response's http status code.
--
-- 'mfaDevices', 'listMFADevicesResponse_mfaDevices' - A list of MFA devices.
newListMFADevicesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMFADevicesResponse
newListMFADevicesResponse :: Int -> ListMFADevicesResponse
newListMFADevicesResponse Int
pHttpStatus_ =
  ListMFADevicesResponse'
    { $sel:isTruncated:ListMFADevicesResponse' :: Maybe Bool
isTruncated =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListMFADevicesResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMFADevicesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:mfaDevices:ListMFADevicesResponse' :: [MFADevice]
mfaDevices = forall a. Monoid a => a
Prelude.mempty
    }

-- | A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
listMFADevicesResponse_isTruncated :: Lens.Lens' ListMFADevicesResponse (Prelude.Maybe Prelude.Bool)
listMFADevicesResponse_isTruncated :: Lens' ListMFADevicesResponse (Maybe Bool)
listMFADevicesResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADevicesResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListMFADevicesResponse' :: ListMFADevicesResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListMFADevicesResponse
s@ListMFADevicesResponse' {} Maybe Bool
a -> ListMFADevicesResponse
s {$sel:isTruncated:ListMFADevicesResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListMFADevicesResponse)

-- | When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
listMFADevicesResponse_marker :: Lens.Lens' ListMFADevicesResponse (Prelude.Maybe Prelude.Text)
listMFADevicesResponse_marker :: Lens' ListMFADevicesResponse (Maybe Text)
listMFADevicesResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADevicesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListMFADevicesResponse' :: ListMFADevicesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListMFADevicesResponse
s@ListMFADevicesResponse' {} Maybe Text
a -> ListMFADevicesResponse
s {$sel:marker:ListMFADevicesResponse' :: Maybe Text
marker = Maybe Text
a} :: ListMFADevicesResponse)

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

-- | A list of MFA devices.
listMFADevicesResponse_mfaDevices :: Lens.Lens' ListMFADevicesResponse [MFADevice]
listMFADevicesResponse_mfaDevices :: Lens' ListMFADevicesResponse [MFADevice]
listMFADevicesResponse_mfaDevices = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADevicesResponse' {[MFADevice]
mfaDevices :: [MFADevice]
$sel:mfaDevices:ListMFADevicesResponse' :: ListMFADevicesResponse -> [MFADevice]
mfaDevices} -> [MFADevice]
mfaDevices) (\s :: ListMFADevicesResponse
s@ListMFADevicesResponse' {} [MFADevice]
a -> ListMFADevicesResponse
s {$sel:mfaDevices:ListMFADevicesResponse' :: [MFADevice]
mfaDevices = [MFADevice]
a} :: ListMFADevicesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListMFADevicesResponse where
  rnf :: ListMFADevicesResponse -> ()
rnf ListMFADevicesResponse' {Int
[MFADevice]
Maybe Bool
Maybe Text
mfaDevices :: [MFADevice]
httpStatus :: Int
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:mfaDevices:ListMFADevicesResponse' :: ListMFADevicesResponse -> [MFADevice]
$sel:httpStatus:ListMFADevicesResponse' :: ListMFADevicesResponse -> Int
$sel:marker:ListMFADevicesResponse' :: ListMFADevicesResponse -> Maybe Text
$sel:isTruncated:ListMFADevicesResponse' :: ListMFADevicesResponse -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isTruncated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 [MFADevice]
mfaDevices