{-# 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.ListUserTags
-- 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 tags that are attached to the specified IAM user. 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/.
--
-- This operation returns paginated results.
module Amazonka.IAM.ListUserTags
  ( -- * Creating a Request
    ListUserTags (..),
    newListUserTags,

    -- * Request Lenses
    listUserTags_marker,
    listUserTags_maxItems,
    listUserTags_userName,

    -- * Destructuring the Response
    ListUserTagsResponse (..),
    newListUserTagsResponse,

    -- * Response Lenses
    listUserTagsResponse_isTruncated,
    listUserTagsResponse_marker,
    listUserTagsResponse_httpStatus,
    listUserTagsResponse_tags,
  )
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:/ 'newListUserTags' smart constructor.
data ListUserTags = ListUserTags'
  { -- | 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.
    ListUserTags -> 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.
    ListUserTags -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The name of the IAM user whose tags you want to see.
    --
    -- 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: _+=,.\@-
    ListUserTags -> Text
userName :: Prelude.Text
  }
  deriving (ListUserTags -> ListUserTags -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUserTags -> ListUserTags -> Bool
$c/= :: ListUserTags -> ListUserTags -> Bool
== :: ListUserTags -> ListUserTags -> Bool
$c== :: ListUserTags -> ListUserTags -> Bool
Prelude.Eq, ReadPrec [ListUserTags]
ReadPrec ListUserTags
Int -> ReadS ListUserTags
ReadS [ListUserTags]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListUserTags]
$creadListPrec :: ReadPrec [ListUserTags]
readPrec :: ReadPrec ListUserTags
$creadPrec :: ReadPrec ListUserTags
readList :: ReadS [ListUserTags]
$creadList :: ReadS [ListUserTags]
readsPrec :: Int -> ReadS ListUserTags
$creadsPrec :: Int -> ReadS ListUserTags
Prelude.Read, Int -> ListUserTags -> ShowS
[ListUserTags] -> ShowS
ListUserTags -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUserTags] -> ShowS
$cshowList :: [ListUserTags] -> ShowS
show :: ListUserTags -> String
$cshow :: ListUserTags -> String
showsPrec :: Int -> ListUserTags -> ShowS
$cshowsPrec :: Int -> ListUserTags -> ShowS
Prelude.Show, forall x. Rep ListUserTags x -> ListUserTags
forall x. ListUserTags -> Rep ListUserTags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListUserTags x -> ListUserTags
$cfrom :: forall x. ListUserTags -> Rep ListUserTags x
Prelude.Generic)

-- |
-- Create a value of 'ListUserTags' 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', 'listUserTags_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', 'listUserTags_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', 'listUserTags_userName' - The name of the IAM user whose tags you want to see.
--
-- 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: _+=,.\@-
newListUserTags ::
  -- | 'userName'
  Prelude.Text ->
  ListUserTags
newListUserTags :: Text -> ListUserTags
newListUserTags Text
pUserName_ =
  ListUserTags'
    { $sel:marker:ListUserTags' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListUserTags' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:userName:ListUserTags' :: Text
userName = Text
pUserName_
    }

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

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

-- | The name of the IAM user whose tags you want to see.
--
-- 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: _+=,.\@-
listUserTags_userName :: Lens.Lens' ListUserTags Prelude.Text
listUserTags_userName :: Lens' ListUserTags Text
listUserTags_userName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserTags' {Text
userName :: Text
$sel:userName:ListUserTags' :: ListUserTags -> Text
userName} -> Text
userName) (\s :: ListUserTags
s@ListUserTags' {} Text
a -> ListUserTags
s {$sel:userName:ListUserTags' :: Text
userName = Text
a} :: ListUserTags)

instance Core.AWSPager ListUserTags where
  page :: ListUserTags -> AWSResponse ListUserTags -> Maybe ListUserTags
page ListUserTags
rq AWSResponse ListUserTags
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListUserTags
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUserTagsResponse (Maybe Bool)
listUserTagsResponse_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 ListUserTags
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUserTagsResponse (Maybe Text)
listUserTagsResponse_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.$ ListUserTags
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListUserTags (Maybe Text)
listUserTags_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListUserTags
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUserTagsResponse (Maybe Text)
listUserTagsResponse_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 ListUserTags where
  type AWSResponse ListUserTags = ListUserTagsResponse
  request :: (Service -> Service) -> ListUserTags -> Request ListUserTags
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 ListUserTags
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListUserTags)))
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
"ListUserTagsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool -> Maybe Text -> Int -> [Tag] -> ListUserTagsResponse
ListUserTagsResponse'
            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
"Tags"
                            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 ListUserTags where
  hashWithSalt :: Int -> ListUserTags -> Int
hashWithSalt Int
_salt ListUserTags' {Maybe Natural
Maybe Text
Text
userName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:userName:ListUserTags' :: ListUserTags -> Text
$sel:maxItems:ListUserTags' :: ListUserTags -> Maybe Natural
$sel:marker:ListUserTags' :: ListUserTags -> 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` Text
userName

instance Prelude.NFData ListUserTags where
  rnf :: ListUserTags -> ()
rnf ListUserTags' {Maybe Natural
Maybe Text
Text
userName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:userName:ListUserTags' :: ListUserTags -> Text
$sel:maxItems:ListUserTags' :: ListUserTags -> Maybe Natural
$sel:marker:ListUserTags' :: ListUserTags -> 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 Text
userName

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

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

instance Data.ToQuery ListUserTags where
  toQuery :: ListUserTags -> QueryString
toQuery ListUserTags' {Maybe Natural
Maybe Text
Text
userName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:userName:ListUserTags' :: ListUserTags -> Text
$sel:maxItems:ListUserTags' :: ListUserTags -> Maybe Natural
$sel:marker:ListUserTags' :: ListUserTags -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListUserTags" :: 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.=: Text
userName
      ]

-- | /See:/ 'newListUserTagsResponse' smart constructor.
data ListUserTagsResponse = ListUserTagsResponse'
  { -- | 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.
    ListUserTagsResponse -> 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.
    ListUserTagsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListUserTagsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The list of tags that are currently attached to the user. 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.
    ListUserTagsResponse -> [Tag]
tags :: [Tag]
  }
  deriving (ListUserTagsResponse -> ListUserTagsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUserTagsResponse -> ListUserTagsResponse -> Bool
$c/= :: ListUserTagsResponse -> ListUserTagsResponse -> Bool
== :: ListUserTagsResponse -> ListUserTagsResponse -> Bool
$c== :: ListUserTagsResponse -> ListUserTagsResponse -> Bool
Prelude.Eq, ReadPrec [ListUserTagsResponse]
ReadPrec ListUserTagsResponse
Int -> ReadS ListUserTagsResponse
ReadS [ListUserTagsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListUserTagsResponse]
$creadListPrec :: ReadPrec [ListUserTagsResponse]
readPrec :: ReadPrec ListUserTagsResponse
$creadPrec :: ReadPrec ListUserTagsResponse
readList :: ReadS [ListUserTagsResponse]
$creadList :: ReadS [ListUserTagsResponse]
readsPrec :: Int -> ReadS ListUserTagsResponse
$creadsPrec :: Int -> ReadS ListUserTagsResponse
Prelude.Read, Int -> ListUserTagsResponse -> ShowS
[ListUserTagsResponse] -> ShowS
ListUserTagsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUserTagsResponse] -> ShowS
$cshowList :: [ListUserTagsResponse] -> ShowS
show :: ListUserTagsResponse -> String
$cshow :: ListUserTagsResponse -> String
showsPrec :: Int -> ListUserTagsResponse -> ShowS
$cshowsPrec :: Int -> ListUserTagsResponse -> ShowS
Prelude.Show, forall x. Rep ListUserTagsResponse x -> ListUserTagsResponse
forall x. ListUserTagsResponse -> Rep ListUserTagsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListUserTagsResponse x -> ListUserTagsResponse
$cfrom :: forall x. ListUserTagsResponse -> Rep ListUserTagsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListUserTagsResponse' 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', 'listUserTagsResponse_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', 'listUserTagsResponse_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', 'listUserTagsResponse_httpStatus' - The response's http status code.
--
-- 'tags', 'listUserTagsResponse_tags' - The list of tags that are currently attached to the user. 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.
newListUserTagsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListUserTagsResponse
newListUserTagsResponse :: Int -> ListUserTagsResponse
newListUserTagsResponse Int
pHttpStatus_ =
  ListUserTagsResponse'
    { $sel:isTruncated:ListUserTagsResponse' :: Maybe Bool
isTruncated =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListUserTagsResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListUserTagsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:tags:ListUserTagsResponse' :: [Tag]
tags = 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.
listUserTagsResponse_isTruncated :: Lens.Lens' ListUserTagsResponse (Prelude.Maybe Prelude.Bool)
listUserTagsResponse_isTruncated :: Lens' ListUserTagsResponse (Maybe Bool)
listUserTagsResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserTagsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListUserTagsResponse' :: ListUserTagsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListUserTagsResponse
s@ListUserTagsResponse' {} Maybe Bool
a -> ListUserTagsResponse
s {$sel:isTruncated:ListUserTagsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListUserTagsResponse)

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

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

-- | The list of tags that are currently attached to the user. 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.
listUserTagsResponse_tags :: Lens.Lens' ListUserTagsResponse [Tag]
listUserTagsResponse_tags :: Lens' ListUserTagsResponse [Tag]
listUserTagsResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserTagsResponse' {[Tag]
tags :: [Tag]
$sel:tags:ListUserTagsResponse' :: ListUserTagsResponse -> [Tag]
tags} -> [Tag]
tags) (\s :: ListUserTagsResponse
s@ListUserTagsResponse' {} [Tag]
a -> ListUserTagsResponse
s {$sel:tags:ListUserTagsResponse' :: [Tag]
tags = [Tag]
a} :: ListUserTagsResponse) 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 ListUserTagsResponse where
  rnf :: ListUserTagsResponse -> ()
rnf ListUserTagsResponse' {Int
[Tag]
Maybe Bool
Maybe Text
tags :: [Tag]
httpStatus :: Int
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:tags:ListUserTagsResponse' :: ListUserTagsResponse -> [Tag]
$sel:httpStatus:ListUserTagsResponse' :: ListUserTagsResponse -> Int
$sel:marker:ListUserTagsResponse' :: ListUserTagsResponse -> Maybe Text
$sel:isTruncated:ListUserTagsResponse' :: ListUserTagsResponse -> 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 [Tag]
tags