{-# 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-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 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_isTruncated,
    listRoleTagsResponse_marker,
    listRoleTagsResponse_httpStatus,
    listRoleTagsResponse_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:/ '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
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]
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
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. 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'
    { $sel:marker:ListRoleTags' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListRoleTags' :: Maybe Natural
maxItems = 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 :: Lens' ListRoleTags (Maybe Text)
listRoleTags_marker = 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 :: Lens' ListRoleTags (Maybe Natural)
listRoleTags_maxItems = 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 :: Lens' ListRoleTags Text
listRoleTags_roleName = 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 :: (Service -> Service) -> ListRoleTags -> Request ListRoleTags
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 ListRoleTags
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRoleTags)))
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
"ListRoleTagsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool -> Maybe Text -> Int -> [Tag] -> ListRoleTagsResponse
ListRoleTagsResponse'
            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 ListRoleTags where
  hashWithSalt :: Int -> ListRoleTags -> Int
hashWithSalt Int
_salt 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
..} =
    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
roleName

instance Prelude.NFData ListRoleTags where
  rnf :: ListRoleTags -> ()
rnf 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
..} =
    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
roleName

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

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

instance Data.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
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListRoleTags" :: 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
"RoleName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
roleName
      ]

-- | /See:/ 'newListRoleTagsResponse' smart constructor.
data ListRoleTagsResponse = 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 -> 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.
    ListRoleTagsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | 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
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]
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
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. 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:
--
-- '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.
--
-- '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.
--
-- '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'
    { $sel:isTruncated:ListRoleTagsResponse' :: Maybe Bool
isTruncated =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListRoleTagsResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRoleTagsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:tags:ListRoleTagsResponse' :: [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.
listRoleTagsResponse_isTruncated :: Lens.Lens' ListRoleTagsResponse (Prelude.Maybe Prelude.Bool)
listRoleTagsResponse_isTruncated :: Lens' ListRoleTagsResponse (Maybe Bool)
listRoleTagsResponse_isTruncated = 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)

-- | 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 :: Lens' ListRoleTagsResponse (Maybe Text)
listRoleTagsResponse_marker = 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)

-- | The response's http status code.
listRoleTagsResponse_httpStatus :: Lens.Lens' ListRoleTagsResponse Prelude.Int
listRoleTagsResponse_httpStatus :: Lens' ListRoleTagsResponse Int
listRoleTagsResponse_httpStatus = 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 :: Lens' ListRoleTagsResponse [Tag]
listRoleTagsResponse_tags = 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) 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 ListRoleTagsResponse where
  rnf :: ListRoleTagsResponse -> ()
rnf ListRoleTagsResponse' {Int
[Tag]
Maybe Bool
Maybe Text
tags :: [Tag]
httpStatus :: Int
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:tags:ListRoleTagsResponse' :: ListRoleTagsResponse -> [Tag]
$sel:httpStatus:ListRoleTagsResponse' :: ListRoleTagsResponse -> Int
$sel:marker:ListRoleTagsResponse' :: ListRoleTagsResponse -> Maybe Text
$sel:isTruncated:ListRoleTagsResponse' :: ListRoleTagsResponse -> 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