{-# 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.DescribeFolderPermissions
-- 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 permissions for a folder.
module Amazonka.QuickSight.DescribeFolderPermissions
  ( -- * Creating a Request
    DescribeFolderPermissions (..),
    newDescribeFolderPermissions,

    -- * Request Lenses
    describeFolderPermissions_awsAccountId,
    describeFolderPermissions_folderId,

    -- * Destructuring the Response
    DescribeFolderPermissionsResponse (..),
    newDescribeFolderPermissionsResponse,

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

-- |
-- Create a value of 'DescribeFolderPermissions' 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', 'describeFolderPermissions_awsAccountId' - The AWS Account ID.
--
-- 'folderId', 'describeFolderPermissions_folderId' - The folder ID.
newDescribeFolderPermissions ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'folderId'
  Prelude.Text ->
  DescribeFolderPermissions
newDescribeFolderPermissions :: Text -> Text -> DescribeFolderPermissions
newDescribeFolderPermissions
  Text
pAwsAccountId_
  Text
pFolderId_ =
    DescribeFolderPermissions' :: Text -> Text -> DescribeFolderPermissions
DescribeFolderPermissions'
      { $sel:awsAccountId:DescribeFolderPermissions' :: Text
awsAccountId =
          Text
pAwsAccountId_,
        $sel:folderId:DescribeFolderPermissions' :: Text
folderId = Text
pFolderId_
      }

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

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

instance Core.AWSRequest DescribeFolderPermissions where
  type
    AWSResponse DescribeFolderPermissions =
      DescribeFolderPermissionsResponse
  request :: DescribeFolderPermissions -> Request DescribeFolderPermissions
request = Service
-> DescribeFolderPermissions -> Request DescribeFolderPermissions
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeFolderPermissions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeFolderPermissions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeFolderPermissions))
-> Logger
-> Service
-> Proxy DescribeFolderPermissions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeFolderPermissions)))
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
-> DescribeFolderPermissionsResponse
DescribeFolderPermissionsResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (NonEmpty ResourcePermission)
 -> Int
 -> DescribeFolderPermissionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty ResourcePermission)
      -> Int
      -> DescribeFolderPermissionsResponse)
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
   -> DescribeFolderPermissionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (NonEmpty ResourcePermission)
      -> Int
      -> DescribeFolderPermissionsResponse)
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
   -> DescribeFolderPermissionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (NonEmpty ResourcePermission)
      -> Int -> DescribeFolderPermissionsResponse)
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 -> DescribeFolderPermissionsResponse)
-> Either String (Maybe (NonEmpty ResourcePermission))
-> Either String (Int -> DescribeFolderPermissionsResponse)
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 -> DescribeFolderPermissionsResponse)
-> Either String Int
-> Either String DescribeFolderPermissionsResponse
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 DescribeFolderPermissions

instance Prelude.NFData DescribeFolderPermissions

instance Core.ToHeaders DescribeFolderPermissions where
  toHeaders :: DescribeFolderPermissions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeFolderPermissions -> 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 DescribeFolderPermissions where
  toPath :: DescribeFolderPermissions -> ByteString
toPath DescribeFolderPermissions' {Text
folderId :: Text
awsAccountId :: Text
$sel:folderId:DescribeFolderPermissions' :: DescribeFolderPermissions -> Text
$sel:awsAccountId:DescribeFolderPermissions' :: DescribeFolderPermissions -> 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
"/permissions"
      ]

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

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

-- |
-- Create a value of 'DescribeFolderPermissionsResponse' 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', 'describeFolderPermissionsResponse_requestId' - The request ID.
--
-- 'arn', 'describeFolderPermissionsResponse_arn' - The Amazon Resource Name (ARN) for the folder.
--
-- 'folderId', 'describeFolderPermissionsResponse_folderId' - The folder ID.
--
-- 'permissions', 'describeFolderPermissionsResponse_permissions' - Information about the permissions on the folder.
--
-- 'status', 'describeFolderPermissionsResponse_status' - The status. If succeeded, the status is @SC_OK@.
newDescribeFolderPermissionsResponse ::
  -- | 'status'
  Prelude.Int ->
  DescribeFolderPermissionsResponse
newDescribeFolderPermissionsResponse :: Int -> DescribeFolderPermissionsResponse
newDescribeFolderPermissionsResponse Int
pStatus_ =
  DescribeFolderPermissionsResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty ResourcePermission)
-> Int
-> DescribeFolderPermissionsResponse
DescribeFolderPermissionsResponse'
    { $sel:requestId:DescribeFolderPermissionsResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeFolderPermissionsResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:folderId:DescribeFolderPermissionsResponse' :: Maybe Text
folderId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:permissions:DescribeFolderPermissionsResponse' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeFolderPermissionsResponse' :: Int
status = Int
pStatus_
    }

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

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

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

-- | Information about the permissions on the folder.
describeFolderPermissionsResponse_permissions :: Lens.Lens' DescribeFolderPermissionsResponse (Prelude.Maybe (Prelude.NonEmpty ResourcePermission))
describeFolderPermissionsResponse_permissions :: (Maybe (NonEmpty ResourcePermission)
 -> f (Maybe (NonEmpty ResourcePermission)))
-> DescribeFolderPermissionsResponse
-> f DescribeFolderPermissionsResponse
describeFolderPermissionsResponse_permissions = (DescribeFolderPermissionsResponse
 -> Maybe (NonEmpty ResourcePermission))
-> (DescribeFolderPermissionsResponse
    -> Maybe (NonEmpty ResourcePermission)
    -> DescribeFolderPermissionsResponse)
-> Lens
     DescribeFolderPermissionsResponse
     DescribeFolderPermissionsResponse
     (Maybe (NonEmpty ResourcePermission))
     (Maybe (NonEmpty ResourcePermission))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFolderPermissionsResponse' {Maybe (NonEmpty ResourcePermission)
permissions :: Maybe (NonEmpty ResourcePermission)
$sel:permissions:DescribeFolderPermissionsResponse' :: DescribeFolderPermissionsResponse
-> Maybe (NonEmpty ResourcePermission)
permissions} -> Maybe (NonEmpty ResourcePermission)
permissions) (\s :: DescribeFolderPermissionsResponse
s@DescribeFolderPermissionsResponse' {} Maybe (NonEmpty ResourcePermission)
a -> DescribeFolderPermissionsResponse
s {$sel:permissions:DescribeFolderPermissionsResponse' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
a} :: DescribeFolderPermissionsResponse) ((Maybe (NonEmpty ResourcePermission)
  -> f (Maybe (NonEmpty ResourcePermission)))
 -> DescribeFolderPermissionsResponse
 -> f DescribeFolderPermissionsResponse)
-> ((Maybe (NonEmpty ResourcePermission)
     -> f (Maybe (NonEmpty ResourcePermission)))
    -> Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> (Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> DescribeFolderPermissionsResponse
-> f DescribeFolderPermissionsResponse
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@.
describeFolderPermissionsResponse_status :: Lens.Lens' DescribeFolderPermissionsResponse Prelude.Int
describeFolderPermissionsResponse_status :: (Int -> f Int)
-> DescribeFolderPermissionsResponse
-> f DescribeFolderPermissionsResponse
describeFolderPermissionsResponse_status = (DescribeFolderPermissionsResponse -> Int)
-> (DescribeFolderPermissionsResponse
    -> Int -> DescribeFolderPermissionsResponse)
-> Lens
     DescribeFolderPermissionsResponse
     DescribeFolderPermissionsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFolderPermissionsResponse' {Int
status :: Int
$sel:status:DescribeFolderPermissionsResponse' :: DescribeFolderPermissionsResponse -> Int
status} -> Int
status) (\s :: DescribeFolderPermissionsResponse
s@DescribeFolderPermissionsResponse' {} Int
a -> DescribeFolderPermissionsResponse
s {$sel:status:DescribeFolderPermissionsResponse' :: Int
status = Int
a} :: DescribeFolderPermissionsResponse)

instance
  Prelude.NFData
    DescribeFolderPermissionsResponse