{-# 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.ListRoleTags
-- 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 role. 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.ListRoleTags
  ( -- * Creating a Request
    ListRoleTags (..),
    newListRoleTags,

    -- * Request Lenses
    listRoleTags_marker,
    listRoleTags_maxItems,
    listRoleTags_roleName,

    -- * Destructuring the Response
    ListRoleTagsResponse (..),
    newListRoleTagsResponse,

    -- * Response Lenses
    listRoleTagsResponse_marker,
    listRoleTagsResponse_isTruncated,
    listRoleTagsResponse_httpStatus,
    listRoleTagsResponse_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:/ 'newListRoleTags' smart constructor.
data ListRoleTags = ListRoleTags'
  { -- | 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.
    ListRoleTags -> 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.
    ListRoleTags -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The name of the IAM role for which you want to see the list of tags.
    --
    -- This parameter accepts (through its
    -- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
    -- that consist of upper and lowercase alphanumeric characters with no
    -- spaces. You can also include any of the following characters: _+=,.\@-
    ListRoleTags -> Text
roleName :: Prelude.Text
  }
  deriving (ListRoleTags -> ListRoleTags -> Bool
(ListRoleTags -> ListRoleTags -> Bool)
-> (ListRoleTags -> ListRoleTags -> Bool) -> Eq ListRoleTags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRoleTags -> ListRoleTags -> Bool
$c/= :: ListRoleTags -> ListRoleTags -> Bool
== :: ListRoleTags -> ListRoleTags -> Bool
$c== :: ListRoleTags -> ListRoleTags -> Bool
Prelude.Eq, ReadPrec [ListRoleTags]
ReadPrec ListRoleTags
Int -> ReadS ListRoleTags
ReadS [ListRoleTags]
(Int -> ReadS ListRoleTags)
-> ReadS [ListRoleTags]
-> ReadPrec ListRoleTags
-> ReadPrec [ListRoleTags]
-> Read ListRoleTags
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRoleTags]
$creadListPrec :: ReadPrec [ListRoleTags]
readPrec :: ReadPrec ListRoleTags
$creadPrec :: ReadPrec ListRoleTags
readList :: ReadS [ListRoleTags]
$creadList :: ReadS [ListRoleTags]
readsPrec :: Int -> ReadS ListRoleTags
$creadsPrec :: Int -> ReadS ListRoleTags
Prelude.Read, Int -> ListRoleTags -> ShowS
[ListRoleTags] -> ShowS
ListRoleTags -> String
(Int -> ListRoleTags -> ShowS)
-> (ListRoleTags -> String)
-> ([ListRoleTags] -> ShowS)
-> Show ListRoleTags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRoleTags] -> ShowS
$cshowList :: [ListRoleTags] -> ShowS
show :: ListRoleTags -> String
$cshow :: ListRoleTags -> String
showsPrec :: Int -> ListRoleTags -> ShowS
$cshowsPrec :: Int -> ListRoleTags -> ShowS
Prelude.Show, (forall x. ListRoleTags -> Rep ListRoleTags x)
-> (forall x. Rep ListRoleTags x -> ListRoleTags)
-> Generic ListRoleTags
forall x. Rep ListRoleTags x -> ListRoleTags
forall x. ListRoleTags -> Rep ListRoleTags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRoleTags x -> ListRoleTags
$cfrom :: forall x. ListRoleTags -> Rep ListRoleTags x
Prelude.Generic)

-- |
-- Create a value of 'ListRoleTags' 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', 'listRoleTags_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', 'listRoleTags_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.
--
-- 'roleName', 'listRoleTags_roleName' - The name of the IAM role for which you want to see the list of tags.
--
-- This parameter accepts (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- that consist of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
newListRoleTags ::
  -- | 'roleName'
  Prelude.Text ->
  ListRoleTags
newListRoleTags :: Text -> ListRoleTags
newListRoleTags Text
pRoleName_ =
  ListRoleTags' :: Maybe Text -> Maybe Natural -> Text -> ListRoleTags
ListRoleTags'
    { $sel:marker:ListRoleTags' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListRoleTags' :: Maybe Natural
maxItems = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:roleName:ListRoleTags' :: Text
roleName = Text
pRoleName_
    }

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

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

-- | The name of the IAM role for which you want to see the list of tags.
--
-- This parameter accepts (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- that consist of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
listRoleTags_roleName :: Lens.Lens' ListRoleTags Prelude.Text
listRoleTags_roleName :: (Text -> f Text) -> ListRoleTags -> f ListRoleTags
listRoleTags_roleName = (ListRoleTags -> Text)
-> (ListRoleTags -> Text -> ListRoleTags)
-> Lens ListRoleTags ListRoleTags Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoleTags' {Text
roleName :: Text
$sel:roleName:ListRoleTags' :: ListRoleTags -> Text
roleName} -> Text
roleName) (\s :: ListRoleTags
s@ListRoleTags' {} Text
a -> ListRoleTags
s {$sel:roleName:ListRoleTags' :: Text
roleName = Text
a} :: ListRoleTags)

instance Core.AWSRequest ListRoleTags where
  type AWSResponse ListRoleTags = ListRoleTagsResponse
  request :: ListRoleTags -> Request ListRoleTags
request = Service -> ListRoleTags -> Request ListRoleTags
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListRoleTags
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRoleTags)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListRoleTags))
-> Logger
-> Service
-> Proxy ListRoleTags
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRoleTags)))
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
"ListRoleTagsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Maybe Bool -> Int -> [Tag] -> ListRoleTagsResponse
ListRoleTagsResponse'
            (Maybe Text -> Maybe Bool -> Int -> [Tag] -> ListRoleTagsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Bool -> Int -> [Tag] -> ListRoleTagsResponse)
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] -> ListRoleTagsResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> [Tag] -> ListRoleTagsResponse)
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] -> ListRoleTagsResponse)
-> Either String Int
-> Either String ([Tag] -> ListRoleTagsResponse)
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] -> ListRoleTagsResponse)
-> Either String [Tag] -> Either String ListRoleTagsResponse
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 ListRoleTags

instance Prelude.NFData ListRoleTags

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

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

instance Core.ToQuery ListRoleTags where
  toQuery :: ListRoleTags -> QueryString
toQuery ListRoleTags' {Maybe Natural
Maybe Text
Text
roleName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:roleName:ListRoleTags' :: ListRoleTags -> Text
$sel:maxItems:ListRoleTags' :: ListRoleTags -> Maybe Natural
$sel:marker:ListRoleTags' :: ListRoleTags -> 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
"ListRoleTags" :: 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
"RoleName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
roleName
      ]

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

-- |
-- Create a value of 'ListRoleTagsResponse' 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', 'listRoleTagsResponse_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', 'listRoleTagsResponse_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', 'listRoleTagsResponse_httpStatus' - The response's http status code.
--
-- 'tags', 'listRoleTagsResponse_tags' - The list of tags that are currently attached to the role. 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.
newListRoleTagsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRoleTagsResponse
newListRoleTagsResponse :: Int -> ListRoleTagsResponse
newListRoleTagsResponse Int
pHttpStatus_ =
  ListRoleTagsResponse' :: Maybe Text -> Maybe Bool -> Int -> [Tag] -> ListRoleTagsResponse
ListRoleTagsResponse'
    { $sel:marker:ListRoleTagsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isTruncated:ListRoleTagsResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRoleTagsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:tags:ListRoleTagsResponse' :: [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.
listRoleTagsResponse_marker :: Lens.Lens' ListRoleTagsResponse (Prelude.Maybe Prelude.Text)
listRoleTagsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListRoleTagsResponse -> f ListRoleTagsResponse
listRoleTagsResponse_marker = (ListRoleTagsResponse -> Maybe Text)
-> (ListRoleTagsResponse -> Maybe Text -> ListRoleTagsResponse)
-> Lens
     ListRoleTagsResponse ListRoleTagsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoleTagsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListRoleTagsResponse' :: ListRoleTagsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListRoleTagsResponse
s@ListRoleTagsResponse' {} Maybe Text
a -> ListRoleTagsResponse
s {$sel:marker:ListRoleTagsResponse' :: Maybe Text
marker = Maybe Text
a} :: ListRoleTagsResponse)

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

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

-- | The list of tags that are currently attached to the role. 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.
listRoleTagsResponse_tags :: Lens.Lens' ListRoleTagsResponse [Tag]
listRoleTagsResponse_tags :: ([Tag] -> f [Tag])
-> ListRoleTagsResponse -> f ListRoleTagsResponse
listRoleTagsResponse_tags = (ListRoleTagsResponse -> [Tag])
-> (ListRoleTagsResponse -> [Tag] -> ListRoleTagsResponse)
-> Lens ListRoleTagsResponse ListRoleTagsResponse [Tag] [Tag]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoleTagsResponse' {[Tag]
tags :: [Tag]
$sel:tags:ListRoleTagsResponse' :: ListRoleTagsResponse -> [Tag]
tags} -> [Tag]
tags) (\s :: ListRoleTagsResponse
s@ListRoleTagsResponse' {} [Tag]
a -> ListRoleTagsResponse
s {$sel:tags:ListRoleTagsResponse' :: [Tag]
tags = [Tag]
a} :: ListRoleTagsResponse) (([Tag] -> f [Tag])
 -> ListRoleTagsResponse -> f ListRoleTagsResponse)
-> (([Tag] -> f [Tag]) -> [Tag] -> f [Tag])
-> ([Tag] -> f [Tag])
-> ListRoleTagsResponse
-> f ListRoleTagsResponse
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 ListRoleTagsResponse