{-# 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.DescribeDashboardPermissions
-- 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 read and write permissions for a dashboard.
module Amazonka.QuickSight.DescribeDashboardPermissions
  ( -- * Creating a Request
    DescribeDashboardPermissions (..),
    newDescribeDashboardPermissions,

    -- * Request Lenses
    describeDashboardPermissions_awsAccountId,
    describeDashboardPermissions_dashboardId,

    -- * Destructuring the Response
    DescribeDashboardPermissionsResponse (..),
    newDescribeDashboardPermissionsResponse,

    -- * Response Lenses
    describeDashboardPermissionsResponse_requestId,
    describeDashboardPermissionsResponse_dashboardId,
    describeDashboardPermissionsResponse_permissions,
    describeDashboardPermissionsResponse_dashboardArn,
    describeDashboardPermissionsResponse_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:/ 'newDescribeDashboardPermissions' smart constructor.
data DescribeDashboardPermissions = DescribeDashboardPermissions'
  { -- | The ID of the Amazon Web Services account that contains the dashboard
    -- that you\'re describing permissions for.
    DescribeDashboardPermissions -> Text
awsAccountId :: Prelude.Text,
    -- | The ID for the dashboard, also added to the IAMpolicy.
    DescribeDashboardPermissions -> Text
dashboardId :: Prelude.Text
  }
  deriving (DescribeDashboardPermissions
-> DescribeDashboardPermissions -> Bool
(DescribeDashboardPermissions
 -> DescribeDashboardPermissions -> Bool)
-> (DescribeDashboardPermissions
    -> DescribeDashboardPermissions -> Bool)
-> Eq DescribeDashboardPermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDashboardPermissions
-> DescribeDashboardPermissions -> Bool
$c/= :: DescribeDashboardPermissions
-> DescribeDashboardPermissions -> Bool
== :: DescribeDashboardPermissions
-> DescribeDashboardPermissions -> Bool
$c== :: DescribeDashboardPermissions
-> DescribeDashboardPermissions -> Bool
Prelude.Eq, ReadPrec [DescribeDashboardPermissions]
ReadPrec DescribeDashboardPermissions
Int -> ReadS DescribeDashboardPermissions
ReadS [DescribeDashboardPermissions]
(Int -> ReadS DescribeDashboardPermissions)
-> ReadS [DescribeDashboardPermissions]
-> ReadPrec DescribeDashboardPermissions
-> ReadPrec [DescribeDashboardPermissions]
-> Read DescribeDashboardPermissions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDashboardPermissions]
$creadListPrec :: ReadPrec [DescribeDashboardPermissions]
readPrec :: ReadPrec DescribeDashboardPermissions
$creadPrec :: ReadPrec DescribeDashboardPermissions
readList :: ReadS [DescribeDashboardPermissions]
$creadList :: ReadS [DescribeDashboardPermissions]
readsPrec :: Int -> ReadS DescribeDashboardPermissions
$creadsPrec :: Int -> ReadS DescribeDashboardPermissions
Prelude.Read, Int -> DescribeDashboardPermissions -> ShowS
[DescribeDashboardPermissions] -> ShowS
DescribeDashboardPermissions -> String
(Int -> DescribeDashboardPermissions -> ShowS)
-> (DescribeDashboardPermissions -> String)
-> ([DescribeDashboardPermissions] -> ShowS)
-> Show DescribeDashboardPermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDashboardPermissions] -> ShowS
$cshowList :: [DescribeDashboardPermissions] -> ShowS
show :: DescribeDashboardPermissions -> String
$cshow :: DescribeDashboardPermissions -> String
showsPrec :: Int -> DescribeDashboardPermissions -> ShowS
$cshowsPrec :: Int -> DescribeDashboardPermissions -> ShowS
Prelude.Show, (forall x.
 DescribeDashboardPermissions -> Rep DescribeDashboardPermissions x)
-> (forall x.
    Rep DescribeDashboardPermissions x -> DescribeDashboardPermissions)
-> Generic DescribeDashboardPermissions
forall x.
Rep DescribeDashboardPermissions x -> DescribeDashboardPermissions
forall x.
DescribeDashboardPermissions -> Rep DescribeDashboardPermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDashboardPermissions x -> DescribeDashboardPermissions
$cfrom :: forall x.
DescribeDashboardPermissions -> Rep DescribeDashboardPermissions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDashboardPermissions' 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', 'describeDashboardPermissions_awsAccountId' - The ID of the Amazon Web Services account that contains the dashboard
-- that you\'re describing permissions for.
--
-- 'dashboardId', 'describeDashboardPermissions_dashboardId' - The ID for the dashboard, also added to the IAMpolicy.
newDescribeDashboardPermissions ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'dashboardId'
  Prelude.Text ->
  DescribeDashboardPermissions
newDescribeDashboardPermissions :: Text -> Text -> DescribeDashboardPermissions
newDescribeDashboardPermissions
  Text
pAwsAccountId_
  Text
pDashboardId_ =
    DescribeDashboardPermissions' :: Text -> Text -> DescribeDashboardPermissions
DescribeDashboardPermissions'
      { $sel:awsAccountId:DescribeDashboardPermissions' :: Text
awsAccountId =
          Text
pAwsAccountId_,
        $sel:dashboardId:DescribeDashboardPermissions' :: Text
dashboardId = Text
pDashboardId_
      }

-- | The ID of the Amazon Web Services account that contains the dashboard
-- that you\'re describing permissions for.
describeDashboardPermissions_awsAccountId :: Lens.Lens' DescribeDashboardPermissions Prelude.Text
describeDashboardPermissions_awsAccountId :: (Text -> f Text)
-> DescribeDashboardPermissions -> f DescribeDashboardPermissions
describeDashboardPermissions_awsAccountId = (DescribeDashboardPermissions -> Text)
-> (DescribeDashboardPermissions
    -> Text -> DescribeDashboardPermissions)
-> Lens
     DescribeDashboardPermissions DescribeDashboardPermissions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDashboardPermissions' {Text
awsAccountId :: Text
$sel:awsAccountId:DescribeDashboardPermissions' :: DescribeDashboardPermissions -> Text
awsAccountId} -> Text
awsAccountId) (\s :: DescribeDashboardPermissions
s@DescribeDashboardPermissions' {} Text
a -> DescribeDashboardPermissions
s {$sel:awsAccountId:DescribeDashboardPermissions' :: Text
awsAccountId = Text
a} :: DescribeDashboardPermissions)

-- | The ID for the dashboard, also added to the IAMpolicy.
describeDashboardPermissions_dashboardId :: Lens.Lens' DescribeDashboardPermissions Prelude.Text
describeDashboardPermissions_dashboardId :: (Text -> f Text)
-> DescribeDashboardPermissions -> f DescribeDashboardPermissions
describeDashboardPermissions_dashboardId = (DescribeDashboardPermissions -> Text)
-> (DescribeDashboardPermissions
    -> Text -> DescribeDashboardPermissions)
-> Lens
     DescribeDashboardPermissions DescribeDashboardPermissions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDashboardPermissions' {Text
dashboardId :: Text
$sel:dashboardId:DescribeDashboardPermissions' :: DescribeDashboardPermissions -> Text
dashboardId} -> Text
dashboardId) (\s :: DescribeDashboardPermissions
s@DescribeDashboardPermissions' {} Text
a -> DescribeDashboardPermissions
s {$sel:dashboardId:DescribeDashboardPermissions' :: Text
dashboardId = Text
a} :: DescribeDashboardPermissions)

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

instance Prelude.NFData DescribeDashboardPermissions

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

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

-- | /See:/ 'newDescribeDashboardPermissionsResponse' smart constructor.
data DescribeDashboardPermissionsResponse = DescribeDashboardPermissionsResponse'
  { -- | The Amazon Web Services request ID for this operation.
    DescribeDashboardPermissionsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The ID for the dashboard.
    DescribeDashboardPermissionsResponse -> Maybe Text
dashboardId :: Prelude.Maybe Prelude.Text,
    -- | A structure that contains the permissions for the dashboard.
    DescribeDashboardPermissionsResponse
-> Maybe (NonEmpty ResourcePermission)
permissions :: Prelude.Maybe (Prelude.NonEmpty ResourcePermission),
    -- | The Amazon Resource Name (ARN) of the dashboard.
    DescribeDashboardPermissionsResponse -> Maybe Text
dashboardArn :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status of the request.
    DescribeDashboardPermissionsResponse -> Int
status :: Prelude.Int
  }
  deriving (DescribeDashboardPermissionsResponse
-> DescribeDashboardPermissionsResponse -> Bool
(DescribeDashboardPermissionsResponse
 -> DescribeDashboardPermissionsResponse -> Bool)
-> (DescribeDashboardPermissionsResponse
    -> DescribeDashboardPermissionsResponse -> Bool)
-> Eq DescribeDashboardPermissionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDashboardPermissionsResponse
-> DescribeDashboardPermissionsResponse -> Bool
$c/= :: DescribeDashboardPermissionsResponse
-> DescribeDashboardPermissionsResponse -> Bool
== :: DescribeDashboardPermissionsResponse
-> DescribeDashboardPermissionsResponse -> Bool
$c== :: DescribeDashboardPermissionsResponse
-> DescribeDashboardPermissionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDashboardPermissionsResponse]
ReadPrec DescribeDashboardPermissionsResponse
Int -> ReadS DescribeDashboardPermissionsResponse
ReadS [DescribeDashboardPermissionsResponse]
(Int -> ReadS DescribeDashboardPermissionsResponse)
-> ReadS [DescribeDashboardPermissionsResponse]
-> ReadPrec DescribeDashboardPermissionsResponse
-> ReadPrec [DescribeDashboardPermissionsResponse]
-> Read DescribeDashboardPermissionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDashboardPermissionsResponse]
$creadListPrec :: ReadPrec [DescribeDashboardPermissionsResponse]
readPrec :: ReadPrec DescribeDashboardPermissionsResponse
$creadPrec :: ReadPrec DescribeDashboardPermissionsResponse
readList :: ReadS [DescribeDashboardPermissionsResponse]
$creadList :: ReadS [DescribeDashboardPermissionsResponse]
readsPrec :: Int -> ReadS DescribeDashboardPermissionsResponse
$creadsPrec :: Int -> ReadS DescribeDashboardPermissionsResponse
Prelude.Read, Int -> DescribeDashboardPermissionsResponse -> ShowS
[DescribeDashboardPermissionsResponse] -> ShowS
DescribeDashboardPermissionsResponse -> String
(Int -> DescribeDashboardPermissionsResponse -> ShowS)
-> (DescribeDashboardPermissionsResponse -> String)
-> ([DescribeDashboardPermissionsResponse] -> ShowS)
-> Show DescribeDashboardPermissionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDashboardPermissionsResponse] -> ShowS
$cshowList :: [DescribeDashboardPermissionsResponse] -> ShowS
show :: DescribeDashboardPermissionsResponse -> String
$cshow :: DescribeDashboardPermissionsResponse -> String
showsPrec :: Int -> DescribeDashboardPermissionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDashboardPermissionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDashboardPermissionsResponse
 -> Rep DescribeDashboardPermissionsResponse x)
-> (forall x.
    Rep DescribeDashboardPermissionsResponse x
    -> DescribeDashboardPermissionsResponse)
-> Generic DescribeDashboardPermissionsResponse
forall x.
Rep DescribeDashboardPermissionsResponse x
-> DescribeDashboardPermissionsResponse
forall x.
DescribeDashboardPermissionsResponse
-> Rep DescribeDashboardPermissionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDashboardPermissionsResponse x
-> DescribeDashboardPermissionsResponse
$cfrom :: forall x.
DescribeDashboardPermissionsResponse
-> Rep DescribeDashboardPermissionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDashboardPermissionsResponse' 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', 'describeDashboardPermissionsResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'dashboardId', 'describeDashboardPermissionsResponse_dashboardId' - The ID for the dashboard.
--
-- 'permissions', 'describeDashboardPermissionsResponse_permissions' - A structure that contains the permissions for the dashboard.
--
-- 'dashboardArn', 'describeDashboardPermissionsResponse_dashboardArn' - The Amazon Resource Name (ARN) of the dashboard.
--
-- 'status', 'describeDashboardPermissionsResponse_status' - The HTTP status of the request.
newDescribeDashboardPermissionsResponse ::
  -- | 'status'
  Prelude.Int ->
  DescribeDashboardPermissionsResponse
newDescribeDashboardPermissionsResponse :: Int -> DescribeDashboardPermissionsResponse
newDescribeDashboardPermissionsResponse Int
pStatus_ =
  DescribeDashboardPermissionsResponse' :: Maybe Text
-> Maybe Text
-> Maybe (NonEmpty ResourcePermission)
-> Maybe Text
-> Int
-> DescribeDashboardPermissionsResponse
DescribeDashboardPermissionsResponse'
    { $sel:requestId:DescribeDashboardPermissionsResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dashboardId:DescribeDashboardPermissionsResponse' :: Maybe Text
dashboardId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:permissions:DescribeDashboardPermissionsResponse' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
forall a. Maybe a
Prelude.Nothing,
      $sel:dashboardArn:DescribeDashboardPermissionsResponse' :: Maybe Text
dashboardArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeDashboardPermissionsResponse' :: Int
status = Int
pStatus_
    }

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

-- | The ID for the dashboard.
describeDashboardPermissionsResponse_dashboardId :: Lens.Lens' DescribeDashboardPermissionsResponse (Prelude.Maybe Prelude.Text)
describeDashboardPermissionsResponse_dashboardId :: (Maybe Text -> f (Maybe Text))
-> DescribeDashboardPermissionsResponse
-> f DescribeDashboardPermissionsResponse
describeDashboardPermissionsResponse_dashboardId = (DescribeDashboardPermissionsResponse -> Maybe Text)
-> (DescribeDashboardPermissionsResponse
    -> Maybe Text -> DescribeDashboardPermissionsResponse)
-> Lens
     DescribeDashboardPermissionsResponse
     DescribeDashboardPermissionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDashboardPermissionsResponse' {Maybe Text
dashboardId :: Maybe Text
$sel:dashboardId:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse -> Maybe Text
dashboardId} -> Maybe Text
dashboardId) (\s :: DescribeDashboardPermissionsResponse
s@DescribeDashboardPermissionsResponse' {} Maybe Text
a -> DescribeDashboardPermissionsResponse
s {$sel:dashboardId:DescribeDashboardPermissionsResponse' :: Maybe Text
dashboardId = Maybe Text
a} :: DescribeDashboardPermissionsResponse)

-- | A structure that contains the permissions for the dashboard.
describeDashboardPermissionsResponse_permissions :: Lens.Lens' DescribeDashboardPermissionsResponse (Prelude.Maybe (Prelude.NonEmpty ResourcePermission))
describeDashboardPermissionsResponse_permissions :: (Maybe (NonEmpty ResourcePermission)
 -> f (Maybe (NonEmpty ResourcePermission)))
-> DescribeDashboardPermissionsResponse
-> f DescribeDashboardPermissionsResponse
describeDashboardPermissionsResponse_permissions = (DescribeDashboardPermissionsResponse
 -> Maybe (NonEmpty ResourcePermission))
-> (DescribeDashboardPermissionsResponse
    -> Maybe (NonEmpty ResourcePermission)
    -> DescribeDashboardPermissionsResponse)
-> Lens
     DescribeDashboardPermissionsResponse
     DescribeDashboardPermissionsResponse
     (Maybe (NonEmpty ResourcePermission))
     (Maybe (NonEmpty ResourcePermission))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDashboardPermissionsResponse' {Maybe (NonEmpty ResourcePermission)
permissions :: Maybe (NonEmpty ResourcePermission)
$sel:permissions:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse
-> Maybe (NonEmpty ResourcePermission)
permissions} -> Maybe (NonEmpty ResourcePermission)
permissions) (\s :: DescribeDashboardPermissionsResponse
s@DescribeDashboardPermissionsResponse' {} Maybe (NonEmpty ResourcePermission)
a -> DescribeDashboardPermissionsResponse
s {$sel:permissions:DescribeDashboardPermissionsResponse' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
a} :: DescribeDashboardPermissionsResponse) ((Maybe (NonEmpty ResourcePermission)
  -> f (Maybe (NonEmpty ResourcePermission)))
 -> DescribeDashboardPermissionsResponse
 -> f DescribeDashboardPermissionsResponse)
-> ((Maybe (NonEmpty ResourcePermission)
     -> f (Maybe (NonEmpty ResourcePermission)))
    -> Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> (Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> DescribeDashboardPermissionsResponse
-> f DescribeDashboardPermissionsResponse
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 Amazon Resource Name (ARN) of the dashboard.
describeDashboardPermissionsResponse_dashboardArn :: Lens.Lens' DescribeDashboardPermissionsResponse (Prelude.Maybe Prelude.Text)
describeDashboardPermissionsResponse_dashboardArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDashboardPermissionsResponse
-> f DescribeDashboardPermissionsResponse
describeDashboardPermissionsResponse_dashboardArn = (DescribeDashboardPermissionsResponse -> Maybe Text)
-> (DescribeDashboardPermissionsResponse
    -> Maybe Text -> DescribeDashboardPermissionsResponse)
-> Lens
     DescribeDashboardPermissionsResponse
     DescribeDashboardPermissionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDashboardPermissionsResponse' {Maybe Text
dashboardArn :: Maybe Text
$sel:dashboardArn:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse -> Maybe Text
dashboardArn} -> Maybe Text
dashboardArn) (\s :: DescribeDashboardPermissionsResponse
s@DescribeDashboardPermissionsResponse' {} Maybe Text
a -> DescribeDashboardPermissionsResponse
s {$sel:dashboardArn:DescribeDashboardPermissionsResponse' :: Maybe Text
dashboardArn = Maybe Text
a} :: DescribeDashboardPermissionsResponse)

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

instance
  Prelude.NFData
    DescribeDashboardPermissionsResponse