{-# 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.DescribeFolderResolvedPermissions
-- 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 the folder resolved permissions. Permissions consists of both
-- folder direct permissions and the inherited permissions from the
-- ancestor folders.
module Amazonka.QuickSight.DescribeFolderResolvedPermissions
  ( -- * Creating a Request
    DescribeFolderResolvedPermissions (..),
    newDescribeFolderResolvedPermissions,

    -- * Request Lenses
    describeFolderResolvedPermissions_awsAccountId,
    describeFolderResolvedPermissions_folderId,

    -- * Destructuring the Response
    DescribeFolderResolvedPermissionsResponse (..),
    newDescribeFolderResolvedPermissionsResponse,

    -- * Response Lenses
    describeFolderResolvedPermissionsResponse_requestId,
    describeFolderResolvedPermissionsResponse_arn,
    describeFolderResolvedPermissionsResponse_folderId,
    describeFolderResolvedPermissionsResponse_permissions,
    describeFolderResolvedPermissionsResponse_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:/ 'newDescribeFolderResolvedPermissions' smart constructor.
data DescribeFolderResolvedPermissions = DescribeFolderResolvedPermissions'
  { -- | The AWS account ID.
    DescribeFolderResolvedPermissions -> Text
awsAccountId :: Prelude.Text,
    -- | The folder ID.
    DescribeFolderResolvedPermissions -> Text
folderId :: Prelude.Text
  }
  deriving (DescribeFolderResolvedPermissions
-> DescribeFolderResolvedPermissions -> Bool
(DescribeFolderResolvedPermissions
 -> DescribeFolderResolvedPermissions -> Bool)
-> (DescribeFolderResolvedPermissions
    -> DescribeFolderResolvedPermissions -> Bool)
-> Eq DescribeFolderResolvedPermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFolderResolvedPermissions
-> DescribeFolderResolvedPermissions -> Bool
$c/= :: DescribeFolderResolvedPermissions
-> DescribeFolderResolvedPermissions -> Bool
== :: DescribeFolderResolvedPermissions
-> DescribeFolderResolvedPermissions -> Bool
$c== :: DescribeFolderResolvedPermissions
-> DescribeFolderResolvedPermissions -> Bool
Prelude.Eq, ReadPrec [DescribeFolderResolvedPermissions]
ReadPrec DescribeFolderResolvedPermissions
Int -> ReadS DescribeFolderResolvedPermissions
ReadS [DescribeFolderResolvedPermissions]
(Int -> ReadS DescribeFolderResolvedPermissions)
-> ReadS [DescribeFolderResolvedPermissions]
-> ReadPrec DescribeFolderResolvedPermissions
-> ReadPrec [DescribeFolderResolvedPermissions]
-> Read DescribeFolderResolvedPermissions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFolderResolvedPermissions]
$creadListPrec :: ReadPrec [DescribeFolderResolvedPermissions]
readPrec :: ReadPrec DescribeFolderResolvedPermissions
$creadPrec :: ReadPrec DescribeFolderResolvedPermissions
readList :: ReadS [DescribeFolderResolvedPermissions]
$creadList :: ReadS [DescribeFolderResolvedPermissions]
readsPrec :: Int -> ReadS DescribeFolderResolvedPermissions
$creadsPrec :: Int -> ReadS DescribeFolderResolvedPermissions
Prelude.Read, Int -> DescribeFolderResolvedPermissions -> ShowS
[DescribeFolderResolvedPermissions] -> ShowS
DescribeFolderResolvedPermissions -> String
(Int -> DescribeFolderResolvedPermissions -> ShowS)
-> (DescribeFolderResolvedPermissions -> String)
-> ([DescribeFolderResolvedPermissions] -> ShowS)
-> Show DescribeFolderResolvedPermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFolderResolvedPermissions] -> ShowS
$cshowList :: [DescribeFolderResolvedPermissions] -> ShowS
show :: DescribeFolderResolvedPermissions -> String
$cshow :: DescribeFolderResolvedPermissions -> String
showsPrec :: Int -> DescribeFolderResolvedPermissions -> ShowS
$cshowsPrec :: Int -> DescribeFolderResolvedPermissions -> ShowS
Prelude.Show, (forall x.
 DescribeFolderResolvedPermissions
 -> Rep DescribeFolderResolvedPermissions x)
-> (forall x.
    Rep DescribeFolderResolvedPermissions x
    -> DescribeFolderResolvedPermissions)
-> Generic DescribeFolderResolvedPermissions
forall x.
Rep DescribeFolderResolvedPermissions x
-> DescribeFolderResolvedPermissions
forall x.
DescribeFolderResolvedPermissions
-> Rep DescribeFolderResolvedPermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFolderResolvedPermissions x
-> DescribeFolderResolvedPermissions
$cfrom :: forall x.
DescribeFolderResolvedPermissions
-> Rep DescribeFolderResolvedPermissions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFolderResolvedPermissions' 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', 'describeFolderResolvedPermissions_awsAccountId' - The AWS account ID.
--
-- 'folderId', 'describeFolderResolvedPermissions_folderId' - The folder ID.
newDescribeFolderResolvedPermissions ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'folderId'
  Prelude.Text ->
  DescribeFolderResolvedPermissions
newDescribeFolderResolvedPermissions :: Text -> Text -> DescribeFolderResolvedPermissions
newDescribeFolderResolvedPermissions
  Text
pAwsAccountId_
  Text
pFolderId_ =
    DescribeFolderResolvedPermissions' :: Text -> Text -> DescribeFolderResolvedPermissions
DescribeFolderResolvedPermissions'
      { $sel:awsAccountId:DescribeFolderResolvedPermissions' :: Text
awsAccountId =
          Text
pAwsAccountId_,
        $sel:folderId:DescribeFolderResolvedPermissions' :: Text
folderId = Text
pFolderId_
      }

-- | The AWS account ID.
describeFolderResolvedPermissions_awsAccountId :: Lens.Lens' DescribeFolderResolvedPermissions Prelude.Text
describeFolderResolvedPermissions_awsAccountId :: (Text -> f Text)
-> DescribeFolderResolvedPermissions
-> f DescribeFolderResolvedPermissions
describeFolderResolvedPermissions_awsAccountId = (DescribeFolderResolvedPermissions -> Text)
-> (DescribeFolderResolvedPermissions
    -> Text -> DescribeFolderResolvedPermissions)
-> Lens
     DescribeFolderResolvedPermissions
     DescribeFolderResolvedPermissions
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFolderResolvedPermissions' {Text
awsAccountId :: Text
$sel:awsAccountId:DescribeFolderResolvedPermissions' :: DescribeFolderResolvedPermissions -> Text
awsAccountId} -> Text
awsAccountId) (\s :: DescribeFolderResolvedPermissions
s@DescribeFolderResolvedPermissions' {} Text
a -> DescribeFolderResolvedPermissions
s {$sel:awsAccountId:DescribeFolderResolvedPermissions' :: Text
awsAccountId = Text
a} :: DescribeFolderResolvedPermissions)

-- | The folder ID.
describeFolderResolvedPermissions_folderId :: Lens.Lens' DescribeFolderResolvedPermissions Prelude.Text
describeFolderResolvedPermissions_folderId :: (Text -> f Text)
-> DescribeFolderResolvedPermissions
-> f DescribeFolderResolvedPermissions
describeFolderResolvedPermissions_folderId = (DescribeFolderResolvedPermissions -> Text)
-> (DescribeFolderResolvedPermissions
    -> Text -> DescribeFolderResolvedPermissions)
-> Lens
     DescribeFolderResolvedPermissions
     DescribeFolderResolvedPermissions
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFolderResolvedPermissions' {Text
folderId :: Text
$sel:folderId:DescribeFolderResolvedPermissions' :: DescribeFolderResolvedPermissions -> Text
folderId} -> Text
folderId) (\s :: DescribeFolderResolvedPermissions
s@DescribeFolderResolvedPermissions' {} Text
a -> DescribeFolderResolvedPermissions
s {$sel:folderId:DescribeFolderResolvedPermissions' :: Text
folderId = Text
a} :: DescribeFolderResolvedPermissions)

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

instance
  Prelude.NFData
    DescribeFolderResolvedPermissions

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

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

-- | /See:/ 'newDescribeFolderResolvedPermissionsResponse' smart constructor.
data DescribeFolderResolvedPermissionsResponse = DescribeFolderResolvedPermissionsResponse'
  { -- | The request ID.
    DescribeFolderResolvedPermissionsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN).
    DescribeFolderResolvedPermissionsResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The folder ID.
    DescribeFolderResolvedPermissionsResponse -> Maybe Text
folderId :: Prelude.Maybe Prelude.Text,
    -- | Information about the permissions on the dashboard.
    DescribeFolderResolvedPermissionsResponse
-> Maybe (NonEmpty ResourcePermission)
permissions :: Prelude.Maybe (Prelude.NonEmpty ResourcePermission),
    -- | The status. If succeeded, the status is @SC_OK@
    DescribeFolderResolvedPermissionsResponse -> Int
status :: Prelude.Int
  }
  deriving (DescribeFolderResolvedPermissionsResponse
-> DescribeFolderResolvedPermissionsResponse -> Bool
(DescribeFolderResolvedPermissionsResponse
 -> DescribeFolderResolvedPermissionsResponse -> Bool)
-> (DescribeFolderResolvedPermissionsResponse
    -> DescribeFolderResolvedPermissionsResponse -> Bool)
-> Eq DescribeFolderResolvedPermissionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFolderResolvedPermissionsResponse
-> DescribeFolderResolvedPermissionsResponse -> Bool
$c/= :: DescribeFolderResolvedPermissionsResponse
-> DescribeFolderResolvedPermissionsResponse -> Bool
== :: DescribeFolderResolvedPermissionsResponse
-> DescribeFolderResolvedPermissionsResponse -> Bool
$c== :: DescribeFolderResolvedPermissionsResponse
-> DescribeFolderResolvedPermissionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeFolderResolvedPermissionsResponse]
ReadPrec DescribeFolderResolvedPermissionsResponse
Int -> ReadS DescribeFolderResolvedPermissionsResponse
ReadS [DescribeFolderResolvedPermissionsResponse]
(Int -> ReadS DescribeFolderResolvedPermissionsResponse)
-> ReadS [DescribeFolderResolvedPermissionsResponse]
-> ReadPrec DescribeFolderResolvedPermissionsResponse
-> ReadPrec [DescribeFolderResolvedPermissionsResponse]
-> Read DescribeFolderResolvedPermissionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFolderResolvedPermissionsResponse]
$creadListPrec :: ReadPrec [DescribeFolderResolvedPermissionsResponse]
readPrec :: ReadPrec DescribeFolderResolvedPermissionsResponse
$creadPrec :: ReadPrec DescribeFolderResolvedPermissionsResponse
readList :: ReadS [DescribeFolderResolvedPermissionsResponse]
$creadList :: ReadS [DescribeFolderResolvedPermissionsResponse]
readsPrec :: Int -> ReadS DescribeFolderResolvedPermissionsResponse
$creadsPrec :: Int -> ReadS DescribeFolderResolvedPermissionsResponse
Prelude.Read, Int -> DescribeFolderResolvedPermissionsResponse -> ShowS
[DescribeFolderResolvedPermissionsResponse] -> ShowS
DescribeFolderResolvedPermissionsResponse -> String
(Int -> DescribeFolderResolvedPermissionsResponse -> ShowS)
-> (DescribeFolderResolvedPermissionsResponse -> String)
-> ([DescribeFolderResolvedPermissionsResponse] -> ShowS)
-> Show DescribeFolderResolvedPermissionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFolderResolvedPermissionsResponse] -> ShowS
$cshowList :: [DescribeFolderResolvedPermissionsResponse] -> ShowS
show :: DescribeFolderResolvedPermissionsResponse -> String
$cshow :: DescribeFolderResolvedPermissionsResponse -> String
showsPrec :: Int -> DescribeFolderResolvedPermissionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeFolderResolvedPermissionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeFolderResolvedPermissionsResponse
 -> Rep DescribeFolderResolvedPermissionsResponse x)
-> (forall x.
    Rep DescribeFolderResolvedPermissionsResponse x
    -> DescribeFolderResolvedPermissionsResponse)
-> Generic DescribeFolderResolvedPermissionsResponse
forall x.
Rep DescribeFolderResolvedPermissionsResponse x
-> DescribeFolderResolvedPermissionsResponse
forall x.
DescribeFolderResolvedPermissionsResponse
-> Rep DescribeFolderResolvedPermissionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFolderResolvedPermissionsResponse x
-> DescribeFolderResolvedPermissionsResponse
$cfrom :: forall x.
DescribeFolderResolvedPermissionsResponse
-> Rep DescribeFolderResolvedPermissionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFolderResolvedPermissionsResponse' 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', 'describeFolderResolvedPermissionsResponse_requestId' - The request ID.
--
-- 'arn', 'describeFolderResolvedPermissionsResponse_arn' - The Amazon Resource Name (ARN).
--
-- 'folderId', 'describeFolderResolvedPermissionsResponse_folderId' - The folder ID.
--
-- 'permissions', 'describeFolderResolvedPermissionsResponse_permissions' - Information about the permissions on the dashboard.
--
-- 'status', 'describeFolderResolvedPermissionsResponse_status' - The status. If succeeded, the status is @SC_OK@
newDescribeFolderResolvedPermissionsResponse ::
  -- | 'status'
  Prelude.Int ->
  DescribeFolderResolvedPermissionsResponse
newDescribeFolderResolvedPermissionsResponse :: Int -> DescribeFolderResolvedPermissionsResponse
newDescribeFolderResolvedPermissionsResponse Int
pStatus_ =
  DescribeFolderResolvedPermissionsResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty ResourcePermission)
-> Int
-> DescribeFolderResolvedPermissionsResponse
DescribeFolderResolvedPermissionsResponse'
    { $sel:requestId:DescribeFolderResolvedPermissionsResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeFolderResolvedPermissionsResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:folderId:DescribeFolderResolvedPermissionsResponse' :: Maybe Text
folderId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:permissions:DescribeFolderResolvedPermissionsResponse' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeFolderResolvedPermissionsResponse' :: Int
status = Int
pStatus_
    }

-- | The request ID.
describeFolderResolvedPermissionsResponse_requestId :: Lens.Lens' DescribeFolderResolvedPermissionsResponse (Prelude.Maybe Prelude.Text)
describeFolderResolvedPermissionsResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> DescribeFolderResolvedPermissionsResponse
-> f DescribeFolderResolvedPermissionsResponse
describeFolderResolvedPermissionsResponse_requestId = (DescribeFolderResolvedPermissionsResponse -> Maybe Text)
-> (DescribeFolderResolvedPermissionsResponse
    -> Maybe Text -> DescribeFolderResolvedPermissionsResponse)
-> Lens
     DescribeFolderResolvedPermissionsResponse
     DescribeFolderResolvedPermissionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFolderResolvedPermissionsResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:DescribeFolderResolvedPermissionsResponse' :: DescribeFolderResolvedPermissionsResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: DescribeFolderResolvedPermissionsResponse
s@DescribeFolderResolvedPermissionsResponse' {} Maybe Text
a -> DescribeFolderResolvedPermissionsResponse
s {$sel:requestId:DescribeFolderResolvedPermissionsResponse' :: Maybe Text
requestId = Maybe Text
a} :: DescribeFolderResolvedPermissionsResponse)

-- | The Amazon Resource Name (ARN).
describeFolderResolvedPermissionsResponse_arn :: Lens.Lens' DescribeFolderResolvedPermissionsResponse (Prelude.Maybe Prelude.Text)
describeFolderResolvedPermissionsResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeFolderResolvedPermissionsResponse
-> f DescribeFolderResolvedPermissionsResponse
describeFolderResolvedPermissionsResponse_arn = (DescribeFolderResolvedPermissionsResponse -> Maybe Text)
-> (DescribeFolderResolvedPermissionsResponse
    -> Maybe Text -> DescribeFolderResolvedPermissionsResponse)
-> Lens
     DescribeFolderResolvedPermissionsResponse
     DescribeFolderResolvedPermissionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFolderResolvedPermissionsResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeFolderResolvedPermissionsResponse' :: DescribeFolderResolvedPermissionsResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeFolderResolvedPermissionsResponse
s@DescribeFolderResolvedPermissionsResponse' {} Maybe Text
a -> DescribeFolderResolvedPermissionsResponse
s {$sel:arn:DescribeFolderResolvedPermissionsResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeFolderResolvedPermissionsResponse)

-- | The folder ID.
describeFolderResolvedPermissionsResponse_folderId :: Lens.Lens' DescribeFolderResolvedPermissionsResponse (Prelude.Maybe Prelude.Text)
describeFolderResolvedPermissionsResponse_folderId :: (Maybe Text -> f (Maybe Text))
-> DescribeFolderResolvedPermissionsResponse
-> f DescribeFolderResolvedPermissionsResponse
describeFolderResolvedPermissionsResponse_folderId = (DescribeFolderResolvedPermissionsResponse -> Maybe Text)
-> (DescribeFolderResolvedPermissionsResponse
    -> Maybe Text -> DescribeFolderResolvedPermissionsResponse)
-> Lens
     DescribeFolderResolvedPermissionsResponse
     DescribeFolderResolvedPermissionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFolderResolvedPermissionsResponse' {Maybe Text
folderId :: Maybe Text
$sel:folderId:DescribeFolderResolvedPermissionsResponse' :: DescribeFolderResolvedPermissionsResponse -> Maybe Text
folderId} -> Maybe Text
folderId) (\s :: DescribeFolderResolvedPermissionsResponse
s@DescribeFolderResolvedPermissionsResponse' {} Maybe Text
a -> DescribeFolderResolvedPermissionsResponse
s {$sel:folderId:DescribeFolderResolvedPermissionsResponse' :: Maybe Text
folderId = Maybe Text
a} :: DescribeFolderResolvedPermissionsResponse)

-- | Information about the permissions on the dashboard.
describeFolderResolvedPermissionsResponse_permissions :: Lens.Lens' DescribeFolderResolvedPermissionsResponse (Prelude.Maybe (Prelude.NonEmpty ResourcePermission))
describeFolderResolvedPermissionsResponse_permissions :: (Maybe (NonEmpty ResourcePermission)
 -> f (Maybe (NonEmpty ResourcePermission)))
-> DescribeFolderResolvedPermissionsResponse
-> f DescribeFolderResolvedPermissionsResponse
describeFolderResolvedPermissionsResponse_permissions = (DescribeFolderResolvedPermissionsResponse
 -> Maybe (NonEmpty ResourcePermission))
-> (DescribeFolderResolvedPermissionsResponse
    -> Maybe (NonEmpty ResourcePermission)
    -> DescribeFolderResolvedPermissionsResponse)
-> Lens
     DescribeFolderResolvedPermissionsResponse
     DescribeFolderResolvedPermissionsResponse
     (Maybe (NonEmpty ResourcePermission))
     (Maybe (NonEmpty ResourcePermission))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFolderResolvedPermissionsResponse' {Maybe (NonEmpty ResourcePermission)
permissions :: Maybe (NonEmpty ResourcePermission)
$sel:permissions:DescribeFolderResolvedPermissionsResponse' :: DescribeFolderResolvedPermissionsResponse
-> Maybe (NonEmpty ResourcePermission)
permissions} -> Maybe (NonEmpty ResourcePermission)
permissions) (\s :: DescribeFolderResolvedPermissionsResponse
s@DescribeFolderResolvedPermissionsResponse' {} Maybe (NonEmpty ResourcePermission)
a -> DescribeFolderResolvedPermissionsResponse
s {$sel:permissions:DescribeFolderResolvedPermissionsResponse' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
a} :: DescribeFolderResolvedPermissionsResponse) ((Maybe (NonEmpty ResourcePermission)
  -> f (Maybe (NonEmpty ResourcePermission)))
 -> DescribeFolderResolvedPermissionsResponse
 -> f DescribeFolderResolvedPermissionsResponse)
-> ((Maybe (NonEmpty ResourcePermission)
     -> f (Maybe (NonEmpty ResourcePermission)))
    -> Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> (Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> DescribeFolderResolvedPermissionsResponse
-> f DescribeFolderResolvedPermissionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty ResourcePermission)
  (NonEmpty ResourcePermission)
  (NonEmpty ResourcePermission)
  (NonEmpty ResourcePermission)
-> Iso
     (Maybe (NonEmpty ResourcePermission))
     (Maybe (NonEmpty ResourcePermission))
     (Maybe (NonEmpty ResourcePermission))
     (Maybe (NonEmpty ResourcePermission))
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
  (NonEmpty ResourcePermission)
  (NonEmpty ResourcePermission)
  (NonEmpty ResourcePermission)
  (NonEmpty ResourcePermission)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The status. If succeeded, the status is @SC_OK@
describeFolderResolvedPermissionsResponse_status :: Lens.Lens' DescribeFolderResolvedPermissionsResponse Prelude.Int
describeFolderResolvedPermissionsResponse_status :: (Int -> f Int)
-> DescribeFolderResolvedPermissionsResponse
-> f DescribeFolderResolvedPermissionsResponse
describeFolderResolvedPermissionsResponse_status = (DescribeFolderResolvedPermissionsResponse -> Int)
-> (DescribeFolderResolvedPermissionsResponse
    -> Int -> DescribeFolderResolvedPermissionsResponse)
-> Lens
     DescribeFolderResolvedPermissionsResponse
     DescribeFolderResolvedPermissionsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFolderResolvedPermissionsResponse' {Int
status :: Int
$sel:status:DescribeFolderResolvedPermissionsResponse' :: DescribeFolderResolvedPermissionsResponse -> Int
status} -> Int
status) (\s :: DescribeFolderResolvedPermissionsResponse
s@DescribeFolderResolvedPermissionsResponse' {} Int
a -> DescribeFolderResolvedPermissionsResponse
s {$sel:status:DescribeFolderResolvedPermissionsResponse' :: Int
status = Int
a} :: DescribeFolderResolvedPermissionsResponse)

instance
  Prelude.NFData
    DescribeFolderResolvedPermissionsResponse