{-# 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.ListGroupPolicies
-- 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 names of the inline policies that are embedded in the
-- specified IAM group.
--
-- An IAM group can also have managed policies attached to it. To list the
-- managed policies that are attached to a group, use
-- ListAttachedGroupPolicies. For more information about policies, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html Managed policies and inline policies>
-- in the /IAM User Guide/.
--
-- You can paginate the results using the @MaxItems@ and @Marker@
-- parameters. If there are no inline policies embedded with the specified
-- group, the operation returns an empty list.
--
-- This operation returns paginated results.
module Amazonka.IAM.ListGroupPolicies
  ( -- * Creating a Request
    ListGroupPolicies (..),
    newListGroupPolicies,

    -- * Request Lenses
    listGroupPolicies_marker,
    listGroupPolicies_maxItems,
    listGroupPolicies_groupName,

    -- * Destructuring the Response
    ListGroupPoliciesResponse (..),
    newListGroupPoliciesResponse,

    -- * Response Lenses
    listGroupPoliciesResponse_isTruncated,
    listGroupPoliciesResponse_marker,
    listGroupPoliciesResponse_httpStatus,
    listGroupPoliciesResponse_policyNames,
  )
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:/ 'newListGroupPolicies' smart constructor.
data ListGroupPolicies = ListGroupPolicies'
  { -- | 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.
    ListGroupPolicies -> 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.
    ListGroupPolicies -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The name of the group to list policies for.
    --
    -- 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: _+=,.\@-
    ListGroupPolicies -> Text
groupName :: Prelude.Text
  }
  deriving (ListGroupPolicies -> ListGroupPolicies -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGroupPolicies -> ListGroupPolicies -> Bool
$c/= :: ListGroupPolicies -> ListGroupPolicies -> Bool
== :: ListGroupPolicies -> ListGroupPolicies -> Bool
$c== :: ListGroupPolicies -> ListGroupPolicies -> Bool
Prelude.Eq, ReadPrec [ListGroupPolicies]
ReadPrec ListGroupPolicies
Int -> ReadS ListGroupPolicies
ReadS [ListGroupPolicies]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGroupPolicies]
$creadListPrec :: ReadPrec [ListGroupPolicies]
readPrec :: ReadPrec ListGroupPolicies
$creadPrec :: ReadPrec ListGroupPolicies
readList :: ReadS [ListGroupPolicies]
$creadList :: ReadS [ListGroupPolicies]
readsPrec :: Int -> ReadS ListGroupPolicies
$creadsPrec :: Int -> ReadS ListGroupPolicies
Prelude.Read, Int -> ListGroupPolicies -> ShowS
[ListGroupPolicies] -> ShowS
ListGroupPolicies -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGroupPolicies] -> ShowS
$cshowList :: [ListGroupPolicies] -> ShowS
show :: ListGroupPolicies -> String
$cshow :: ListGroupPolicies -> String
showsPrec :: Int -> ListGroupPolicies -> ShowS
$cshowsPrec :: Int -> ListGroupPolicies -> ShowS
Prelude.Show, forall x. Rep ListGroupPolicies x -> ListGroupPolicies
forall x. ListGroupPolicies -> Rep ListGroupPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListGroupPolicies x -> ListGroupPolicies
$cfrom :: forall x. ListGroupPolicies -> Rep ListGroupPolicies x
Prelude.Generic)

-- |
-- Create a value of 'ListGroupPolicies' 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', 'listGroupPolicies_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', 'listGroupPolicies_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.
--
-- 'groupName', 'listGroupPolicies_groupName' - The name of the group to list policies for.
--
-- 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: _+=,.\@-
newListGroupPolicies ::
  -- | 'groupName'
  Prelude.Text ->
  ListGroupPolicies
newListGroupPolicies :: Text -> ListGroupPolicies
newListGroupPolicies Text
pGroupName_ =
  ListGroupPolicies'
    { $sel:marker:ListGroupPolicies' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListGroupPolicies' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:groupName:ListGroupPolicies' :: Text
groupName = Text
pGroupName_
    }

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

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

-- | The name of the group to list policies for.
--
-- 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: _+=,.\@-
listGroupPolicies_groupName :: Lens.Lens' ListGroupPolicies Prelude.Text
listGroupPolicies_groupName :: Lens' ListGroupPolicies Text
listGroupPolicies_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGroupPolicies' {Text
groupName :: Text
$sel:groupName:ListGroupPolicies' :: ListGroupPolicies -> Text
groupName} -> Text
groupName) (\s :: ListGroupPolicies
s@ListGroupPolicies' {} Text
a -> ListGroupPolicies
s {$sel:groupName:ListGroupPolicies' :: Text
groupName = Text
a} :: ListGroupPolicies)

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

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

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

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

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

-- | Contains the response to a successful ListGroupPolicies request.
--
-- /See:/ 'newListGroupPoliciesResponse' smart constructor.
data ListGroupPoliciesResponse = ListGroupPoliciesResponse'
  { -- | 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.
    ListGroupPoliciesResponse -> 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.
    ListGroupPoliciesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListGroupPoliciesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of policy names.
    --
    -- 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: _+=,.\@-
    ListGroupPoliciesResponse -> [Text]
policyNames :: [Prelude.Text]
  }
  deriving (ListGroupPoliciesResponse -> ListGroupPoliciesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGroupPoliciesResponse -> ListGroupPoliciesResponse -> Bool
$c/= :: ListGroupPoliciesResponse -> ListGroupPoliciesResponse -> Bool
== :: ListGroupPoliciesResponse -> ListGroupPoliciesResponse -> Bool
$c== :: ListGroupPoliciesResponse -> ListGroupPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [ListGroupPoliciesResponse]
ReadPrec ListGroupPoliciesResponse
Int -> ReadS ListGroupPoliciesResponse
ReadS [ListGroupPoliciesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGroupPoliciesResponse]
$creadListPrec :: ReadPrec [ListGroupPoliciesResponse]
readPrec :: ReadPrec ListGroupPoliciesResponse
$creadPrec :: ReadPrec ListGroupPoliciesResponse
readList :: ReadS [ListGroupPoliciesResponse]
$creadList :: ReadS [ListGroupPoliciesResponse]
readsPrec :: Int -> ReadS ListGroupPoliciesResponse
$creadsPrec :: Int -> ReadS ListGroupPoliciesResponse
Prelude.Read, Int -> ListGroupPoliciesResponse -> ShowS
[ListGroupPoliciesResponse] -> ShowS
ListGroupPoliciesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGroupPoliciesResponse] -> ShowS
$cshowList :: [ListGroupPoliciesResponse] -> ShowS
show :: ListGroupPoliciesResponse -> String
$cshow :: ListGroupPoliciesResponse -> String
showsPrec :: Int -> ListGroupPoliciesResponse -> ShowS
$cshowsPrec :: Int -> ListGroupPoliciesResponse -> ShowS
Prelude.Show, forall x.
Rep ListGroupPoliciesResponse x -> ListGroupPoliciesResponse
forall x.
ListGroupPoliciesResponse -> Rep ListGroupPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListGroupPoliciesResponse x -> ListGroupPoliciesResponse
$cfrom :: forall x.
ListGroupPoliciesResponse -> Rep ListGroupPoliciesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListGroupPoliciesResponse' 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', 'listGroupPoliciesResponse_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', 'listGroupPoliciesResponse_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', 'listGroupPoliciesResponse_httpStatus' - The response's http status code.
--
-- 'policyNames', 'listGroupPoliciesResponse_policyNames' - A list of policy names.
--
-- 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: _+=,.\@-
newListGroupPoliciesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListGroupPoliciesResponse
newListGroupPoliciesResponse :: Int -> ListGroupPoliciesResponse
newListGroupPoliciesResponse Int
pHttpStatus_ =
  ListGroupPoliciesResponse'
    { $sel:isTruncated:ListGroupPoliciesResponse' :: Maybe Bool
isTruncated =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListGroupPoliciesResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListGroupPoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:policyNames:ListGroupPoliciesResponse' :: [Text]
policyNames = 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.
listGroupPoliciesResponse_isTruncated :: Lens.Lens' ListGroupPoliciesResponse (Prelude.Maybe Prelude.Bool)
listGroupPoliciesResponse_isTruncated :: Lens' ListGroupPoliciesResponse (Maybe Bool)
listGroupPoliciesResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGroupPoliciesResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListGroupPoliciesResponse' :: ListGroupPoliciesResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListGroupPoliciesResponse
s@ListGroupPoliciesResponse' {} Maybe Bool
a -> ListGroupPoliciesResponse
s {$sel:isTruncated:ListGroupPoliciesResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListGroupPoliciesResponse)

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

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

-- | A list of policy names.
--
-- 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: _+=,.\@-
listGroupPoliciesResponse_policyNames :: Lens.Lens' ListGroupPoliciesResponse [Prelude.Text]
listGroupPoliciesResponse_policyNames :: Lens' ListGroupPoliciesResponse [Text]
listGroupPoliciesResponse_policyNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGroupPoliciesResponse' {[Text]
policyNames :: [Text]
$sel:policyNames:ListGroupPoliciesResponse' :: ListGroupPoliciesResponse -> [Text]
policyNames} -> [Text]
policyNames) (\s :: ListGroupPoliciesResponse
s@ListGroupPoliciesResponse' {} [Text]
a -> ListGroupPoliciesResponse
s {$sel:policyNames:ListGroupPoliciesResponse' :: [Text]
policyNames = [Text]
a} :: ListGroupPoliciesResponse) 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 ListGroupPoliciesResponse where
  rnf :: ListGroupPoliciesResponse -> ()
rnf ListGroupPoliciesResponse' {Int
[Text]
Maybe Bool
Maybe Text
policyNames :: [Text]
httpStatus :: Int
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:policyNames:ListGroupPoliciesResponse' :: ListGroupPoliciesResponse -> [Text]
$sel:httpStatus:ListGroupPoliciesResponse' :: ListGroupPoliciesResponse -> Int
$sel:marker:ListGroupPoliciesResponse' :: ListGroupPoliciesResponse -> Maybe Text
$sel:isTruncated:ListGroupPoliciesResponse' :: ListGroupPoliciesResponse -> 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 [Text]
policyNames