{-# 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.DescribeIAMPolicyAssignment
-- 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)
--
-- Describes an existing IAMpolicy assignment, as specified by the
-- assignment name.
module Amazonka.QuickSight.DescribeIAMPolicyAssignment
  ( -- * Creating a Request
    DescribeIAMPolicyAssignment (..),
    newDescribeIAMPolicyAssignment,

    -- * Request Lenses
    describeIAMPolicyAssignment_awsAccountId,
    describeIAMPolicyAssignment_assignmentName,
    describeIAMPolicyAssignment_namespace,

    -- * Destructuring the Response
    DescribeIAMPolicyAssignmentResponse (..),
    newDescribeIAMPolicyAssignmentResponse,

    -- * Response Lenses
    describeIAMPolicyAssignmentResponse_requestId,
    describeIAMPolicyAssignmentResponse_iAMPolicyAssignment,
    describeIAMPolicyAssignmentResponse_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:/ 'newDescribeIAMPolicyAssignment' smart constructor.
data DescribeIAMPolicyAssignment = DescribeIAMPolicyAssignment'
  { -- | The ID of the Amazon Web Services account that contains the assignment
    -- that you want to describe.
    DescribeIAMPolicyAssignment -> Text
awsAccountId :: Prelude.Text,
    -- | The name of the assignment, also called a rule.
    DescribeIAMPolicyAssignment -> Text
assignmentName :: Prelude.Text,
    -- | The namespace that contains the assignment.
    DescribeIAMPolicyAssignment -> Text
namespace :: Prelude.Text
  }
  deriving (DescribeIAMPolicyAssignment -> DescribeIAMPolicyAssignment -> Bool
(DescribeIAMPolicyAssignment
 -> DescribeIAMPolicyAssignment -> Bool)
-> (DescribeIAMPolicyAssignment
    -> DescribeIAMPolicyAssignment -> Bool)
-> Eq DescribeIAMPolicyAssignment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeIAMPolicyAssignment -> DescribeIAMPolicyAssignment -> Bool
$c/= :: DescribeIAMPolicyAssignment -> DescribeIAMPolicyAssignment -> Bool
== :: DescribeIAMPolicyAssignment -> DescribeIAMPolicyAssignment -> Bool
$c== :: DescribeIAMPolicyAssignment -> DescribeIAMPolicyAssignment -> Bool
Prelude.Eq, ReadPrec [DescribeIAMPolicyAssignment]
ReadPrec DescribeIAMPolicyAssignment
Int -> ReadS DescribeIAMPolicyAssignment
ReadS [DescribeIAMPolicyAssignment]
(Int -> ReadS DescribeIAMPolicyAssignment)
-> ReadS [DescribeIAMPolicyAssignment]
-> ReadPrec DescribeIAMPolicyAssignment
-> ReadPrec [DescribeIAMPolicyAssignment]
-> Read DescribeIAMPolicyAssignment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeIAMPolicyAssignment]
$creadListPrec :: ReadPrec [DescribeIAMPolicyAssignment]
readPrec :: ReadPrec DescribeIAMPolicyAssignment
$creadPrec :: ReadPrec DescribeIAMPolicyAssignment
readList :: ReadS [DescribeIAMPolicyAssignment]
$creadList :: ReadS [DescribeIAMPolicyAssignment]
readsPrec :: Int -> ReadS DescribeIAMPolicyAssignment
$creadsPrec :: Int -> ReadS DescribeIAMPolicyAssignment
Prelude.Read, Int -> DescribeIAMPolicyAssignment -> ShowS
[DescribeIAMPolicyAssignment] -> ShowS
DescribeIAMPolicyAssignment -> String
(Int -> DescribeIAMPolicyAssignment -> ShowS)
-> (DescribeIAMPolicyAssignment -> String)
-> ([DescribeIAMPolicyAssignment] -> ShowS)
-> Show DescribeIAMPolicyAssignment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeIAMPolicyAssignment] -> ShowS
$cshowList :: [DescribeIAMPolicyAssignment] -> ShowS
show :: DescribeIAMPolicyAssignment -> String
$cshow :: DescribeIAMPolicyAssignment -> String
showsPrec :: Int -> DescribeIAMPolicyAssignment -> ShowS
$cshowsPrec :: Int -> DescribeIAMPolicyAssignment -> ShowS
Prelude.Show, (forall x.
 DescribeIAMPolicyAssignment -> Rep DescribeIAMPolicyAssignment x)
-> (forall x.
    Rep DescribeIAMPolicyAssignment x -> DescribeIAMPolicyAssignment)
-> Generic DescribeIAMPolicyAssignment
forall x.
Rep DescribeIAMPolicyAssignment x -> DescribeIAMPolicyAssignment
forall x.
DescribeIAMPolicyAssignment -> Rep DescribeIAMPolicyAssignment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeIAMPolicyAssignment x -> DescribeIAMPolicyAssignment
$cfrom :: forall x.
DescribeIAMPolicyAssignment -> Rep DescribeIAMPolicyAssignment x
Prelude.Generic)

-- |
-- Create a value of 'DescribeIAMPolicyAssignment' 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:
--
-- 'awsAccountId', 'describeIAMPolicyAssignment_awsAccountId' - The ID of the Amazon Web Services account that contains the assignment
-- that you want to describe.
--
-- 'assignmentName', 'describeIAMPolicyAssignment_assignmentName' - The name of the assignment, also called a rule.
--
-- 'namespace', 'describeIAMPolicyAssignment_namespace' - The namespace that contains the assignment.
newDescribeIAMPolicyAssignment ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'assignmentName'
  Prelude.Text ->
  -- | 'namespace'
  Prelude.Text ->
  DescribeIAMPolicyAssignment
newDescribeIAMPolicyAssignment :: Text -> Text -> Text -> DescribeIAMPolicyAssignment
newDescribeIAMPolicyAssignment
  Text
pAwsAccountId_
  Text
pAssignmentName_
  Text
pNamespace_ =
    DescribeIAMPolicyAssignment' :: Text -> Text -> Text -> DescribeIAMPolicyAssignment
DescribeIAMPolicyAssignment'
      { $sel:awsAccountId:DescribeIAMPolicyAssignment' :: Text
awsAccountId =
          Text
pAwsAccountId_,
        $sel:assignmentName:DescribeIAMPolicyAssignment' :: Text
assignmentName = Text
pAssignmentName_,
        $sel:namespace:DescribeIAMPolicyAssignment' :: Text
namespace = Text
pNamespace_
      }

-- | The ID of the Amazon Web Services account that contains the assignment
-- that you want to describe.
describeIAMPolicyAssignment_awsAccountId :: Lens.Lens' DescribeIAMPolicyAssignment Prelude.Text
describeIAMPolicyAssignment_awsAccountId :: (Text -> f Text)
-> DescribeIAMPolicyAssignment -> f DescribeIAMPolicyAssignment
describeIAMPolicyAssignment_awsAccountId = (DescribeIAMPolicyAssignment -> Text)
-> (DescribeIAMPolicyAssignment
    -> Text -> DescribeIAMPolicyAssignment)
-> Lens
     DescribeIAMPolicyAssignment DescribeIAMPolicyAssignment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIAMPolicyAssignment' {Text
awsAccountId :: Text
$sel:awsAccountId:DescribeIAMPolicyAssignment' :: DescribeIAMPolicyAssignment -> Text
awsAccountId} -> Text
awsAccountId) (\s :: DescribeIAMPolicyAssignment
s@DescribeIAMPolicyAssignment' {} Text
a -> DescribeIAMPolicyAssignment
s {$sel:awsAccountId:DescribeIAMPolicyAssignment' :: Text
awsAccountId = Text
a} :: DescribeIAMPolicyAssignment)

-- | The name of the assignment, also called a rule.
describeIAMPolicyAssignment_assignmentName :: Lens.Lens' DescribeIAMPolicyAssignment Prelude.Text
describeIAMPolicyAssignment_assignmentName :: (Text -> f Text)
-> DescribeIAMPolicyAssignment -> f DescribeIAMPolicyAssignment
describeIAMPolicyAssignment_assignmentName = (DescribeIAMPolicyAssignment -> Text)
-> (DescribeIAMPolicyAssignment
    -> Text -> DescribeIAMPolicyAssignment)
-> Lens
     DescribeIAMPolicyAssignment DescribeIAMPolicyAssignment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIAMPolicyAssignment' {Text
assignmentName :: Text
$sel:assignmentName:DescribeIAMPolicyAssignment' :: DescribeIAMPolicyAssignment -> Text
assignmentName} -> Text
assignmentName) (\s :: DescribeIAMPolicyAssignment
s@DescribeIAMPolicyAssignment' {} Text
a -> DescribeIAMPolicyAssignment
s {$sel:assignmentName:DescribeIAMPolicyAssignment' :: Text
assignmentName = Text
a} :: DescribeIAMPolicyAssignment)

-- | The namespace that contains the assignment.
describeIAMPolicyAssignment_namespace :: Lens.Lens' DescribeIAMPolicyAssignment Prelude.Text
describeIAMPolicyAssignment_namespace :: (Text -> f Text)
-> DescribeIAMPolicyAssignment -> f DescribeIAMPolicyAssignment
describeIAMPolicyAssignment_namespace = (DescribeIAMPolicyAssignment -> Text)
-> (DescribeIAMPolicyAssignment
    -> Text -> DescribeIAMPolicyAssignment)
-> Lens
     DescribeIAMPolicyAssignment DescribeIAMPolicyAssignment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIAMPolicyAssignment' {Text
namespace :: Text
$sel:namespace:DescribeIAMPolicyAssignment' :: DescribeIAMPolicyAssignment -> Text
namespace} -> Text
namespace) (\s :: DescribeIAMPolicyAssignment
s@DescribeIAMPolicyAssignment' {} Text
a -> DescribeIAMPolicyAssignment
s {$sel:namespace:DescribeIAMPolicyAssignment' :: Text
namespace = Text
a} :: DescribeIAMPolicyAssignment)

instance Core.AWSRequest DescribeIAMPolicyAssignment where
  type
    AWSResponse DescribeIAMPolicyAssignment =
      DescribeIAMPolicyAssignmentResponse
  request :: DescribeIAMPolicyAssignment -> Request DescribeIAMPolicyAssignment
request = Service
-> DescribeIAMPolicyAssignment
-> Request DescribeIAMPolicyAssignment
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeIAMPolicyAssignment
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeIAMPolicyAssignment)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeIAMPolicyAssignment))
-> Logger
-> Service
-> Proxy DescribeIAMPolicyAssignment
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeIAMPolicyAssignment)))
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 IAMPolicyAssignment
-> Int
-> DescribeIAMPolicyAssignmentResponse
DescribeIAMPolicyAssignmentResponse'
            (Maybe Text
 -> Maybe IAMPolicyAssignment
 -> Int
 -> DescribeIAMPolicyAssignmentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe IAMPolicyAssignment
      -> Int -> DescribeIAMPolicyAssignmentResponse)
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 IAMPolicyAssignment
   -> Int -> DescribeIAMPolicyAssignmentResponse)
-> Either String (Maybe IAMPolicyAssignment)
-> Either String (Int -> DescribeIAMPolicyAssignmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe IAMPolicyAssignment)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IAMPolicyAssignment")
            Either String (Int -> DescribeIAMPolicyAssignmentResponse)
-> Either String Int
-> Either String DescribeIAMPolicyAssignmentResponse
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 DescribeIAMPolicyAssignment

instance Prelude.NFData DescribeIAMPolicyAssignment

instance Core.ToHeaders DescribeIAMPolicyAssignment where
  toHeaders :: DescribeIAMPolicyAssignment -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeIAMPolicyAssignment -> 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 DescribeIAMPolicyAssignment where
  toPath :: DescribeIAMPolicyAssignment -> ByteString
toPath DescribeIAMPolicyAssignment' {Text
namespace :: Text
assignmentName :: Text
awsAccountId :: Text
$sel:namespace:DescribeIAMPolicyAssignment' :: DescribeIAMPolicyAssignment -> Text
$sel:assignmentName:DescribeIAMPolicyAssignment' :: DescribeIAMPolicyAssignment -> Text
$sel:awsAccountId:DescribeIAMPolicyAssignment' :: DescribeIAMPolicyAssignment -> 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/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
assignmentName
      ]

instance Core.ToQuery DescribeIAMPolicyAssignment where
  toQuery :: DescribeIAMPolicyAssignment -> QueryString
toQuery = QueryString -> DescribeIAMPolicyAssignment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeIAMPolicyAssignmentResponse' smart constructor.
data DescribeIAMPolicyAssignmentResponse = DescribeIAMPolicyAssignmentResponse'
  { -- | The Amazon Web Services request ID for this operation.
    DescribeIAMPolicyAssignmentResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | Information describing the IAMpolicy assignment.
    DescribeIAMPolicyAssignmentResponse -> Maybe IAMPolicyAssignment
iAMPolicyAssignment :: Prelude.Maybe IAMPolicyAssignment,
    -- | The HTTP status of the request.
    DescribeIAMPolicyAssignmentResponse -> Int
status :: Prelude.Int
  }
  deriving (DescribeIAMPolicyAssignmentResponse
-> DescribeIAMPolicyAssignmentResponse -> Bool
(DescribeIAMPolicyAssignmentResponse
 -> DescribeIAMPolicyAssignmentResponse -> Bool)
-> (DescribeIAMPolicyAssignmentResponse
    -> DescribeIAMPolicyAssignmentResponse -> Bool)
-> Eq DescribeIAMPolicyAssignmentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeIAMPolicyAssignmentResponse
-> DescribeIAMPolicyAssignmentResponse -> Bool
$c/= :: DescribeIAMPolicyAssignmentResponse
-> DescribeIAMPolicyAssignmentResponse -> Bool
== :: DescribeIAMPolicyAssignmentResponse
-> DescribeIAMPolicyAssignmentResponse -> Bool
$c== :: DescribeIAMPolicyAssignmentResponse
-> DescribeIAMPolicyAssignmentResponse -> Bool
Prelude.Eq, ReadPrec [DescribeIAMPolicyAssignmentResponse]
ReadPrec DescribeIAMPolicyAssignmentResponse
Int -> ReadS DescribeIAMPolicyAssignmentResponse
ReadS [DescribeIAMPolicyAssignmentResponse]
(Int -> ReadS DescribeIAMPolicyAssignmentResponse)
-> ReadS [DescribeIAMPolicyAssignmentResponse]
-> ReadPrec DescribeIAMPolicyAssignmentResponse
-> ReadPrec [DescribeIAMPolicyAssignmentResponse]
-> Read DescribeIAMPolicyAssignmentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeIAMPolicyAssignmentResponse]
$creadListPrec :: ReadPrec [DescribeIAMPolicyAssignmentResponse]
readPrec :: ReadPrec DescribeIAMPolicyAssignmentResponse
$creadPrec :: ReadPrec DescribeIAMPolicyAssignmentResponse
readList :: ReadS [DescribeIAMPolicyAssignmentResponse]
$creadList :: ReadS [DescribeIAMPolicyAssignmentResponse]
readsPrec :: Int -> ReadS DescribeIAMPolicyAssignmentResponse
$creadsPrec :: Int -> ReadS DescribeIAMPolicyAssignmentResponse
Prelude.Read, Int -> DescribeIAMPolicyAssignmentResponse -> ShowS
[DescribeIAMPolicyAssignmentResponse] -> ShowS
DescribeIAMPolicyAssignmentResponse -> String
(Int -> DescribeIAMPolicyAssignmentResponse -> ShowS)
-> (DescribeIAMPolicyAssignmentResponse -> String)
-> ([DescribeIAMPolicyAssignmentResponse] -> ShowS)
-> Show DescribeIAMPolicyAssignmentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeIAMPolicyAssignmentResponse] -> ShowS
$cshowList :: [DescribeIAMPolicyAssignmentResponse] -> ShowS
show :: DescribeIAMPolicyAssignmentResponse -> String
$cshow :: DescribeIAMPolicyAssignmentResponse -> String
showsPrec :: Int -> DescribeIAMPolicyAssignmentResponse -> ShowS
$cshowsPrec :: Int -> DescribeIAMPolicyAssignmentResponse -> ShowS
Prelude.Show, (forall x.
 DescribeIAMPolicyAssignmentResponse
 -> Rep DescribeIAMPolicyAssignmentResponse x)
-> (forall x.
    Rep DescribeIAMPolicyAssignmentResponse x
    -> DescribeIAMPolicyAssignmentResponse)
-> Generic DescribeIAMPolicyAssignmentResponse
forall x.
Rep DescribeIAMPolicyAssignmentResponse x
-> DescribeIAMPolicyAssignmentResponse
forall x.
DescribeIAMPolicyAssignmentResponse
-> Rep DescribeIAMPolicyAssignmentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeIAMPolicyAssignmentResponse x
-> DescribeIAMPolicyAssignmentResponse
$cfrom :: forall x.
DescribeIAMPolicyAssignmentResponse
-> Rep DescribeIAMPolicyAssignmentResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeIAMPolicyAssignmentResponse' 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', 'describeIAMPolicyAssignmentResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'iAMPolicyAssignment', 'describeIAMPolicyAssignmentResponse_iAMPolicyAssignment' - Information describing the IAMpolicy assignment.
--
-- 'status', 'describeIAMPolicyAssignmentResponse_status' - The HTTP status of the request.
newDescribeIAMPolicyAssignmentResponse ::
  -- | 'status'
  Prelude.Int ->
  DescribeIAMPolicyAssignmentResponse
newDescribeIAMPolicyAssignmentResponse :: Int -> DescribeIAMPolicyAssignmentResponse
newDescribeIAMPolicyAssignmentResponse Int
pStatus_ =
  DescribeIAMPolicyAssignmentResponse' :: Maybe Text
-> Maybe IAMPolicyAssignment
-> Int
-> DescribeIAMPolicyAssignmentResponse
DescribeIAMPolicyAssignmentResponse'
    { $sel:requestId:DescribeIAMPolicyAssignmentResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iAMPolicyAssignment:DescribeIAMPolicyAssignmentResponse' :: Maybe IAMPolicyAssignment
iAMPolicyAssignment = Maybe IAMPolicyAssignment
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeIAMPolicyAssignmentResponse' :: Int
status = Int
pStatus_
    }

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

-- | Information describing the IAMpolicy assignment.
describeIAMPolicyAssignmentResponse_iAMPolicyAssignment :: Lens.Lens' DescribeIAMPolicyAssignmentResponse (Prelude.Maybe IAMPolicyAssignment)
describeIAMPolicyAssignmentResponse_iAMPolicyAssignment :: (Maybe IAMPolicyAssignment -> f (Maybe IAMPolicyAssignment))
-> DescribeIAMPolicyAssignmentResponse
-> f DescribeIAMPolicyAssignmentResponse
describeIAMPolicyAssignmentResponse_iAMPolicyAssignment = (DescribeIAMPolicyAssignmentResponse -> Maybe IAMPolicyAssignment)
-> (DescribeIAMPolicyAssignmentResponse
    -> Maybe IAMPolicyAssignment
    -> DescribeIAMPolicyAssignmentResponse)
-> Lens
     DescribeIAMPolicyAssignmentResponse
     DescribeIAMPolicyAssignmentResponse
     (Maybe IAMPolicyAssignment)
     (Maybe IAMPolicyAssignment)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIAMPolicyAssignmentResponse' {Maybe IAMPolicyAssignment
iAMPolicyAssignment :: Maybe IAMPolicyAssignment
$sel:iAMPolicyAssignment:DescribeIAMPolicyAssignmentResponse' :: DescribeIAMPolicyAssignmentResponse -> Maybe IAMPolicyAssignment
iAMPolicyAssignment} -> Maybe IAMPolicyAssignment
iAMPolicyAssignment) (\s :: DescribeIAMPolicyAssignmentResponse
s@DescribeIAMPolicyAssignmentResponse' {} Maybe IAMPolicyAssignment
a -> DescribeIAMPolicyAssignmentResponse
s {$sel:iAMPolicyAssignment:DescribeIAMPolicyAssignmentResponse' :: Maybe IAMPolicyAssignment
iAMPolicyAssignment = Maybe IAMPolicyAssignment
a} :: DescribeIAMPolicyAssignmentResponse)

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

instance
  Prelude.NFData
    DescribeIAMPolicyAssignmentResponse