{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_dashboardArn,
    describeDashboardPermissionsResponse_dashboardId,
    describeDashboardPermissionsResponse_linkSharingConfiguration,
    describeDashboardPermissionsResponse_permissions,
    describeDashboardPermissionsResponse_requestId,
    describeDashboardPermissionsResponse_status,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 IAM policy.
    DescribeDashboardPermissions -> Text
dashboardId :: Prelude.Text
  }
  deriving (DescribeDashboardPermissions
-> DescribeDashboardPermissions -> Bool
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]
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
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.
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 IAM policy.
newDescribeDashboardPermissions ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'dashboardId'
  Prelude.Text ->
  DescribeDashboardPermissions
newDescribeDashboardPermissions :: Text -> Text -> DescribeDashboardPermissions
newDescribeDashboardPermissions
  Text
pAwsAccountId_
  Text
pDashboardId_ =
    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 :: Lens' DescribeDashboardPermissions Text
describeDashboardPermissions_awsAccountId = 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 IAM policy.
describeDashboardPermissions_dashboardId :: Lens.Lens' DescribeDashboardPermissions Prelude.Text
describeDashboardPermissions_dashboardId :: Lens' DescribeDashboardPermissions Text
describeDashboardPermissions_dashboardId = 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 :: (Service -> Service)
-> DescribeDashboardPermissions
-> Request DescribeDashboardPermissions
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeDashboardPermissions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDashboardPermissions)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe LinkSharingConfiguration
-> Maybe (NonEmpty ResourcePermission)
-> Maybe Text
-> Int
-> DescribeDashboardPermissionsResponse
DescribeDashboardPermissionsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"DashboardArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"DashboardId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LinkSharingConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Permissions")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RequestId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DescribeDashboardPermissions
  where
  hashWithSalt :: Int -> DescribeDashboardPermissions -> Int
hashWithSalt Int
_salt DescribeDashboardPermissions' {Text
dashboardId :: Text
awsAccountId :: Text
$sel:dashboardId:DescribeDashboardPermissions' :: DescribeDashboardPermissions -> Text
$sel:awsAccountId:DescribeDashboardPermissions' :: DescribeDashboardPermissions -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awsAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dashboardId

instance Prelude.NFData DescribeDashboardPermissions where
  rnf :: DescribeDashboardPermissions -> ()
rnf DescribeDashboardPermissions' {Text
dashboardId :: Text
awsAccountId :: Text
$sel:dashboardId:DescribeDashboardPermissions' :: DescribeDashboardPermissions -> Text
$sel:awsAccountId:DescribeDashboardPermissions' :: DescribeDashboardPermissions -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
awsAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dashboardId

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

instance Data.ToPath DescribeDashboardPermissions where
  toPath :: DescribeDashboardPermissions -> ByteString
toPath DescribeDashboardPermissions' {Text
dashboardId :: Text
awsAccountId :: Text
$sel:dashboardId:DescribeDashboardPermissions' :: DescribeDashboardPermissions -> Text
$sel:awsAccountId:DescribeDashboardPermissions' :: DescribeDashboardPermissions -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
awsAccountId,
        ByteString
"/dashboards/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
dashboardId,
        ByteString
"/permissions"
      ]

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

-- | /See:/ 'newDescribeDashboardPermissionsResponse' smart constructor.
data DescribeDashboardPermissionsResponse = DescribeDashboardPermissionsResponse'
  { -- | The Amazon Resource Name (ARN) of the dashboard.
    DescribeDashboardPermissionsResponse -> Maybe Text
dashboardArn :: Prelude.Maybe Prelude.Text,
    -- | The ID for the dashboard.
    DescribeDashboardPermissionsResponse -> Maybe Text
dashboardId :: Prelude.Maybe Prelude.Text,
    -- | A structure that contains the configuration of a shareable link that
    -- grants access to the dashboard. Your users can use the link to view and
    -- interact with the dashboard, if the dashboard has been shared with them.
    -- For more information about sharing dashboards, see
    -- <https://docs.aws.amazon.com/quicksight/latest/user/sharing-a-dashboard.html Sharing Dashboards>.
    DescribeDashboardPermissionsResponse
-> Maybe LinkSharingConfiguration
linkSharingConfiguration :: Prelude.Maybe LinkSharingConfiguration,
    -- | A structure that contains the permissions for the dashboard.
    DescribeDashboardPermissionsResponse
-> Maybe (NonEmpty ResourcePermission)
permissions :: Prelude.Maybe (Prelude.NonEmpty ResourcePermission),
    -- | The Amazon Web Services request ID for this operation.
    DescribeDashboardPermissionsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status of the request.
    DescribeDashboardPermissionsResponse -> Int
status :: Prelude.Int
  }
  deriving (DescribeDashboardPermissionsResponse
-> DescribeDashboardPermissionsResponse -> Bool
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]
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
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.
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:
--
-- 'dashboardArn', 'describeDashboardPermissionsResponse_dashboardArn' - The Amazon Resource Name (ARN) of the dashboard.
--
-- 'dashboardId', 'describeDashboardPermissionsResponse_dashboardId' - The ID for the dashboard.
--
-- 'linkSharingConfiguration', 'describeDashboardPermissionsResponse_linkSharingConfiguration' - A structure that contains the configuration of a shareable link that
-- grants access to the dashboard. Your users can use the link to view and
-- interact with the dashboard, if the dashboard has been shared with them.
-- For more information about sharing dashboards, see
-- <https://docs.aws.amazon.com/quicksight/latest/user/sharing-a-dashboard.html Sharing Dashboards>.
--
-- 'permissions', 'describeDashboardPermissionsResponse_permissions' - A structure that contains the permissions for the dashboard.
--
-- 'requestId', 'describeDashboardPermissionsResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'status', 'describeDashboardPermissionsResponse_status' - The HTTP status of the request.
newDescribeDashboardPermissionsResponse ::
  -- | 'status'
  Prelude.Int ->
  DescribeDashboardPermissionsResponse
newDescribeDashboardPermissionsResponse :: Int -> DescribeDashboardPermissionsResponse
newDescribeDashboardPermissionsResponse Int
pStatus_ =
  DescribeDashboardPermissionsResponse'
    { $sel:dashboardArn:DescribeDashboardPermissionsResponse' :: Maybe Text
dashboardArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dashboardId:DescribeDashboardPermissionsResponse' :: Maybe Text
dashboardId = forall a. Maybe a
Prelude.Nothing,
      $sel:linkSharingConfiguration:DescribeDashboardPermissionsResponse' :: Maybe LinkSharingConfiguration
linkSharingConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:permissions:DescribeDashboardPermissionsResponse' :: Maybe (NonEmpty ResourcePermission)
permissions = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:DescribeDashboardPermissionsResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeDashboardPermissionsResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Resource Name (ARN) of the dashboard.
describeDashboardPermissionsResponse_dashboardArn :: Lens.Lens' DescribeDashboardPermissionsResponse (Prelude.Maybe Prelude.Text)
describeDashboardPermissionsResponse_dashboardArn :: Lens' DescribeDashboardPermissionsResponse (Maybe Text)
describeDashboardPermissionsResponse_dashboardArn = 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 ID for the dashboard.
describeDashboardPermissionsResponse_dashboardId :: Lens.Lens' DescribeDashboardPermissionsResponse (Prelude.Maybe Prelude.Text)
describeDashboardPermissionsResponse_dashboardId :: Lens' DescribeDashboardPermissionsResponse (Maybe Text)
describeDashboardPermissionsResponse_dashboardId = 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 configuration of a shareable link that
-- grants access to the dashboard. Your users can use the link to view and
-- interact with the dashboard, if the dashboard has been shared with them.
-- For more information about sharing dashboards, see
-- <https://docs.aws.amazon.com/quicksight/latest/user/sharing-a-dashboard.html Sharing Dashboards>.
describeDashboardPermissionsResponse_linkSharingConfiguration :: Lens.Lens' DescribeDashboardPermissionsResponse (Prelude.Maybe LinkSharingConfiguration)
describeDashboardPermissionsResponse_linkSharingConfiguration :: Lens'
  DescribeDashboardPermissionsResponse
  (Maybe LinkSharingConfiguration)
describeDashboardPermissionsResponse_linkSharingConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDashboardPermissionsResponse' {Maybe LinkSharingConfiguration
linkSharingConfiguration :: Maybe LinkSharingConfiguration
$sel:linkSharingConfiguration:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse
-> Maybe LinkSharingConfiguration
linkSharingConfiguration} -> Maybe LinkSharingConfiguration
linkSharingConfiguration) (\s :: DescribeDashboardPermissionsResponse
s@DescribeDashboardPermissionsResponse' {} Maybe LinkSharingConfiguration
a -> DescribeDashboardPermissionsResponse
s {$sel:linkSharingConfiguration:DescribeDashboardPermissionsResponse' :: Maybe LinkSharingConfiguration
linkSharingConfiguration = Maybe LinkSharingConfiguration
a} :: DescribeDashboardPermissionsResponse)

-- | A structure that contains the permissions for the dashboard.
describeDashboardPermissionsResponse_permissions :: Lens.Lens' DescribeDashboardPermissionsResponse (Prelude.Maybe (Prelude.NonEmpty ResourcePermission))
describeDashboardPermissionsResponse_permissions :: Lens'
  DescribeDashboardPermissionsResponse
  (Maybe (NonEmpty ResourcePermission))
describeDashboardPermissionsResponse_permissions = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Web Services request ID for this operation.
describeDashboardPermissionsResponse_requestId :: Lens.Lens' DescribeDashboardPermissionsResponse (Prelude.Maybe Prelude.Text)
describeDashboardPermissionsResponse_requestId :: Lens' DescribeDashboardPermissionsResponse (Maybe Text)
describeDashboardPermissionsResponse_requestId = 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 HTTP status of the request.
describeDashboardPermissionsResponse_status :: Lens.Lens' DescribeDashboardPermissionsResponse Prelude.Int
describeDashboardPermissionsResponse_status :: Lens' DescribeDashboardPermissionsResponse Int
describeDashboardPermissionsResponse_status = 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
  where
  rnf :: DescribeDashboardPermissionsResponse -> ()
rnf DescribeDashboardPermissionsResponse' {Int
Maybe (NonEmpty ResourcePermission)
Maybe Text
Maybe LinkSharingConfiguration
status :: Int
requestId :: Maybe Text
permissions :: Maybe (NonEmpty ResourcePermission)
linkSharingConfiguration :: Maybe LinkSharingConfiguration
dashboardId :: Maybe Text
dashboardArn :: Maybe Text
$sel:status:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse -> Int
$sel:requestId:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse -> Maybe Text
$sel:permissions:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse
-> Maybe (NonEmpty ResourcePermission)
$sel:linkSharingConfiguration:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse
-> Maybe LinkSharingConfiguration
$sel:dashboardId:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse -> Maybe Text
$sel:dashboardArn:DescribeDashboardPermissionsResponse' :: DescribeDashboardPermissionsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dashboardArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dashboardId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LinkSharingConfiguration
linkSharingConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty ResourcePermission)
permissions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
status