{-# 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.ListMFADeviceTags
-- 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)
--
-- Lists the tags that are attached to the specified IAM virtual
-- multi-factor authentication (MFA) device. The returned list of tags is
-- sorted by tag key. 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/.
module Amazonka.IAM.ListMFADeviceTags
  ( -- * Creating a Request
    ListMFADeviceTags (..),
    newListMFADeviceTags,

    -- * Request Lenses
    listMFADeviceTags_marker,
    listMFADeviceTags_maxItems,
    listMFADeviceTags_serialNumber,

    -- * Destructuring the Response
    ListMFADeviceTagsResponse (..),
    newListMFADeviceTagsResponse,

    -- * Response Lenses
    listMFADeviceTagsResponse_marker,
    listMFADeviceTagsResponse_isTruncated,
    listMFADeviceTagsResponse_httpStatus,
    listMFADeviceTagsResponse_tags,
  )
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:/ 'newListMFADeviceTags' smart constructor.
data ListMFADeviceTags = ListMFADeviceTags'
  { -- | 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.
    ListMFADeviceTags -> 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.
    ListMFADeviceTags -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The unique identifier for the IAM virtual MFA device whose tags you want
    -- to see. For virtual MFA devices, the serial number is the same as the
    -- ARN.
    --
    -- 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: _+=,.\@-
    ListMFADeviceTags -> Text
serialNumber :: Prelude.Text
  }
  deriving (ListMFADeviceTags -> ListMFADeviceTags -> Bool
(ListMFADeviceTags -> ListMFADeviceTags -> Bool)
-> (ListMFADeviceTags -> ListMFADeviceTags -> Bool)
-> Eq ListMFADeviceTags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMFADeviceTags -> ListMFADeviceTags -> Bool
$c/= :: ListMFADeviceTags -> ListMFADeviceTags -> Bool
== :: ListMFADeviceTags -> ListMFADeviceTags -> Bool
$c== :: ListMFADeviceTags -> ListMFADeviceTags -> Bool
Prelude.Eq, ReadPrec [ListMFADeviceTags]
ReadPrec ListMFADeviceTags
Int -> ReadS ListMFADeviceTags
ReadS [ListMFADeviceTags]
(Int -> ReadS ListMFADeviceTags)
-> ReadS [ListMFADeviceTags]
-> ReadPrec ListMFADeviceTags
-> ReadPrec [ListMFADeviceTags]
-> Read ListMFADeviceTags
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMFADeviceTags]
$creadListPrec :: ReadPrec [ListMFADeviceTags]
readPrec :: ReadPrec ListMFADeviceTags
$creadPrec :: ReadPrec ListMFADeviceTags
readList :: ReadS [ListMFADeviceTags]
$creadList :: ReadS [ListMFADeviceTags]
readsPrec :: Int -> ReadS ListMFADeviceTags
$creadsPrec :: Int -> ReadS ListMFADeviceTags
Prelude.Read, Int -> ListMFADeviceTags -> ShowS
[ListMFADeviceTags] -> ShowS
ListMFADeviceTags -> String
(Int -> ListMFADeviceTags -> ShowS)
-> (ListMFADeviceTags -> String)
-> ([ListMFADeviceTags] -> ShowS)
-> Show ListMFADeviceTags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMFADeviceTags] -> ShowS
$cshowList :: [ListMFADeviceTags] -> ShowS
show :: ListMFADeviceTags -> String
$cshow :: ListMFADeviceTags -> String
showsPrec :: Int -> ListMFADeviceTags -> ShowS
$cshowsPrec :: Int -> ListMFADeviceTags -> ShowS
Prelude.Show, (forall x. ListMFADeviceTags -> Rep ListMFADeviceTags x)
-> (forall x. Rep ListMFADeviceTags x -> ListMFADeviceTags)
-> Generic ListMFADeviceTags
forall x. Rep ListMFADeviceTags x -> ListMFADeviceTags
forall x. ListMFADeviceTags -> Rep ListMFADeviceTags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMFADeviceTags x -> ListMFADeviceTags
$cfrom :: forall x. ListMFADeviceTags -> Rep ListMFADeviceTags x
Prelude.Generic)

-- |
-- Create a value of 'ListMFADeviceTags' 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', 'listMFADeviceTags_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', 'listMFADeviceTags_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.
--
-- 'serialNumber', 'listMFADeviceTags_serialNumber' - The unique identifier for the IAM virtual MFA device whose tags you want
-- to see. For virtual MFA devices, the serial number is the same as the
-- ARN.
--
-- 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: _+=,.\@-
newListMFADeviceTags ::
  -- | 'serialNumber'
  Prelude.Text ->
  ListMFADeviceTags
newListMFADeviceTags :: Text -> ListMFADeviceTags
newListMFADeviceTags Text
pSerialNumber_ =
  ListMFADeviceTags' :: Maybe Text -> Maybe Natural -> Text -> ListMFADeviceTags
ListMFADeviceTags'
    { $sel:marker:ListMFADeviceTags' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListMFADeviceTags' :: Maybe Natural
maxItems = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:serialNumber:ListMFADeviceTags' :: Text
serialNumber = Text
pSerialNumber_
    }

-- | 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.
listMFADeviceTags_marker :: Lens.Lens' ListMFADeviceTags (Prelude.Maybe Prelude.Text)
listMFADeviceTags_marker :: (Maybe Text -> f (Maybe Text))
-> ListMFADeviceTags -> f ListMFADeviceTags
listMFADeviceTags_marker = (ListMFADeviceTags -> Maybe Text)
-> (ListMFADeviceTags -> Maybe Text -> ListMFADeviceTags)
-> Lens
     ListMFADeviceTags ListMFADeviceTags (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADeviceTags' {Maybe Text
marker :: Maybe Text
$sel:marker:ListMFADeviceTags' :: ListMFADeviceTags -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListMFADeviceTags
s@ListMFADeviceTags' {} Maybe Text
a -> ListMFADeviceTags
s {$sel:marker:ListMFADeviceTags' :: Maybe Text
marker = Maybe Text
a} :: ListMFADeviceTags)

-- | 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.
listMFADeviceTags_maxItems :: Lens.Lens' ListMFADeviceTags (Prelude.Maybe Prelude.Natural)
listMFADeviceTags_maxItems :: (Maybe Natural -> f (Maybe Natural))
-> ListMFADeviceTags -> f ListMFADeviceTags
listMFADeviceTags_maxItems = (ListMFADeviceTags -> Maybe Natural)
-> (ListMFADeviceTags -> Maybe Natural -> ListMFADeviceTags)
-> Lens
     ListMFADeviceTags ListMFADeviceTags (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADeviceTags' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListMFADeviceTags' :: ListMFADeviceTags -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListMFADeviceTags
s@ListMFADeviceTags' {} Maybe Natural
a -> ListMFADeviceTags
s {$sel:maxItems:ListMFADeviceTags' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListMFADeviceTags)

-- | The unique identifier for the IAM virtual MFA device whose tags you want
-- to see. For virtual MFA devices, the serial number is the same as the
-- ARN.
--
-- 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: _+=,.\@-
listMFADeviceTags_serialNumber :: Lens.Lens' ListMFADeviceTags Prelude.Text
listMFADeviceTags_serialNumber :: (Text -> f Text) -> ListMFADeviceTags -> f ListMFADeviceTags
listMFADeviceTags_serialNumber = (ListMFADeviceTags -> Text)
-> (ListMFADeviceTags -> Text -> ListMFADeviceTags)
-> Lens ListMFADeviceTags ListMFADeviceTags Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADeviceTags' {Text
serialNumber :: Text
$sel:serialNumber:ListMFADeviceTags' :: ListMFADeviceTags -> Text
serialNumber} -> Text
serialNumber) (\s :: ListMFADeviceTags
s@ListMFADeviceTags' {} Text
a -> ListMFADeviceTags
s {$sel:serialNumber:ListMFADeviceTags' :: Text
serialNumber = Text
a} :: ListMFADeviceTags)

instance Core.AWSRequest ListMFADeviceTags where
  type
    AWSResponse ListMFADeviceTags =
      ListMFADeviceTagsResponse
  request :: ListMFADeviceTags -> Request ListMFADeviceTags
request = Service -> ListMFADeviceTags -> Request ListMFADeviceTags
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListMFADeviceTags
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListMFADeviceTags)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListMFADeviceTags))
-> Logger
-> Service
-> Proxy ListMFADeviceTags
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListMFADeviceTags)))
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
"ListMFADeviceTagsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe Bool -> Int -> [Tag] -> ListMFADeviceTagsResponse
ListMFADeviceTagsResponse'
            (Maybe Text
 -> Maybe Bool -> Int -> [Tag] -> ListMFADeviceTagsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Bool -> Int -> [Tag] -> ListMFADeviceTagsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
            Either
  String (Maybe Bool -> Int -> [Tag] -> ListMFADeviceTagsResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> [Tag] -> ListMFADeviceTagsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsTruncated")
            Either String (Int -> [Tag] -> ListMFADeviceTagsResponse)
-> Either String Int
-> Either String ([Tag] -> ListMFADeviceTagsResponse)
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))
            Either String ([Tag] -> ListMFADeviceTagsResponse)
-> Either String [Tag] -> Either String ListMFADeviceTagsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Tags" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String [Tag]) -> Either String [Tag]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable ListMFADeviceTags

instance Prelude.NFData ListMFADeviceTags

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

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

instance Core.ToQuery ListMFADeviceTags where
  toQuery :: ListMFADeviceTags -> QueryString
toQuery ListMFADeviceTags' {Maybe Natural
Maybe Text
Text
serialNumber :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:serialNumber:ListMFADeviceTags' :: ListMFADeviceTags -> Text
$sel:maxItems:ListMFADeviceTags' :: ListMFADeviceTags -> Maybe Natural
$sel:marker:ListMFADeviceTags' :: ListMFADeviceTags -> 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
"ListMFADeviceTags" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"MaxItems" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxItems,
        ByteString
"SerialNumber" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
serialNumber
      ]

-- | /See:/ 'newListMFADeviceTagsResponse' smart constructor.
data ListMFADeviceTagsResponse = ListMFADeviceTagsResponse'
  { -- | When @IsTruncated@ is @true@, this element is present and contains the
    -- value to use for the @Marker@ parameter in a subsequent pagination
    -- request.
    ListMFADeviceTagsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | 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.
    ListMFADeviceTagsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    ListMFADeviceTagsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The list of tags that are currently attached to the virtual MFA device.
    -- Each tag consists of a key name and an associated value. If no tags are
    -- attached to the specified resource, the response contains an empty list.
    ListMFADeviceTagsResponse -> [Tag]
tags :: [Tag]
  }
  deriving (ListMFADeviceTagsResponse -> ListMFADeviceTagsResponse -> Bool
(ListMFADeviceTagsResponse -> ListMFADeviceTagsResponse -> Bool)
-> (ListMFADeviceTagsResponse -> ListMFADeviceTagsResponse -> Bool)
-> Eq ListMFADeviceTagsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMFADeviceTagsResponse -> ListMFADeviceTagsResponse -> Bool
$c/= :: ListMFADeviceTagsResponse -> ListMFADeviceTagsResponse -> Bool
== :: ListMFADeviceTagsResponse -> ListMFADeviceTagsResponse -> Bool
$c== :: ListMFADeviceTagsResponse -> ListMFADeviceTagsResponse -> Bool
Prelude.Eq, ReadPrec [ListMFADeviceTagsResponse]
ReadPrec ListMFADeviceTagsResponse
Int -> ReadS ListMFADeviceTagsResponse
ReadS [ListMFADeviceTagsResponse]
(Int -> ReadS ListMFADeviceTagsResponse)
-> ReadS [ListMFADeviceTagsResponse]
-> ReadPrec ListMFADeviceTagsResponse
-> ReadPrec [ListMFADeviceTagsResponse]
-> Read ListMFADeviceTagsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMFADeviceTagsResponse]
$creadListPrec :: ReadPrec [ListMFADeviceTagsResponse]
readPrec :: ReadPrec ListMFADeviceTagsResponse
$creadPrec :: ReadPrec ListMFADeviceTagsResponse
readList :: ReadS [ListMFADeviceTagsResponse]
$creadList :: ReadS [ListMFADeviceTagsResponse]
readsPrec :: Int -> ReadS ListMFADeviceTagsResponse
$creadsPrec :: Int -> ReadS ListMFADeviceTagsResponse
Prelude.Read, Int -> ListMFADeviceTagsResponse -> ShowS
[ListMFADeviceTagsResponse] -> ShowS
ListMFADeviceTagsResponse -> String
(Int -> ListMFADeviceTagsResponse -> ShowS)
-> (ListMFADeviceTagsResponse -> String)
-> ([ListMFADeviceTagsResponse] -> ShowS)
-> Show ListMFADeviceTagsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMFADeviceTagsResponse] -> ShowS
$cshowList :: [ListMFADeviceTagsResponse] -> ShowS
show :: ListMFADeviceTagsResponse -> String
$cshow :: ListMFADeviceTagsResponse -> String
showsPrec :: Int -> ListMFADeviceTagsResponse -> ShowS
$cshowsPrec :: Int -> ListMFADeviceTagsResponse -> ShowS
Prelude.Show, (forall x.
 ListMFADeviceTagsResponse -> Rep ListMFADeviceTagsResponse x)
-> (forall x.
    Rep ListMFADeviceTagsResponse x -> ListMFADeviceTagsResponse)
-> Generic ListMFADeviceTagsResponse
forall x.
Rep ListMFADeviceTagsResponse x -> ListMFADeviceTagsResponse
forall x.
ListMFADeviceTagsResponse -> Rep ListMFADeviceTagsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMFADeviceTagsResponse x -> ListMFADeviceTagsResponse
$cfrom :: forall x.
ListMFADeviceTagsResponse -> Rep ListMFADeviceTagsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMFADeviceTagsResponse' 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', 'listMFADeviceTagsResponse_marker' - When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
--
-- 'isTruncated', 'listMFADeviceTagsResponse_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.
--
-- 'httpStatus', 'listMFADeviceTagsResponse_httpStatus' - The response's http status code.
--
-- 'tags', 'listMFADeviceTagsResponse_tags' - The list of tags that are currently attached to the virtual MFA device.
-- Each tag consists of a key name and an associated value. If no tags are
-- attached to the specified resource, the response contains an empty list.
newListMFADeviceTagsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMFADeviceTagsResponse
newListMFADeviceTagsResponse :: Int -> ListMFADeviceTagsResponse
newListMFADeviceTagsResponse Int
pHttpStatus_ =
  ListMFADeviceTagsResponse' :: Maybe Text
-> Maybe Bool -> Int -> [Tag] -> ListMFADeviceTagsResponse
ListMFADeviceTagsResponse'
    { $sel:marker:ListMFADeviceTagsResponse' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isTruncated:ListMFADeviceTagsResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMFADeviceTagsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:tags:ListMFADeviceTagsResponse' :: [Tag]
tags = [Tag]
forall a. Monoid a => a
Prelude.mempty
    }

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

-- | 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.
listMFADeviceTagsResponse_isTruncated :: Lens.Lens' ListMFADeviceTagsResponse (Prelude.Maybe Prelude.Bool)
listMFADeviceTagsResponse_isTruncated :: (Maybe Bool -> f (Maybe Bool))
-> ListMFADeviceTagsResponse -> f ListMFADeviceTagsResponse
listMFADeviceTagsResponse_isTruncated = (ListMFADeviceTagsResponse -> Maybe Bool)
-> (ListMFADeviceTagsResponse
    -> Maybe Bool -> ListMFADeviceTagsResponse)
-> Lens
     ListMFADeviceTagsResponse
     ListMFADeviceTagsResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADeviceTagsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListMFADeviceTagsResponse' :: ListMFADeviceTagsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListMFADeviceTagsResponse
s@ListMFADeviceTagsResponse' {} Maybe Bool
a -> ListMFADeviceTagsResponse
s {$sel:isTruncated:ListMFADeviceTagsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListMFADeviceTagsResponse)

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

-- | The list of tags that are currently attached to the virtual MFA device.
-- Each tag consists of a key name and an associated value. If no tags are
-- attached to the specified resource, the response contains an empty list.
listMFADeviceTagsResponse_tags :: Lens.Lens' ListMFADeviceTagsResponse [Tag]
listMFADeviceTagsResponse_tags :: ([Tag] -> f [Tag])
-> ListMFADeviceTagsResponse -> f ListMFADeviceTagsResponse
listMFADeviceTagsResponse_tags = (ListMFADeviceTagsResponse -> [Tag])
-> (ListMFADeviceTagsResponse
    -> [Tag] -> ListMFADeviceTagsResponse)
-> Lens
     ListMFADeviceTagsResponse ListMFADeviceTagsResponse [Tag] [Tag]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMFADeviceTagsResponse' {[Tag]
tags :: [Tag]
$sel:tags:ListMFADeviceTagsResponse' :: ListMFADeviceTagsResponse -> [Tag]
tags} -> [Tag]
tags) (\s :: ListMFADeviceTagsResponse
s@ListMFADeviceTagsResponse' {} [Tag]
a -> ListMFADeviceTagsResponse
s {$sel:tags:ListMFADeviceTagsResponse' :: [Tag]
tags = [Tag]
a} :: ListMFADeviceTagsResponse) (([Tag] -> f [Tag])
 -> ListMFADeviceTagsResponse -> f ListMFADeviceTagsResponse)
-> (([Tag] -> f [Tag]) -> [Tag] -> f [Tag])
-> ([Tag] -> f [Tag])
-> ListMFADeviceTagsResponse
-> f ListMFADeviceTagsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Tag] -> f [Tag]) -> [Tag] -> f [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListMFADeviceTagsResponse