{-# 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.ListEntitiesForPolicy
-- 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 all IAM users, groups, and roles that the specified managed policy
-- is attached to.
--
-- You can use the optional @EntityFilter@ parameter to limit the results
-- to a particular type of entity (users, groups, or roles). For example,
-- to list only the roles that are attached to the specified policy, set
-- @EntityFilter@ to @Role@.
--
-- You can paginate the results using the @MaxItems@ and @Marker@
-- parameters.
--
-- This operation returns paginated results.
module Amazonka.IAM.ListEntitiesForPolicy
  ( -- * Creating a Request
    ListEntitiesForPolicy (..),
    newListEntitiesForPolicy,

    -- * Request Lenses
    listEntitiesForPolicy_entityFilter,
    listEntitiesForPolicy_marker,
    listEntitiesForPolicy_maxItems,
    listEntitiesForPolicy_pathPrefix,
    listEntitiesForPolicy_policyUsageFilter,
    listEntitiesForPolicy_policyArn,

    -- * Destructuring the Response
    ListEntitiesForPolicyResponse (..),
    newListEntitiesForPolicyResponse,

    -- * Response Lenses
    listEntitiesForPolicyResponse_isTruncated,
    listEntitiesForPolicyResponse_marker,
    listEntitiesForPolicyResponse_policyGroups,
    listEntitiesForPolicyResponse_policyRoles,
    listEntitiesForPolicyResponse_policyUsers,
    listEntitiesForPolicyResponse_httpStatus,
  )
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:/ 'newListEntitiesForPolicy' smart constructor.
data ListEntitiesForPolicy = ListEntitiesForPolicy'
  { -- | The entity type to use for filtering the results.
    --
    -- For example, when @EntityFilter@ is @Role@, only the roles that are
    -- attached to the specified policy are returned. This parameter is
    -- optional. If it is not included, all attached entities (users, groups,
    -- and roles) are returned. The argument for this parameter must be one of
    -- the valid values listed below.
    ListEntitiesForPolicy -> Maybe EntityType
entityFilter :: Prelude.Maybe EntityType,
    -- | 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.
    ListEntitiesForPolicy -> 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.
    ListEntitiesForPolicy -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The path prefix for filtering the results. This parameter is optional.
    -- If it is not included, it defaults to a slash (\/), listing all
    -- entities.
    --
    -- This parameter allows (through its
    -- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
    -- consisting of either a forward slash (\/) by itself or a string that
    -- must begin and end with forward slashes. In addition, it can contain any
    -- ASCII character from the ! (@\\u0021@) through the DEL character
    -- (@\\u007F@), including most punctuation characters, digits, and upper
    -- and lowercased letters.
    ListEntitiesForPolicy -> Maybe Text
pathPrefix :: Prelude.Maybe Prelude.Text,
    -- | The policy usage method to use for filtering the results.
    --
    -- To list only permissions policies,
    -- set @PolicyUsageFilter@ to @PermissionsPolicy@. To list only the
    -- policies used to set permissions boundaries, set the value
    -- to @PermissionsBoundary@.
    --
    -- This parameter is optional. If it is not included, all policies are
    -- returned.
    ListEntitiesForPolicy -> Maybe PolicyUsageType
policyUsageFilter :: Prelude.Maybe PolicyUsageType,
    -- | The Amazon Resource Name (ARN) of the IAM policy for which you want the
    -- versions.
    --
    -- For more information about ARNs, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
    -- in the /Amazon Web Services General Reference/.
    ListEntitiesForPolicy -> Text
policyArn :: Prelude.Text
  }
  deriving (ListEntitiesForPolicy -> ListEntitiesForPolicy -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEntitiesForPolicy -> ListEntitiesForPolicy -> Bool
$c/= :: ListEntitiesForPolicy -> ListEntitiesForPolicy -> Bool
== :: ListEntitiesForPolicy -> ListEntitiesForPolicy -> Bool
$c== :: ListEntitiesForPolicy -> ListEntitiesForPolicy -> Bool
Prelude.Eq, ReadPrec [ListEntitiesForPolicy]
ReadPrec ListEntitiesForPolicy
Int -> ReadS ListEntitiesForPolicy
ReadS [ListEntitiesForPolicy]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEntitiesForPolicy]
$creadListPrec :: ReadPrec [ListEntitiesForPolicy]
readPrec :: ReadPrec ListEntitiesForPolicy
$creadPrec :: ReadPrec ListEntitiesForPolicy
readList :: ReadS [ListEntitiesForPolicy]
$creadList :: ReadS [ListEntitiesForPolicy]
readsPrec :: Int -> ReadS ListEntitiesForPolicy
$creadsPrec :: Int -> ReadS ListEntitiesForPolicy
Prelude.Read, Int -> ListEntitiesForPolicy -> ShowS
[ListEntitiesForPolicy] -> ShowS
ListEntitiesForPolicy -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEntitiesForPolicy] -> ShowS
$cshowList :: [ListEntitiesForPolicy] -> ShowS
show :: ListEntitiesForPolicy -> String
$cshow :: ListEntitiesForPolicy -> String
showsPrec :: Int -> ListEntitiesForPolicy -> ShowS
$cshowsPrec :: Int -> ListEntitiesForPolicy -> ShowS
Prelude.Show, forall x. Rep ListEntitiesForPolicy x -> ListEntitiesForPolicy
forall x. ListEntitiesForPolicy -> Rep ListEntitiesForPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEntitiesForPolicy x -> ListEntitiesForPolicy
$cfrom :: forall x. ListEntitiesForPolicy -> Rep ListEntitiesForPolicy x
Prelude.Generic)

-- |
-- Create a value of 'ListEntitiesForPolicy' 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:
--
-- 'entityFilter', 'listEntitiesForPolicy_entityFilter' - The entity type to use for filtering the results.
--
-- For example, when @EntityFilter@ is @Role@, only the roles that are
-- attached to the specified policy are returned. This parameter is
-- optional. If it is not included, all attached entities (users, groups,
-- and roles) are returned. The argument for this parameter must be one of
-- the valid values listed below.
--
-- 'marker', 'listEntitiesForPolicy_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', 'listEntitiesForPolicy_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.
--
-- 'pathPrefix', 'listEntitiesForPolicy_pathPrefix' - The path prefix for filtering the results. This parameter is optional.
-- If it is not included, it defaults to a slash (\/), listing all
-- entities.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of either a forward slash (\/) by itself or a string that
-- must begin and end with forward slashes. In addition, it can contain any
-- ASCII character from the ! (@\\u0021@) through the DEL character
-- (@\\u007F@), including most punctuation characters, digits, and upper
-- and lowercased letters.
--
-- 'policyUsageFilter', 'listEntitiesForPolicy_policyUsageFilter' - The policy usage method to use for filtering the results.
--
-- To list only permissions policies,
-- set @PolicyUsageFilter@ to @PermissionsPolicy@. To list only the
-- policies used to set permissions boundaries, set the value
-- to @PermissionsBoundary@.
--
-- This parameter is optional. If it is not included, all policies are
-- returned.
--
-- 'policyArn', 'listEntitiesForPolicy_policyArn' - The Amazon Resource Name (ARN) of the IAM policy for which you want the
-- versions.
--
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /Amazon Web Services General Reference/.
newListEntitiesForPolicy ::
  -- | 'policyArn'
  Prelude.Text ->
  ListEntitiesForPolicy
newListEntitiesForPolicy :: Text -> ListEntitiesForPolicy
newListEntitiesForPolicy Text
pPolicyArn_ =
  ListEntitiesForPolicy'
    { $sel:entityFilter:ListEntitiesForPolicy' :: Maybe EntityType
entityFilter =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListEntitiesForPolicy' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListEntitiesForPolicy' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:pathPrefix:ListEntitiesForPolicy' :: Maybe Text
pathPrefix = forall a. Maybe a
Prelude.Nothing,
      $sel:policyUsageFilter:ListEntitiesForPolicy' :: Maybe PolicyUsageType
policyUsageFilter = forall a. Maybe a
Prelude.Nothing,
      $sel:policyArn:ListEntitiesForPolicy' :: Text
policyArn = Text
pPolicyArn_
    }

-- | The entity type to use for filtering the results.
--
-- For example, when @EntityFilter@ is @Role@, only the roles that are
-- attached to the specified policy are returned. This parameter is
-- optional. If it is not included, all attached entities (users, groups,
-- and roles) are returned. The argument for this parameter must be one of
-- the valid values listed below.
listEntitiesForPolicy_entityFilter :: Lens.Lens' ListEntitiesForPolicy (Prelude.Maybe EntityType)
listEntitiesForPolicy_entityFilter :: Lens' ListEntitiesForPolicy (Maybe EntityType)
listEntitiesForPolicy_entityFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesForPolicy' {Maybe EntityType
entityFilter :: Maybe EntityType
$sel:entityFilter:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe EntityType
entityFilter} -> Maybe EntityType
entityFilter) (\s :: ListEntitiesForPolicy
s@ListEntitiesForPolicy' {} Maybe EntityType
a -> ListEntitiesForPolicy
s {$sel:entityFilter:ListEntitiesForPolicy' :: Maybe EntityType
entityFilter = Maybe EntityType
a} :: ListEntitiesForPolicy)

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

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

-- | The path prefix for filtering the results. This parameter is optional.
-- If it is not included, it defaults to a slash (\/), listing all
-- entities.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of either a forward slash (\/) by itself or a string that
-- must begin and end with forward slashes. In addition, it can contain any
-- ASCII character from the ! (@\\u0021@) through the DEL character
-- (@\\u007F@), including most punctuation characters, digits, and upper
-- and lowercased letters.
listEntitiesForPolicy_pathPrefix :: Lens.Lens' ListEntitiesForPolicy (Prelude.Maybe Prelude.Text)
listEntitiesForPolicy_pathPrefix :: Lens' ListEntitiesForPolicy (Maybe Text)
listEntitiesForPolicy_pathPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesForPolicy' {Maybe Text
pathPrefix :: Maybe Text
$sel:pathPrefix:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Text
pathPrefix} -> Maybe Text
pathPrefix) (\s :: ListEntitiesForPolicy
s@ListEntitiesForPolicy' {} Maybe Text
a -> ListEntitiesForPolicy
s {$sel:pathPrefix:ListEntitiesForPolicy' :: Maybe Text
pathPrefix = Maybe Text
a} :: ListEntitiesForPolicy)

-- | The policy usage method to use for filtering the results.
--
-- To list only permissions policies,
-- set @PolicyUsageFilter@ to @PermissionsPolicy@. To list only the
-- policies used to set permissions boundaries, set the value
-- to @PermissionsBoundary@.
--
-- This parameter is optional. If it is not included, all policies are
-- returned.
listEntitiesForPolicy_policyUsageFilter :: Lens.Lens' ListEntitiesForPolicy (Prelude.Maybe PolicyUsageType)
listEntitiesForPolicy_policyUsageFilter :: Lens' ListEntitiesForPolicy (Maybe PolicyUsageType)
listEntitiesForPolicy_policyUsageFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesForPolicy' {Maybe PolicyUsageType
policyUsageFilter :: Maybe PolicyUsageType
$sel:policyUsageFilter:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe PolicyUsageType
policyUsageFilter} -> Maybe PolicyUsageType
policyUsageFilter) (\s :: ListEntitiesForPolicy
s@ListEntitiesForPolicy' {} Maybe PolicyUsageType
a -> ListEntitiesForPolicy
s {$sel:policyUsageFilter:ListEntitiesForPolicy' :: Maybe PolicyUsageType
policyUsageFilter = Maybe PolicyUsageType
a} :: ListEntitiesForPolicy)

-- | The Amazon Resource Name (ARN) of the IAM policy for which you want the
-- versions.
--
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /Amazon Web Services General Reference/.
listEntitiesForPolicy_policyArn :: Lens.Lens' ListEntitiesForPolicy Prelude.Text
listEntitiesForPolicy_policyArn :: Lens' ListEntitiesForPolicy Text
listEntitiesForPolicy_policyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesForPolicy' {Text
policyArn :: Text
$sel:policyArn:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Text
policyArn} -> Text
policyArn) (\s :: ListEntitiesForPolicy
s@ListEntitiesForPolicy' {} Text
a -> ListEntitiesForPolicy
s {$sel:policyArn:ListEntitiesForPolicy' :: Text
policyArn = Text
a} :: ListEntitiesForPolicy)

instance Core.AWSPager ListEntitiesForPolicy where
  page :: ListEntitiesForPolicy
-> AWSResponse ListEntitiesForPolicy -> Maybe ListEntitiesForPolicy
page ListEntitiesForPolicy
rq AWSResponse ListEntitiesForPolicy
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEntitiesForPolicy
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListEntitiesForPolicyResponse (Maybe Bool)
listEntitiesForPolicyResponse_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 ListEntitiesForPolicy
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListEntitiesForPolicyResponse (Maybe Text)
listEntitiesForPolicyResponse_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.$ ListEntitiesForPolicy
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListEntitiesForPolicy (Maybe Text)
listEntitiesForPolicy_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListEntitiesForPolicy
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListEntitiesForPolicyResponse (Maybe Text)
listEntitiesForPolicyResponse_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 ListEntitiesForPolicy where
  type
    AWSResponse ListEntitiesForPolicy =
      ListEntitiesForPolicyResponse
  request :: (Service -> Service)
-> ListEntitiesForPolicy -> Request ListEntitiesForPolicy
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 ListEntitiesForPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEntitiesForPolicy)))
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
"ListEntitiesForPolicyResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool
-> Maybe Text
-> Maybe [PolicyGroup]
-> Maybe [PolicyRole]
-> Maybe [PolicyUser]
-> Int
-> ListEntitiesForPolicyResponse
ListEntitiesForPolicyResponse'
            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.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"PolicyGroups"
                            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 (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            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
"PolicyRoles"
                            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 (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            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
"PolicyUsers"
                            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 (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            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))
      )

instance Prelude.Hashable ListEntitiesForPolicy where
  hashWithSalt :: Int -> ListEntitiesForPolicy -> Int
hashWithSalt Int
_salt ListEntitiesForPolicy' {Maybe Natural
Maybe Text
Maybe EntityType
Maybe PolicyUsageType
Text
policyArn :: Text
policyUsageFilter :: Maybe PolicyUsageType
pathPrefix :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
entityFilter :: Maybe EntityType
$sel:policyArn:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Text
$sel:policyUsageFilter:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe PolicyUsageType
$sel:pathPrefix:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Text
$sel:maxItems:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Natural
$sel:marker:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Text
$sel:entityFilter:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe EntityType
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EntityType
entityFilter
      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` Maybe Text
pathPrefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PolicyUsageType
policyUsageFilter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
policyArn

instance Prelude.NFData ListEntitiesForPolicy where
  rnf :: ListEntitiesForPolicy -> ()
rnf ListEntitiesForPolicy' {Maybe Natural
Maybe Text
Maybe EntityType
Maybe PolicyUsageType
Text
policyArn :: Text
policyUsageFilter :: Maybe PolicyUsageType
pathPrefix :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
entityFilter :: Maybe EntityType
$sel:policyArn:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Text
$sel:policyUsageFilter:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe PolicyUsageType
$sel:pathPrefix:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Text
$sel:maxItems:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Natural
$sel:marker:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Text
$sel:entityFilter:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe EntityType
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe EntityType
entityFilter
      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 Maybe Natural
maxItems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pathPrefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PolicyUsageType
policyUsageFilter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
policyArn

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

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

instance Data.ToQuery ListEntitiesForPolicy where
  toQuery :: ListEntitiesForPolicy -> QueryString
toQuery ListEntitiesForPolicy' {Maybe Natural
Maybe Text
Maybe EntityType
Maybe PolicyUsageType
Text
policyArn :: Text
policyUsageFilter :: Maybe PolicyUsageType
pathPrefix :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
entityFilter :: Maybe EntityType
$sel:policyArn:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Text
$sel:policyUsageFilter:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe PolicyUsageType
$sel:pathPrefix:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Text
$sel:maxItems:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Natural
$sel:marker:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe Text
$sel:entityFilter:ListEntitiesForPolicy' :: ListEntitiesForPolicy -> Maybe EntityType
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListEntitiesForPolicy" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"EntityFilter" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe EntityType
entityFilter,
        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
"PathPrefix" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
pathPrefix,
        ByteString
"PolicyUsageFilter" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe PolicyUsageType
policyUsageFilter,
        ByteString
"PolicyArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
policyArn
      ]

-- | Contains the response to a successful ListEntitiesForPolicy request.
--
-- /See:/ 'newListEntitiesForPolicyResponse' smart constructor.
data ListEntitiesForPolicyResponse = ListEntitiesForPolicyResponse'
  { -- | 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.
    ListEntitiesForPolicyResponse -> 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.
    ListEntitiesForPolicyResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A list of IAM groups that the policy is attached to.
    ListEntitiesForPolicyResponse -> Maybe [PolicyGroup]
policyGroups :: Prelude.Maybe [PolicyGroup],
    -- | A list of IAM roles that the policy is attached to.
    ListEntitiesForPolicyResponse -> Maybe [PolicyRole]
policyRoles :: Prelude.Maybe [PolicyRole],
    -- | A list of IAM users that the policy is attached to.
    ListEntitiesForPolicyResponse -> Maybe [PolicyUser]
policyUsers :: Prelude.Maybe [PolicyUser],
    -- | The response's http status code.
    ListEntitiesForPolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListEntitiesForPolicyResponse
-> ListEntitiesForPolicyResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEntitiesForPolicyResponse
-> ListEntitiesForPolicyResponse -> Bool
$c/= :: ListEntitiesForPolicyResponse
-> ListEntitiesForPolicyResponse -> Bool
== :: ListEntitiesForPolicyResponse
-> ListEntitiesForPolicyResponse -> Bool
$c== :: ListEntitiesForPolicyResponse
-> ListEntitiesForPolicyResponse -> Bool
Prelude.Eq, ReadPrec [ListEntitiesForPolicyResponse]
ReadPrec ListEntitiesForPolicyResponse
Int -> ReadS ListEntitiesForPolicyResponse
ReadS [ListEntitiesForPolicyResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEntitiesForPolicyResponse]
$creadListPrec :: ReadPrec [ListEntitiesForPolicyResponse]
readPrec :: ReadPrec ListEntitiesForPolicyResponse
$creadPrec :: ReadPrec ListEntitiesForPolicyResponse
readList :: ReadS [ListEntitiesForPolicyResponse]
$creadList :: ReadS [ListEntitiesForPolicyResponse]
readsPrec :: Int -> ReadS ListEntitiesForPolicyResponse
$creadsPrec :: Int -> ReadS ListEntitiesForPolicyResponse
Prelude.Read, Int -> ListEntitiesForPolicyResponse -> ShowS
[ListEntitiesForPolicyResponse] -> ShowS
ListEntitiesForPolicyResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEntitiesForPolicyResponse] -> ShowS
$cshowList :: [ListEntitiesForPolicyResponse] -> ShowS
show :: ListEntitiesForPolicyResponse -> String
$cshow :: ListEntitiesForPolicyResponse -> String
showsPrec :: Int -> ListEntitiesForPolicyResponse -> ShowS
$cshowsPrec :: Int -> ListEntitiesForPolicyResponse -> ShowS
Prelude.Show, forall x.
Rep ListEntitiesForPolicyResponse x
-> ListEntitiesForPolicyResponse
forall x.
ListEntitiesForPolicyResponse
-> Rep ListEntitiesForPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListEntitiesForPolicyResponse x
-> ListEntitiesForPolicyResponse
$cfrom :: forall x.
ListEntitiesForPolicyResponse
-> Rep ListEntitiesForPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListEntitiesForPolicyResponse' 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', 'listEntitiesForPolicyResponse_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', 'listEntitiesForPolicyResponse_marker' - When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
--
-- 'policyGroups', 'listEntitiesForPolicyResponse_policyGroups' - A list of IAM groups that the policy is attached to.
--
-- 'policyRoles', 'listEntitiesForPolicyResponse_policyRoles' - A list of IAM roles that the policy is attached to.
--
-- 'policyUsers', 'listEntitiesForPolicyResponse_policyUsers' - A list of IAM users that the policy is attached to.
--
-- 'httpStatus', 'listEntitiesForPolicyResponse_httpStatus' - The response's http status code.
newListEntitiesForPolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListEntitiesForPolicyResponse
newListEntitiesForPolicyResponse :: Int -> ListEntitiesForPolicyResponse
newListEntitiesForPolicyResponse Int
pHttpStatus_ =
  ListEntitiesForPolicyResponse'
    { $sel:isTruncated:ListEntitiesForPolicyResponse' :: Maybe Bool
isTruncated =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListEntitiesForPolicyResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:policyGroups:ListEntitiesForPolicyResponse' :: Maybe [PolicyGroup]
policyGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:policyRoles:ListEntitiesForPolicyResponse' :: Maybe [PolicyRole]
policyRoles = forall a. Maybe a
Prelude.Nothing,
      $sel:policyUsers:ListEntitiesForPolicyResponse' :: Maybe [PolicyUser]
policyUsers = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListEntitiesForPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | A list of IAM groups that the policy is attached to.
listEntitiesForPolicyResponse_policyGroups :: Lens.Lens' ListEntitiesForPolicyResponse (Prelude.Maybe [PolicyGroup])
listEntitiesForPolicyResponse_policyGroups :: Lens' ListEntitiesForPolicyResponse (Maybe [PolicyGroup])
listEntitiesForPolicyResponse_policyGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesForPolicyResponse' {Maybe [PolicyGroup]
policyGroups :: Maybe [PolicyGroup]
$sel:policyGroups:ListEntitiesForPolicyResponse' :: ListEntitiesForPolicyResponse -> Maybe [PolicyGroup]
policyGroups} -> Maybe [PolicyGroup]
policyGroups) (\s :: ListEntitiesForPolicyResponse
s@ListEntitiesForPolicyResponse' {} Maybe [PolicyGroup]
a -> ListEntitiesForPolicyResponse
s {$sel:policyGroups:ListEntitiesForPolicyResponse' :: Maybe [PolicyGroup]
policyGroups = Maybe [PolicyGroup]
a} :: ListEntitiesForPolicyResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of IAM roles that the policy is attached to.
listEntitiesForPolicyResponse_policyRoles :: Lens.Lens' ListEntitiesForPolicyResponse (Prelude.Maybe [PolicyRole])
listEntitiesForPolicyResponse_policyRoles :: Lens' ListEntitiesForPolicyResponse (Maybe [PolicyRole])
listEntitiesForPolicyResponse_policyRoles = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesForPolicyResponse' {Maybe [PolicyRole]
policyRoles :: Maybe [PolicyRole]
$sel:policyRoles:ListEntitiesForPolicyResponse' :: ListEntitiesForPolicyResponse -> Maybe [PolicyRole]
policyRoles} -> Maybe [PolicyRole]
policyRoles) (\s :: ListEntitiesForPolicyResponse
s@ListEntitiesForPolicyResponse' {} Maybe [PolicyRole]
a -> ListEntitiesForPolicyResponse
s {$sel:policyRoles:ListEntitiesForPolicyResponse' :: Maybe [PolicyRole]
policyRoles = Maybe [PolicyRole]
a} :: ListEntitiesForPolicyResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of IAM users that the policy is attached to.
listEntitiesForPolicyResponse_policyUsers :: Lens.Lens' ListEntitiesForPolicyResponse (Prelude.Maybe [PolicyUser])
listEntitiesForPolicyResponse_policyUsers :: Lens' ListEntitiesForPolicyResponse (Maybe [PolicyUser])
listEntitiesForPolicyResponse_policyUsers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesForPolicyResponse' {Maybe [PolicyUser]
policyUsers :: Maybe [PolicyUser]
$sel:policyUsers:ListEntitiesForPolicyResponse' :: ListEntitiesForPolicyResponse -> Maybe [PolicyUser]
policyUsers} -> Maybe [PolicyUser]
policyUsers) (\s :: ListEntitiesForPolicyResponse
s@ListEntitiesForPolicyResponse' {} Maybe [PolicyUser]
a -> ListEntitiesForPolicyResponse
s {$sel:policyUsers:ListEntitiesForPolicyResponse' :: Maybe [PolicyUser]
policyUsers = Maybe [PolicyUser]
a} :: ListEntitiesForPolicyResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListEntitiesForPolicyResponse where
  rnf :: ListEntitiesForPolicyResponse -> ()
rnf ListEntitiesForPolicyResponse' {Int
Maybe Bool
Maybe [PolicyGroup]
Maybe [PolicyRole]
Maybe [PolicyUser]
Maybe Text
httpStatus :: Int
policyUsers :: Maybe [PolicyUser]
policyRoles :: Maybe [PolicyRole]
policyGroups :: Maybe [PolicyGroup]
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:httpStatus:ListEntitiesForPolicyResponse' :: ListEntitiesForPolicyResponse -> Int
$sel:policyUsers:ListEntitiesForPolicyResponse' :: ListEntitiesForPolicyResponse -> Maybe [PolicyUser]
$sel:policyRoles:ListEntitiesForPolicyResponse' :: ListEntitiesForPolicyResponse -> Maybe [PolicyRole]
$sel:policyGroups:ListEntitiesForPolicyResponse' :: ListEntitiesForPolicyResponse -> Maybe [PolicyGroup]
$sel:marker:ListEntitiesForPolicyResponse' :: ListEntitiesForPolicyResponse -> Maybe Text
$sel:isTruncated:ListEntitiesForPolicyResponse' :: ListEntitiesForPolicyResponse -> 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 Maybe [PolicyGroup]
policyGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PolicyRole]
policyRoles
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PolicyUser]
policyUsers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus