{-# 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.QuickSight.ListIAMPolicyAssignments
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists IAMpolicy assignments in the current Amazon QuickSight account.
module Amazonka.QuickSight.ListIAMPolicyAssignments
  ( -- * Creating a Request
    ListIAMPolicyAssignments (..),
    newListIAMPolicyAssignments,

    -- * Request Lenses
    listIAMPolicyAssignments_nextToken,
    listIAMPolicyAssignments_assignmentStatus,
    listIAMPolicyAssignments_maxResults,
    listIAMPolicyAssignments_awsAccountId,
    listIAMPolicyAssignments_namespace,

    -- * Destructuring the Response
    ListIAMPolicyAssignmentsResponse (..),
    newListIAMPolicyAssignmentsResponse,

    -- * Response Lenses
    listIAMPolicyAssignmentsResponse_requestId,
    listIAMPolicyAssignmentsResponse_nextToken,
    listIAMPolicyAssignmentsResponse_iAMPolicyAssignments,
    listIAMPolicyAssignmentsResponse_status,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListIAMPolicyAssignments' smart constructor.
data ListIAMPolicyAssignments = ListIAMPolicyAssignments'
  { -- | The token for the next set of results, or null if there are no more
    -- results.
    ListIAMPolicyAssignments -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The status of the assignments.
    ListIAMPolicyAssignments -> Maybe AssignmentStatus
assignmentStatus :: Prelude.Maybe AssignmentStatus,
    -- | The maximum number of results to be returned per request.
    ListIAMPolicyAssignments -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the Amazon Web Services account that contains these IAMpolicy
    -- assignments.
    ListIAMPolicyAssignments -> Text
awsAccountId :: Prelude.Text,
    -- | The namespace for the assignments.
    ListIAMPolicyAssignments -> Text
namespace :: Prelude.Text
  }
  deriving (ListIAMPolicyAssignments -> ListIAMPolicyAssignments -> Bool
(ListIAMPolicyAssignments -> ListIAMPolicyAssignments -> Bool)
-> (ListIAMPolicyAssignments -> ListIAMPolicyAssignments -> Bool)
-> Eq ListIAMPolicyAssignments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIAMPolicyAssignments -> ListIAMPolicyAssignments -> Bool
$c/= :: ListIAMPolicyAssignments -> ListIAMPolicyAssignments -> Bool
== :: ListIAMPolicyAssignments -> ListIAMPolicyAssignments -> Bool
$c== :: ListIAMPolicyAssignments -> ListIAMPolicyAssignments -> Bool
Prelude.Eq, ReadPrec [ListIAMPolicyAssignments]
ReadPrec ListIAMPolicyAssignments
Int -> ReadS ListIAMPolicyAssignments
ReadS [ListIAMPolicyAssignments]
(Int -> ReadS ListIAMPolicyAssignments)
-> ReadS [ListIAMPolicyAssignments]
-> ReadPrec ListIAMPolicyAssignments
-> ReadPrec [ListIAMPolicyAssignments]
-> Read ListIAMPolicyAssignments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIAMPolicyAssignments]
$creadListPrec :: ReadPrec [ListIAMPolicyAssignments]
readPrec :: ReadPrec ListIAMPolicyAssignments
$creadPrec :: ReadPrec ListIAMPolicyAssignments
readList :: ReadS [ListIAMPolicyAssignments]
$creadList :: ReadS [ListIAMPolicyAssignments]
readsPrec :: Int -> ReadS ListIAMPolicyAssignments
$creadsPrec :: Int -> ReadS ListIAMPolicyAssignments
Prelude.Read, Int -> ListIAMPolicyAssignments -> ShowS
[ListIAMPolicyAssignments] -> ShowS
ListIAMPolicyAssignments -> String
(Int -> ListIAMPolicyAssignments -> ShowS)
-> (ListIAMPolicyAssignments -> String)
-> ([ListIAMPolicyAssignments] -> ShowS)
-> Show ListIAMPolicyAssignments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIAMPolicyAssignments] -> ShowS
$cshowList :: [ListIAMPolicyAssignments] -> ShowS
show :: ListIAMPolicyAssignments -> String
$cshow :: ListIAMPolicyAssignments -> String
showsPrec :: Int -> ListIAMPolicyAssignments -> ShowS
$cshowsPrec :: Int -> ListIAMPolicyAssignments -> ShowS
Prelude.Show, (forall x.
 ListIAMPolicyAssignments -> Rep ListIAMPolicyAssignments x)
-> (forall x.
    Rep ListIAMPolicyAssignments x -> ListIAMPolicyAssignments)
-> Generic ListIAMPolicyAssignments
forall x.
Rep ListIAMPolicyAssignments x -> ListIAMPolicyAssignments
forall x.
ListIAMPolicyAssignments -> Rep ListIAMPolicyAssignments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListIAMPolicyAssignments x -> ListIAMPolicyAssignments
$cfrom :: forall x.
ListIAMPolicyAssignments -> Rep ListIAMPolicyAssignments x
Prelude.Generic)

-- |
-- Create a value of 'ListIAMPolicyAssignments' 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:
--
-- 'nextToken', 'listIAMPolicyAssignments_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'assignmentStatus', 'listIAMPolicyAssignments_assignmentStatus' - The status of the assignments.
--
-- 'maxResults', 'listIAMPolicyAssignments_maxResults' - The maximum number of results to be returned per request.
--
-- 'awsAccountId', 'listIAMPolicyAssignments_awsAccountId' - The ID of the Amazon Web Services account that contains these IAMpolicy
-- assignments.
--
-- 'namespace', 'listIAMPolicyAssignments_namespace' - The namespace for the assignments.
newListIAMPolicyAssignments ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'namespace'
  Prelude.Text ->
  ListIAMPolicyAssignments
newListIAMPolicyAssignments :: Text -> Text -> ListIAMPolicyAssignments
newListIAMPolicyAssignments
  Text
pAwsAccountId_
  Text
pNamespace_ =
    ListIAMPolicyAssignments' :: Maybe Text
-> Maybe AssignmentStatus
-> Maybe Natural
-> Text
-> Text
-> ListIAMPolicyAssignments
ListIAMPolicyAssignments'
      { $sel:nextToken:ListIAMPolicyAssignments' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:assignmentStatus:ListIAMPolicyAssignments' :: Maybe AssignmentStatus
assignmentStatus = Maybe AssignmentStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:ListIAMPolicyAssignments' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:awsAccountId:ListIAMPolicyAssignments' :: Text
awsAccountId = Text
pAwsAccountId_,
        $sel:namespace:ListIAMPolicyAssignments' :: Text
namespace = Text
pNamespace_
      }

-- | The token for the next set of results, or null if there are no more
-- results.
listIAMPolicyAssignments_nextToken :: Lens.Lens' ListIAMPolicyAssignments (Prelude.Maybe Prelude.Text)
listIAMPolicyAssignments_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListIAMPolicyAssignments -> f ListIAMPolicyAssignments
listIAMPolicyAssignments_nextToken = (ListIAMPolicyAssignments -> Maybe Text)
-> (ListIAMPolicyAssignments
    -> Maybe Text -> ListIAMPolicyAssignments)
-> Lens
     ListIAMPolicyAssignments
     ListIAMPolicyAssignments
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIAMPolicyAssignments' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIAMPolicyAssignments
s@ListIAMPolicyAssignments' {} Maybe Text
a -> ListIAMPolicyAssignments
s {$sel:nextToken:ListIAMPolicyAssignments' :: Maybe Text
nextToken = Maybe Text
a} :: ListIAMPolicyAssignments)

-- | The status of the assignments.
listIAMPolicyAssignments_assignmentStatus :: Lens.Lens' ListIAMPolicyAssignments (Prelude.Maybe AssignmentStatus)
listIAMPolicyAssignments_assignmentStatus :: (Maybe AssignmentStatus -> f (Maybe AssignmentStatus))
-> ListIAMPolicyAssignments -> f ListIAMPolicyAssignments
listIAMPolicyAssignments_assignmentStatus = (ListIAMPolicyAssignments -> Maybe AssignmentStatus)
-> (ListIAMPolicyAssignments
    -> Maybe AssignmentStatus -> ListIAMPolicyAssignments)
-> Lens
     ListIAMPolicyAssignments
     ListIAMPolicyAssignments
     (Maybe AssignmentStatus)
     (Maybe AssignmentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIAMPolicyAssignments' {Maybe AssignmentStatus
assignmentStatus :: Maybe AssignmentStatus
$sel:assignmentStatus:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Maybe AssignmentStatus
assignmentStatus} -> Maybe AssignmentStatus
assignmentStatus) (\s :: ListIAMPolicyAssignments
s@ListIAMPolicyAssignments' {} Maybe AssignmentStatus
a -> ListIAMPolicyAssignments
s {$sel:assignmentStatus:ListIAMPolicyAssignments' :: Maybe AssignmentStatus
assignmentStatus = Maybe AssignmentStatus
a} :: ListIAMPolicyAssignments)

-- | The maximum number of results to be returned per request.
listIAMPolicyAssignments_maxResults :: Lens.Lens' ListIAMPolicyAssignments (Prelude.Maybe Prelude.Natural)
listIAMPolicyAssignments_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListIAMPolicyAssignments -> f ListIAMPolicyAssignments
listIAMPolicyAssignments_maxResults = (ListIAMPolicyAssignments -> Maybe Natural)
-> (ListIAMPolicyAssignments
    -> Maybe Natural -> ListIAMPolicyAssignments)
-> Lens
     ListIAMPolicyAssignments
     ListIAMPolicyAssignments
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIAMPolicyAssignments' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListIAMPolicyAssignments
s@ListIAMPolicyAssignments' {} Maybe Natural
a -> ListIAMPolicyAssignments
s {$sel:maxResults:ListIAMPolicyAssignments' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListIAMPolicyAssignments)

-- | The ID of the Amazon Web Services account that contains these IAMpolicy
-- assignments.
listIAMPolicyAssignments_awsAccountId :: Lens.Lens' ListIAMPolicyAssignments Prelude.Text
listIAMPolicyAssignments_awsAccountId :: (Text -> f Text)
-> ListIAMPolicyAssignments -> f ListIAMPolicyAssignments
listIAMPolicyAssignments_awsAccountId = (ListIAMPolicyAssignments -> Text)
-> (ListIAMPolicyAssignments -> Text -> ListIAMPolicyAssignments)
-> Lens ListIAMPolicyAssignments ListIAMPolicyAssignments Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIAMPolicyAssignments' {Text
awsAccountId :: Text
$sel:awsAccountId:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Text
awsAccountId} -> Text
awsAccountId) (\s :: ListIAMPolicyAssignments
s@ListIAMPolicyAssignments' {} Text
a -> ListIAMPolicyAssignments
s {$sel:awsAccountId:ListIAMPolicyAssignments' :: Text
awsAccountId = Text
a} :: ListIAMPolicyAssignments)

-- | The namespace for the assignments.
listIAMPolicyAssignments_namespace :: Lens.Lens' ListIAMPolicyAssignments Prelude.Text
listIAMPolicyAssignments_namespace :: (Text -> f Text)
-> ListIAMPolicyAssignments -> f ListIAMPolicyAssignments
listIAMPolicyAssignments_namespace = (ListIAMPolicyAssignments -> Text)
-> (ListIAMPolicyAssignments -> Text -> ListIAMPolicyAssignments)
-> Lens ListIAMPolicyAssignments ListIAMPolicyAssignments Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIAMPolicyAssignments' {Text
namespace :: Text
$sel:namespace:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Text
namespace} -> Text
namespace) (\s :: ListIAMPolicyAssignments
s@ListIAMPolicyAssignments' {} Text
a -> ListIAMPolicyAssignments
s {$sel:namespace:ListIAMPolicyAssignments' :: Text
namespace = Text
a} :: ListIAMPolicyAssignments)

instance Core.AWSRequest ListIAMPolicyAssignments where
  type
    AWSResponse ListIAMPolicyAssignments =
      ListIAMPolicyAssignmentsResponse
  request :: ListIAMPolicyAssignments -> Request ListIAMPolicyAssignments
request = Service
-> ListIAMPolicyAssignments -> Request ListIAMPolicyAssignments
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListIAMPolicyAssignments
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListIAMPolicyAssignments)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListIAMPolicyAssignments))
-> Logger
-> Service
-> Proxy ListIAMPolicyAssignments
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListIAMPolicyAssignments)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe [IAMPolicyAssignmentSummary]
-> Int
-> ListIAMPolicyAssignmentsResponse
ListIAMPolicyAssignmentsResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe [IAMPolicyAssignmentSummary]
 -> Int
 -> ListIAMPolicyAssignmentsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [IAMPolicyAssignmentSummary]
      -> Int
      -> ListIAMPolicyAssignmentsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RequestId")
            Either
  String
  (Maybe Text
   -> Maybe [IAMPolicyAssignmentSummary]
   -> Int
   -> ListIAMPolicyAssignmentsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [IAMPolicyAssignmentSummary]
      -> Int -> ListIAMPolicyAssignmentsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String
  (Maybe [IAMPolicyAssignmentSummary]
   -> Int -> ListIAMPolicyAssignmentsResponse)
-> Either String (Maybe [IAMPolicyAssignmentSummary])
-> Either String (Int -> ListIAMPolicyAssignmentsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [IAMPolicyAssignmentSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IAMPolicyAssignments"
                            Either String (Maybe (Maybe [IAMPolicyAssignmentSummary]))
-> Maybe [IAMPolicyAssignmentSummary]
-> Either String (Maybe [IAMPolicyAssignmentSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [IAMPolicyAssignmentSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListIAMPolicyAssignmentsResponse)
-> Either String Int
-> Either String ListIAMPolicyAssignmentsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListIAMPolicyAssignments

instance Prelude.NFData ListIAMPolicyAssignments

instance Core.ToHeaders ListIAMPolicyAssignments where
  toHeaders :: ListIAMPolicyAssignments -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListIAMPolicyAssignments -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath ListIAMPolicyAssignments where
  toPath :: ListIAMPolicyAssignments -> ByteString
toPath ListIAMPolicyAssignments' {Maybe Natural
Maybe Text
Maybe AssignmentStatus
Text
namespace :: Text
awsAccountId :: Text
maxResults :: Maybe Natural
assignmentStatus :: Maybe AssignmentStatus
nextToken :: Maybe Text
$sel:namespace:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Text
$sel:awsAccountId:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Text
$sel:maxResults:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Maybe Natural
$sel:assignmentStatus:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Maybe AssignmentStatus
$sel:nextToken:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
        ByteString
"/namespaces/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
namespace,
        ByteString
"/iam-policy-assignments"
      ]

instance Core.ToQuery ListIAMPolicyAssignments where
  toQuery :: ListIAMPolicyAssignments -> QueryString
toQuery ListIAMPolicyAssignments' {Maybe Natural
Maybe Text
Maybe AssignmentStatus
Text
namespace :: Text
awsAccountId :: Text
maxResults :: Maybe Natural
assignmentStatus :: Maybe AssignmentStatus
nextToken :: Maybe Text
$sel:namespace:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Text
$sel:awsAccountId:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Text
$sel:maxResults:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Maybe Natural
$sel:assignmentStatus:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Maybe AssignmentStatus
$sel:nextToken:ListIAMPolicyAssignments' :: ListIAMPolicyAssignments -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"next-token" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"max-results" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListIAMPolicyAssignmentsResponse' smart constructor.
data ListIAMPolicyAssignmentsResponse = ListIAMPolicyAssignmentsResponse'
  { -- | The Amazon Web Services request ID for this operation.
    ListIAMPolicyAssignmentsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results, or null if there are no more
    -- results.
    ListIAMPolicyAssignmentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information describing the IAMpolicy assignments.
    ListIAMPolicyAssignmentsResponse
-> Maybe [IAMPolicyAssignmentSummary]
iAMPolicyAssignments :: Prelude.Maybe [IAMPolicyAssignmentSummary],
    -- | The HTTP status of the request.
    ListIAMPolicyAssignmentsResponse -> Int
status :: Prelude.Int
  }
  deriving (ListIAMPolicyAssignmentsResponse
-> ListIAMPolicyAssignmentsResponse -> Bool
(ListIAMPolicyAssignmentsResponse
 -> ListIAMPolicyAssignmentsResponse -> Bool)
-> (ListIAMPolicyAssignmentsResponse
    -> ListIAMPolicyAssignmentsResponse -> Bool)
-> Eq ListIAMPolicyAssignmentsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIAMPolicyAssignmentsResponse
-> ListIAMPolicyAssignmentsResponse -> Bool
$c/= :: ListIAMPolicyAssignmentsResponse
-> ListIAMPolicyAssignmentsResponse -> Bool
== :: ListIAMPolicyAssignmentsResponse
-> ListIAMPolicyAssignmentsResponse -> Bool
$c== :: ListIAMPolicyAssignmentsResponse
-> ListIAMPolicyAssignmentsResponse -> Bool
Prelude.Eq, ReadPrec [ListIAMPolicyAssignmentsResponse]
ReadPrec ListIAMPolicyAssignmentsResponse
Int -> ReadS ListIAMPolicyAssignmentsResponse
ReadS [ListIAMPolicyAssignmentsResponse]
(Int -> ReadS ListIAMPolicyAssignmentsResponse)
-> ReadS [ListIAMPolicyAssignmentsResponse]
-> ReadPrec ListIAMPolicyAssignmentsResponse
-> ReadPrec [ListIAMPolicyAssignmentsResponse]
-> Read ListIAMPolicyAssignmentsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIAMPolicyAssignmentsResponse]
$creadListPrec :: ReadPrec [ListIAMPolicyAssignmentsResponse]
readPrec :: ReadPrec ListIAMPolicyAssignmentsResponse
$creadPrec :: ReadPrec ListIAMPolicyAssignmentsResponse
readList :: ReadS [ListIAMPolicyAssignmentsResponse]
$creadList :: ReadS [ListIAMPolicyAssignmentsResponse]
readsPrec :: Int -> ReadS ListIAMPolicyAssignmentsResponse
$creadsPrec :: Int -> ReadS ListIAMPolicyAssignmentsResponse
Prelude.Read, Int -> ListIAMPolicyAssignmentsResponse -> ShowS
[ListIAMPolicyAssignmentsResponse] -> ShowS
ListIAMPolicyAssignmentsResponse -> String
(Int -> ListIAMPolicyAssignmentsResponse -> ShowS)
-> (ListIAMPolicyAssignmentsResponse -> String)
-> ([ListIAMPolicyAssignmentsResponse] -> ShowS)
-> Show ListIAMPolicyAssignmentsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIAMPolicyAssignmentsResponse] -> ShowS
$cshowList :: [ListIAMPolicyAssignmentsResponse] -> ShowS
show :: ListIAMPolicyAssignmentsResponse -> String
$cshow :: ListIAMPolicyAssignmentsResponse -> String
showsPrec :: Int -> ListIAMPolicyAssignmentsResponse -> ShowS
$cshowsPrec :: Int -> ListIAMPolicyAssignmentsResponse -> ShowS
Prelude.Show, (forall x.
 ListIAMPolicyAssignmentsResponse
 -> Rep ListIAMPolicyAssignmentsResponse x)
-> (forall x.
    Rep ListIAMPolicyAssignmentsResponse x
    -> ListIAMPolicyAssignmentsResponse)
-> Generic ListIAMPolicyAssignmentsResponse
forall x.
Rep ListIAMPolicyAssignmentsResponse x
-> ListIAMPolicyAssignmentsResponse
forall x.
ListIAMPolicyAssignmentsResponse
-> Rep ListIAMPolicyAssignmentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListIAMPolicyAssignmentsResponse x
-> ListIAMPolicyAssignmentsResponse
$cfrom :: forall x.
ListIAMPolicyAssignmentsResponse
-> Rep ListIAMPolicyAssignmentsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListIAMPolicyAssignmentsResponse' 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:
--
-- 'requestId', 'listIAMPolicyAssignmentsResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'nextToken', 'listIAMPolicyAssignmentsResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'iAMPolicyAssignments', 'listIAMPolicyAssignmentsResponse_iAMPolicyAssignments' - Information describing the IAMpolicy assignments.
--
-- 'status', 'listIAMPolicyAssignmentsResponse_status' - The HTTP status of the request.
newListIAMPolicyAssignmentsResponse ::
  -- | 'status'
  Prelude.Int ->
  ListIAMPolicyAssignmentsResponse
newListIAMPolicyAssignmentsResponse :: Int -> ListIAMPolicyAssignmentsResponse
newListIAMPolicyAssignmentsResponse Int
pStatus_ =
  ListIAMPolicyAssignmentsResponse' :: Maybe Text
-> Maybe Text
-> Maybe [IAMPolicyAssignmentSummary]
-> Int
-> ListIAMPolicyAssignmentsResponse
ListIAMPolicyAssignmentsResponse'
    { $sel:requestId:ListIAMPolicyAssignmentsResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListIAMPolicyAssignmentsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iAMPolicyAssignments:ListIAMPolicyAssignmentsResponse' :: Maybe [IAMPolicyAssignmentSummary]
iAMPolicyAssignments = Maybe [IAMPolicyAssignmentSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListIAMPolicyAssignmentsResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Web Services request ID for this operation.
listIAMPolicyAssignmentsResponse_requestId :: Lens.Lens' ListIAMPolicyAssignmentsResponse (Prelude.Maybe Prelude.Text)
listIAMPolicyAssignmentsResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> ListIAMPolicyAssignmentsResponse
-> f ListIAMPolicyAssignmentsResponse
listIAMPolicyAssignmentsResponse_requestId = (ListIAMPolicyAssignmentsResponse -> Maybe Text)
-> (ListIAMPolicyAssignmentsResponse
    -> Maybe Text -> ListIAMPolicyAssignmentsResponse)
-> Lens
     ListIAMPolicyAssignmentsResponse
     ListIAMPolicyAssignmentsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIAMPolicyAssignmentsResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:ListIAMPolicyAssignmentsResponse' :: ListIAMPolicyAssignmentsResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ListIAMPolicyAssignmentsResponse
s@ListIAMPolicyAssignmentsResponse' {} Maybe Text
a -> ListIAMPolicyAssignmentsResponse
s {$sel:requestId:ListIAMPolicyAssignmentsResponse' :: Maybe Text
requestId = Maybe Text
a} :: ListIAMPolicyAssignmentsResponse)

-- | The token for the next set of results, or null if there are no more
-- results.
listIAMPolicyAssignmentsResponse_nextToken :: Lens.Lens' ListIAMPolicyAssignmentsResponse (Prelude.Maybe Prelude.Text)
listIAMPolicyAssignmentsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListIAMPolicyAssignmentsResponse
-> f ListIAMPolicyAssignmentsResponse
listIAMPolicyAssignmentsResponse_nextToken = (ListIAMPolicyAssignmentsResponse -> Maybe Text)
-> (ListIAMPolicyAssignmentsResponse
    -> Maybe Text -> ListIAMPolicyAssignmentsResponse)
-> Lens
     ListIAMPolicyAssignmentsResponse
     ListIAMPolicyAssignmentsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIAMPolicyAssignmentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIAMPolicyAssignmentsResponse' :: ListIAMPolicyAssignmentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIAMPolicyAssignmentsResponse
s@ListIAMPolicyAssignmentsResponse' {} Maybe Text
a -> ListIAMPolicyAssignmentsResponse
s {$sel:nextToken:ListIAMPolicyAssignmentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListIAMPolicyAssignmentsResponse)

-- | Information describing the IAMpolicy assignments.
listIAMPolicyAssignmentsResponse_iAMPolicyAssignments :: Lens.Lens' ListIAMPolicyAssignmentsResponse (Prelude.Maybe [IAMPolicyAssignmentSummary])
listIAMPolicyAssignmentsResponse_iAMPolicyAssignments :: (Maybe [IAMPolicyAssignmentSummary]
 -> f (Maybe [IAMPolicyAssignmentSummary]))
-> ListIAMPolicyAssignmentsResponse
-> f ListIAMPolicyAssignmentsResponse
listIAMPolicyAssignmentsResponse_iAMPolicyAssignments = (ListIAMPolicyAssignmentsResponse
 -> Maybe [IAMPolicyAssignmentSummary])
-> (ListIAMPolicyAssignmentsResponse
    -> Maybe [IAMPolicyAssignmentSummary]
    -> ListIAMPolicyAssignmentsResponse)
-> Lens
     ListIAMPolicyAssignmentsResponse
     ListIAMPolicyAssignmentsResponse
     (Maybe [IAMPolicyAssignmentSummary])
     (Maybe [IAMPolicyAssignmentSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIAMPolicyAssignmentsResponse' {Maybe [IAMPolicyAssignmentSummary]
iAMPolicyAssignments :: Maybe [IAMPolicyAssignmentSummary]
$sel:iAMPolicyAssignments:ListIAMPolicyAssignmentsResponse' :: ListIAMPolicyAssignmentsResponse
-> Maybe [IAMPolicyAssignmentSummary]
iAMPolicyAssignments} -> Maybe [IAMPolicyAssignmentSummary]
iAMPolicyAssignments) (\s :: ListIAMPolicyAssignmentsResponse
s@ListIAMPolicyAssignmentsResponse' {} Maybe [IAMPolicyAssignmentSummary]
a -> ListIAMPolicyAssignmentsResponse
s {$sel:iAMPolicyAssignments:ListIAMPolicyAssignmentsResponse' :: Maybe [IAMPolicyAssignmentSummary]
iAMPolicyAssignments = Maybe [IAMPolicyAssignmentSummary]
a} :: ListIAMPolicyAssignmentsResponse) ((Maybe [IAMPolicyAssignmentSummary]
  -> f (Maybe [IAMPolicyAssignmentSummary]))
 -> ListIAMPolicyAssignmentsResponse
 -> f ListIAMPolicyAssignmentsResponse)
-> ((Maybe [IAMPolicyAssignmentSummary]
     -> f (Maybe [IAMPolicyAssignmentSummary]))
    -> Maybe [IAMPolicyAssignmentSummary]
    -> f (Maybe [IAMPolicyAssignmentSummary]))
-> (Maybe [IAMPolicyAssignmentSummary]
    -> f (Maybe [IAMPolicyAssignmentSummary]))
-> ListIAMPolicyAssignmentsResponse
-> f ListIAMPolicyAssignmentsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [IAMPolicyAssignmentSummary]
  [IAMPolicyAssignmentSummary]
  [IAMPolicyAssignmentSummary]
  [IAMPolicyAssignmentSummary]
-> Iso
     (Maybe [IAMPolicyAssignmentSummary])
     (Maybe [IAMPolicyAssignmentSummary])
     (Maybe [IAMPolicyAssignmentSummary])
     (Maybe [IAMPolicyAssignmentSummary])
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 AnIso
  [IAMPolicyAssignmentSummary]
  [IAMPolicyAssignmentSummary]
  [IAMPolicyAssignmentSummary]
  [IAMPolicyAssignmentSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The HTTP status of the request.
listIAMPolicyAssignmentsResponse_status :: Lens.Lens' ListIAMPolicyAssignmentsResponse Prelude.Int
listIAMPolicyAssignmentsResponse_status :: (Int -> f Int)
-> ListIAMPolicyAssignmentsResponse
-> f ListIAMPolicyAssignmentsResponse
listIAMPolicyAssignmentsResponse_status = (ListIAMPolicyAssignmentsResponse -> Int)
-> (ListIAMPolicyAssignmentsResponse
    -> Int -> ListIAMPolicyAssignmentsResponse)
-> Lens
     ListIAMPolicyAssignmentsResponse
     ListIAMPolicyAssignmentsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIAMPolicyAssignmentsResponse' {Int
status :: Int
$sel:status:ListIAMPolicyAssignmentsResponse' :: ListIAMPolicyAssignmentsResponse -> Int
status} -> Int
status) (\s :: ListIAMPolicyAssignmentsResponse
s@ListIAMPolicyAssignmentsResponse' {} Int
a -> ListIAMPolicyAssignmentsResponse
s {$sel:status:ListIAMPolicyAssignmentsResponse' :: Int
status = Int
a} :: ListIAMPolicyAssignmentsResponse)

instance
  Prelude.NFData
    ListIAMPolicyAssignmentsResponse