{-# 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.ListPolicyTags
-- 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 customer managed
-- policy. 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.ListPolicyTags
  ( -- * Creating a Request
    ListPolicyTags (..),
    newListPolicyTags,

    -- * Request Lenses
    listPolicyTags_marker,
    listPolicyTags_maxItems,
    listPolicyTags_policyArn,

    -- * Destructuring the Response
    ListPolicyTagsResponse (..),
    newListPolicyTagsResponse,

    -- * Response Lenses
    listPolicyTagsResponse_isTruncated,
    listPolicyTagsResponse_marker,
    listPolicyTagsResponse_httpStatus,
    listPolicyTagsResponse_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:/ 'newListPolicyTags' smart constructor.
data ListPolicyTags = ListPolicyTags'
  { -- | 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.
    ListPolicyTags -> 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.
    ListPolicyTags -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The ARN of the IAM customer managed policy 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: _+=,.\@-
    ListPolicyTags -> Text
policyArn :: Prelude.Text
  }
  deriving (ListPolicyTags -> ListPolicyTags -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPolicyTags -> ListPolicyTags -> Bool
$c/= :: ListPolicyTags -> ListPolicyTags -> Bool
== :: ListPolicyTags -> ListPolicyTags -> Bool
$c== :: ListPolicyTags -> ListPolicyTags -> Bool
Prelude.Eq, ReadPrec [ListPolicyTags]
ReadPrec ListPolicyTags
Int -> ReadS ListPolicyTags
ReadS [ListPolicyTags]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPolicyTags]
$creadListPrec :: ReadPrec [ListPolicyTags]
readPrec :: ReadPrec ListPolicyTags
$creadPrec :: ReadPrec ListPolicyTags
readList :: ReadS [ListPolicyTags]
$creadList :: ReadS [ListPolicyTags]
readsPrec :: Int -> ReadS ListPolicyTags
$creadsPrec :: Int -> ReadS ListPolicyTags
Prelude.Read, Int -> ListPolicyTags -> ShowS
[ListPolicyTags] -> ShowS
ListPolicyTags -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPolicyTags] -> ShowS
$cshowList :: [ListPolicyTags] -> ShowS
show :: ListPolicyTags -> String
$cshow :: ListPolicyTags -> String
showsPrec :: Int -> ListPolicyTags -> ShowS
$cshowsPrec :: Int -> ListPolicyTags -> ShowS
Prelude.Show, forall x. Rep ListPolicyTags x -> ListPolicyTags
forall x. ListPolicyTags -> Rep ListPolicyTags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPolicyTags x -> ListPolicyTags
$cfrom :: forall x. ListPolicyTags -> Rep ListPolicyTags x
Prelude.Generic)

-- |
-- Create a value of 'ListPolicyTags' 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', 'listPolicyTags_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', 'listPolicyTags_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.
--
-- 'policyArn', 'listPolicyTags_policyArn' - The ARN of the IAM customer managed policy 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: _+=,.\@-
newListPolicyTags ::
  -- | 'policyArn'
  Prelude.Text ->
  ListPolicyTags
newListPolicyTags :: Text -> ListPolicyTags
newListPolicyTags Text
pPolicyArn_ =
  ListPolicyTags'
    { $sel:marker:ListPolicyTags' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListPolicyTags' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:policyArn:ListPolicyTags' :: Text
policyArn = Text
pPolicyArn_
    }

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

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

-- | The ARN of the IAM customer managed policy 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: _+=,.\@-
listPolicyTags_policyArn :: Lens.Lens' ListPolicyTags Prelude.Text
listPolicyTags_policyArn :: Lens' ListPolicyTags Text
listPolicyTags_policyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyTags' {Text
policyArn :: Text
$sel:policyArn:ListPolicyTags' :: ListPolicyTags -> Text
policyArn} -> Text
policyArn) (\s :: ListPolicyTags
s@ListPolicyTags' {} Text
a -> ListPolicyTags
s {$sel:policyArn:ListPolicyTags' :: Text
policyArn = Text
a} :: ListPolicyTags)

instance Core.AWSRequest ListPolicyTags where
  type
    AWSResponse ListPolicyTags =
      ListPolicyTagsResponse
  request :: (Service -> Service) -> ListPolicyTags -> Request ListPolicyTags
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 ListPolicyTags
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListPolicyTags)))
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
"ListPolicyTagsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool -> Maybe Text -> Int -> [Tag] -> ListPolicyTagsResponse
ListPolicyTagsResponse'
            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 ListPolicyTags where
  hashWithSalt :: Int -> ListPolicyTags -> Int
hashWithSalt Int
_salt ListPolicyTags' {Maybe Natural
Maybe Text
Text
policyArn :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:policyArn:ListPolicyTags' :: ListPolicyTags -> Text
$sel:maxItems:ListPolicyTags' :: ListPolicyTags -> Maybe Natural
$sel:marker:ListPolicyTags' :: ListPolicyTags -> 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
policyArn

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

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

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

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

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

-- |
-- Create a value of 'ListPolicyTagsResponse' 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', 'listPolicyTagsResponse_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', 'listPolicyTagsResponse_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', 'listPolicyTagsResponse_httpStatus' - The response's http status code.
--
-- 'tags', 'listPolicyTagsResponse_tags' - The list of tags that are currently attached to the IAM customer managed
-- policy. 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.
newListPolicyTagsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPolicyTagsResponse
newListPolicyTagsResponse :: Int -> ListPolicyTagsResponse
newListPolicyTagsResponse Int
pHttpStatus_ =
  ListPolicyTagsResponse'
    { $sel:isTruncated:ListPolicyTagsResponse' :: Maybe Bool
isTruncated =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListPolicyTagsResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPolicyTagsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:tags:ListPolicyTagsResponse' :: [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.
listPolicyTagsResponse_isTruncated :: Lens.Lens' ListPolicyTagsResponse (Prelude.Maybe Prelude.Bool)
listPolicyTagsResponse_isTruncated :: Lens' ListPolicyTagsResponse (Maybe Bool)
listPolicyTagsResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyTagsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListPolicyTagsResponse' :: ListPolicyTagsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListPolicyTagsResponse
s@ListPolicyTagsResponse' {} Maybe Bool
a -> ListPolicyTagsResponse
s {$sel:isTruncated:ListPolicyTagsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListPolicyTagsResponse)

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

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

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