{-# 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.DescribeDataSetPermissions
-- 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 permissions on a dataset.
--
-- The permissions resource is
-- @arn:aws:quicksight:region:aws-account-id:dataset\/data-set-id@.
module Amazonka.QuickSight.DescribeDataSetPermissions
  ( -- * Creating a Request
    DescribeDataSetPermissions (..),
    newDescribeDataSetPermissions,

    -- * Request Lenses
    describeDataSetPermissions_awsAccountId,
    describeDataSetPermissions_dataSetId,

    -- * Destructuring the Response
    DescribeDataSetPermissionsResponse (..),
    newDescribeDataSetPermissionsResponse,

    -- * Response Lenses
    describeDataSetPermissionsResponse_requestId,
    describeDataSetPermissionsResponse_dataSetArn,
    describeDataSetPermissionsResponse_dataSetId,
    describeDataSetPermissionsResponse_permissions,
    describeDataSetPermissionsResponse_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:/ 'newDescribeDataSetPermissions' smart constructor.
data DescribeDataSetPermissions = DescribeDataSetPermissions'
  { -- | The Amazon Web Services account ID.
    DescribeDataSetPermissions -> Text
awsAccountId :: Prelude.Text,
    -- | The ID for the dataset that you want to create. This ID is unique per
    -- Amazon Web Services Region for each Amazon Web Services account.
    DescribeDataSetPermissions -> Text
dataSetId :: Prelude.Text
  }
  deriving (DescribeDataSetPermissions -> DescribeDataSetPermissions -> Bool
(DescribeDataSetPermissions -> DescribeDataSetPermissions -> Bool)
-> (DescribeDataSetPermissions
    -> DescribeDataSetPermissions -> Bool)
-> Eq DescribeDataSetPermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDataSetPermissions -> DescribeDataSetPermissions -> Bool
$c/= :: DescribeDataSetPermissions -> DescribeDataSetPermissions -> Bool
== :: DescribeDataSetPermissions -> DescribeDataSetPermissions -> Bool
$c== :: DescribeDataSetPermissions -> DescribeDataSetPermissions -> Bool
Prelude.Eq, ReadPrec [DescribeDataSetPermissions]
ReadPrec DescribeDataSetPermissions
Int -> ReadS DescribeDataSetPermissions
ReadS [DescribeDataSetPermissions]
(Int -> ReadS DescribeDataSetPermissions)
-> ReadS [DescribeDataSetPermissions]
-> ReadPrec DescribeDataSetPermissions
-> ReadPrec [DescribeDataSetPermissions]
-> Read DescribeDataSetPermissions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDataSetPermissions]
$creadListPrec :: ReadPrec [DescribeDataSetPermissions]
readPrec :: ReadPrec DescribeDataSetPermissions
$creadPrec :: ReadPrec DescribeDataSetPermissions
readList :: ReadS [DescribeDataSetPermissions]
$creadList :: ReadS [DescribeDataSetPermissions]
readsPrec :: Int -> ReadS DescribeDataSetPermissions
$creadsPrec :: Int -> ReadS DescribeDataSetPermissions
Prelude.Read, Int -> DescribeDataSetPermissions -> ShowS
[DescribeDataSetPermissions] -> ShowS
DescribeDataSetPermissions -> String
(Int -> DescribeDataSetPermissions -> ShowS)
-> (DescribeDataSetPermissions -> String)
-> ([DescribeDataSetPermissions] -> ShowS)
-> Show DescribeDataSetPermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDataSetPermissions] -> ShowS
$cshowList :: [DescribeDataSetPermissions] -> ShowS
show :: DescribeDataSetPermissions -> String
$cshow :: DescribeDataSetPermissions -> String
showsPrec :: Int -> DescribeDataSetPermissions -> ShowS
$cshowsPrec :: Int -> DescribeDataSetPermissions -> ShowS
Prelude.Show, (forall x.
 DescribeDataSetPermissions -> Rep DescribeDataSetPermissions x)
-> (forall x.
    Rep DescribeDataSetPermissions x -> DescribeDataSetPermissions)
-> Generic DescribeDataSetPermissions
forall x.
Rep DescribeDataSetPermissions x -> DescribeDataSetPermissions
forall x.
DescribeDataSetPermissions -> Rep DescribeDataSetPermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDataSetPermissions x -> DescribeDataSetPermissions
$cfrom :: forall x.
DescribeDataSetPermissions -> Rep DescribeDataSetPermissions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDataSetPermissions' 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', 'describeDataSetPermissions_awsAccountId' - The Amazon Web Services account ID.
--
-- 'dataSetId', 'describeDataSetPermissions_dataSetId' - The ID for the dataset that you want to create. This ID is unique per
-- Amazon Web Services Region for each Amazon Web Services account.
newDescribeDataSetPermissions ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'dataSetId'
  Prelude.Text ->
  DescribeDataSetPermissions
newDescribeDataSetPermissions :: Text -> Text -> DescribeDataSetPermissions
newDescribeDataSetPermissions
  Text
pAwsAccountId_
  Text
pDataSetId_ =
    DescribeDataSetPermissions' :: Text -> Text -> DescribeDataSetPermissions
DescribeDataSetPermissions'
      { $sel:awsAccountId:DescribeDataSetPermissions' :: Text
awsAccountId =
          Text
pAwsAccountId_,
        $sel:dataSetId:DescribeDataSetPermissions' :: Text
dataSetId = Text
pDataSetId_
      }

-- | The Amazon Web Services account ID.
describeDataSetPermissions_awsAccountId :: Lens.Lens' DescribeDataSetPermissions Prelude.Text
describeDataSetPermissions_awsAccountId :: (Text -> f Text)
-> DescribeDataSetPermissions -> f DescribeDataSetPermissions
describeDataSetPermissions_awsAccountId = (DescribeDataSetPermissions -> Text)
-> (DescribeDataSetPermissions
    -> Text -> DescribeDataSetPermissions)
-> Lens
     DescribeDataSetPermissions DescribeDataSetPermissions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSetPermissions' {Text
awsAccountId :: Text
$sel:awsAccountId:DescribeDataSetPermissions' :: DescribeDataSetPermissions -> Text
awsAccountId} -> Text
awsAccountId) (\s :: DescribeDataSetPermissions
s@DescribeDataSetPermissions' {} Text
a -> DescribeDataSetPermissions
s {$sel:awsAccountId:DescribeDataSetPermissions' :: Text
awsAccountId = Text
a} :: DescribeDataSetPermissions)

-- | The ID for the dataset that you want to create. This ID is unique per
-- Amazon Web Services Region for each Amazon Web Services account.
describeDataSetPermissions_dataSetId :: Lens.Lens' DescribeDataSetPermissions Prelude.Text
describeDataSetPermissions_dataSetId :: (Text -> f Text)
-> DescribeDataSetPermissions -> f DescribeDataSetPermissions
describeDataSetPermissions_dataSetId = (DescribeDataSetPermissions -> Text)
-> (DescribeDataSetPermissions
    -> Text -> DescribeDataSetPermissions)
-> Lens
     DescribeDataSetPermissions DescribeDataSetPermissions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSetPermissions' {Text
dataSetId :: Text
$sel:dataSetId:DescribeDataSetPermissions' :: DescribeDataSetPermissions -> Text
dataSetId} -> Text
dataSetId) (\s :: DescribeDataSetPermissions
s@DescribeDataSetPermissions' {} Text
a -> DescribeDataSetPermissions
s {$sel:dataSetId:DescribeDataSetPermissions' :: Text
dataSetId = Text
a} :: DescribeDataSetPermissions)

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

instance Prelude.NFData DescribeDataSetPermissions

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

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

-- | /See:/ 'newDescribeDataSetPermissionsResponse' smart constructor.
data DescribeDataSetPermissionsResponse = DescribeDataSetPermissionsResponse'
  { -- | The Amazon Web Services request ID for this operation.
    DescribeDataSetPermissionsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the dataset.
    DescribeDataSetPermissionsResponse -> Maybe Text
dataSetArn :: Prelude.Maybe Prelude.Text,
    -- | The ID for the dataset that you want to create. This ID is unique per
    -- Amazon Web Services Region for each Amazon Web Services account.
    DescribeDataSetPermissionsResponse -> Maybe Text
dataSetId :: Prelude.Maybe Prelude.Text,
    -- | A list of resource permissions on the dataset.
    DescribeDataSetPermissionsResponse
-> Maybe (NonEmpty ResourcePermission)
permissions :: Prelude.Maybe (Prelude.NonEmpty ResourcePermission),
    -- | The HTTP status of the request.
    DescribeDataSetPermissionsResponse -> Int
status :: Prelude.Int
  }
  deriving (DescribeDataSetPermissionsResponse
-> DescribeDataSetPermissionsResponse -> Bool
(DescribeDataSetPermissionsResponse
 -> DescribeDataSetPermissionsResponse -> Bool)
-> (DescribeDataSetPermissionsResponse
    -> DescribeDataSetPermissionsResponse -> Bool)
-> Eq DescribeDataSetPermissionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDataSetPermissionsResponse
-> DescribeDataSetPermissionsResponse -> Bool
$c/= :: DescribeDataSetPermissionsResponse
-> DescribeDataSetPermissionsResponse -> Bool
== :: DescribeDataSetPermissionsResponse
-> DescribeDataSetPermissionsResponse -> Bool
$c== :: DescribeDataSetPermissionsResponse
-> DescribeDataSetPermissionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDataSetPermissionsResponse]
ReadPrec DescribeDataSetPermissionsResponse
Int -> ReadS DescribeDataSetPermissionsResponse
ReadS [DescribeDataSetPermissionsResponse]
(Int -> ReadS DescribeDataSetPermissionsResponse)
-> ReadS [DescribeDataSetPermissionsResponse]
-> ReadPrec DescribeDataSetPermissionsResponse
-> ReadPrec [DescribeDataSetPermissionsResponse]
-> Read DescribeDataSetPermissionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDataSetPermissionsResponse]
$creadListPrec :: ReadPrec [DescribeDataSetPermissionsResponse]
readPrec :: ReadPrec DescribeDataSetPermissionsResponse
$creadPrec :: ReadPrec DescribeDataSetPermissionsResponse
readList :: ReadS [DescribeDataSetPermissionsResponse]
$creadList :: ReadS [DescribeDataSetPermissionsResponse]
readsPrec :: Int -> ReadS DescribeDataSetPermissionsResponse
$creadsPrec :: Int -> ReadS DescribeDataSetPermissionsResponse
Prelude.Read, Int -> DescribeDataSetPermissionsResponse -> ShowS
[DescribeDataSetPermissionsResponse] -> ShowS
DescribeDataSetPermissionsResponse -> String
(Int -> DescribeDataSetPermissionsResponse -> ShowS)
-> (DescribeDataSetPermissionsResponse -> String)
-> ([DescribeDataSetPermissionsResponse] -> ShowS)
-> Show DescribeDataSetPermissionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDataSetPermissionsResponse] -> ShowS
$cshowList :: [DescribeDataSetPermissionsResponse] -> ShowS
show :: DescribeDataSetPermissionsResponse -> String
$cshow :: DescribeDataSetPermissionsResponse -> String
showsPrec :: Int -> DescribeDataSetPermissionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDataSetPermissionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDataSetPermissionsResponse
 -> Rep DescribeDataSetPermissionsResponse x)
-> (forall x.
    Rep DescribeDataSetPermissionsResponse x
    -> DescribeDataSetPermissionsResponse)
-> Generic DescribeDataSetPermissionsResponse
forall x.
Rep DescribeDataSetPermissionsResponse x
-> DescribeDataSetPermissionsResponse
forall x.
DescribeDataSetPermissionsResponse
-> Rep DescribeDataSetPermissionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDataSetPermissionsResponse x
-> DescribeDataSetPermissionsResponse
$cfrom :: forall x.
DescribeDataSetPermissionsResponse
-> Rep DescribeDataSetPermissionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDataSetPermissionsResponse' 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', 'describeDataSetPermissionsResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'dataSetArn', 'describeDataSetPermissionsResponse_dataSetArn' - The Amazon Resource Name (ARN) of the dataset.
--
-- 'dataSetId', 'describeDataSetPermissionsResponse_dataSetId' - The ID for the dataset that you want to create. This ID is unique per
-- Amazon Web Services Region for each Amazon Web Services account.
--
-- 'permissions', 'describeDataSetPermissionsResponse_permissions' - A list of resource permissions on the dataset.
--
-- 'status', 'describeDataSetPermissionsResponse_status' - The HTTP status of the request.
newDescribeDataSetPermissionsResponse ::
  -- | 'status'
  Prelude.Int ->
  DescribeDataSetPermissionsResponse
newDescribeDataSetPermissionsResponse :: Int -> DescribeDataSetPermissionsResponse
newDescribeDataSetPermissionsResponse Int
pStatus_ =
  DescribeDataSetPermissionsResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty ResourcePermission)
-> Int
-> DescribeDataSetPermissionsResponse
DescribeDataSetPermissionsResponse'
    { $sel:requestId:DescribeDataSetPermissionsResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSetArn:DescribeDataSetPermissionsResponse' :: Maybe Text
dataSetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSetId:DescribeDataSetPermissionsResponse' :: Maybe Text
dataSetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:permissions:DescribeDataSetPermissionsResponse' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeDataSetPermissionsResponse' :: Int
status = Int
pStatus_
    }

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

-- | The Amazon Resource Name (ARN) of the dataset.
describeDataSetPermissionsResponse_dataSetArn :: Lens.Lens' DescribeDataSetPermissionsResponse (Prelude.Maybe Prelude.Text)
describeDataSetPermissionsResponse_dataSetArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSetPermissionsResponse
-> f DescribeDataSetPermissionsResponse
describeDataSetPermissionsResponse_dataSetArn = (DescribeDataSetPermissionsResponse -> Maybe Text)
-> (DescribeDataSetPermissionsResponse
    -> Maybe Text -> DescribeDataSetPermissionsResponse)
-> Lens
     DescribeDataSetPermissionsResponse
     DescribeDataSetPermissionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSetPermissionsResponse' {Maybe Text
dataSetArn :: Maybe Text
$sel:dataSetArn:DescribeDataSetPermissionsResponse' :: DescribeDataSetPermissionsResponse -> Maybe Text
dataSetArn} -> Maybe Text
dataSetArn) (\s :: DescribeDataSetPermissionsResponse
s@DescribeDataSetPermissionsResponse' {} Maybe Text
a -> DescribeDataSetPermissionsResponse
s {$sel:dataSetArn:DescribeDataSetPermissionsResponse' :: Maybe Text
dataSetArn = Maybe Text
a} :: DescribeDataSetPermissionsResponse)

-- | The ID for the dataset that you want to create. This ID is unique per
-- Amazon Web Services Region for each Amazon Web Services account.
describeDataSetPermissionsResponse_dataSetId :: Lens.Lens' DescribeDataSetPermissionsResponse (Prelude.Maybe Prelude.Text)
describeDataSetPermissionsResponse_dataSetId :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSetPermissionsResponse
-> f DescribeDataSetPermissionsResponse
describeDataSetPermissionsResponse_dataSetId = (DescribeDataSetPermissionsResponse -> Maybe Text)
-> (DescribeDataSetPermissionsResponse
    -> Maybe Text -> DescribeDataSetPermissionsResponse)
-> Lens
     DescribeDataSetPermissionsResponse
     DescribeDataSetPermissionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSetPermissionsResponse' {Maybe Text
dataSetId :: Maybe Text
$sel:dataSetId:DescribeDataSetPermissionsResponse' :: DescribeDataSetPermissionsResponse -> Maybe Text
dataSetId} -> Maybe Text
dataSetId) (\s :: DescribeDataSetPermissionsResponse
s@DescribeDataSetPermissionsResponse' {} Maybe Text
a -> DescribeDataSetPermissionsResponse
s {$sel:dataSetId:DescribeDataSetPermissionsResponse' :: Maybe Text
dataSetId = Maybe Text
a} :: DescribeDataSetPermissionsResponse)

-- | A list of resource permissions on the dataset.
describeDataSetPermissionsResponse_permissions :: Lens.Lens' DescribeDataSetPermissionsResponse (Prelude.Maybe (Prelude.NonEmpty ResourcePermission))
describeDataSetPermissionsResponse_permissions :: (Maybe (NonEmpty ResourcePermission)
 -> f (Maybe (NonEmpty ResourcePermission)))
-> DescribeDataSetPermissionsResponse
-> f DescribeDataSetPermissionsResponse
describeDataSetPermissionsResponse_permissions = (DescribeDataSetPermissionsResponse
 -> Maybe (NonEmpty ResourcePermission))
-> (DescribeDataSetPermissionsResponse
    -> Maybe (NonEmpty ResourcePermission)
    -> DescribeDataSetPermissionsResponse)
-> Lens
     DescribeDataSetPermissionsResponse
     DescribeDataSetPermissionsResponse
     (Maybe (NonEmpty ResourcePermission))
     (Maybe (NonEmpty ResourcePermission))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSetPermissionsResponse' {Maybe (NonEmpty ResourcePermission)
permissions :: Maybe (NonEmpty ResourcePermission)
$sel:permissions:DescribeDataSetPermissionsResponse' :: DescribeDataSetPermissionsResponse
-> Maybe (NonEmpty ResourcePermission)
permissions} -> Maybe (NonEmpty ResourcePermission)
permissions) (\s :: DescribeDataSetPermissionsResponse
s@DescribeDataSetPermissionsResponse' {} Maybe (NonEmpty ResourcePermission)
a -> DescribeDataSetPermissionsResponse
s {$sel:permissions:DescribeDataSetPermissionsResponse' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
a} :: DescribeDataSetPermissionsResponse) ((Maybe (NonEmpty ResourcePermission)
  -> f (Maybe (NonEmpty ResourcePermission)))
 -> DescribeDataSetPermissionsResponse
 -> f DescribeDataSetPermissionsResponse)
-> ((Maybe (NonEmpty ResourcePermission)
     -> f (Maybe (NonEmpty ResourcePermission)))
    -> Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> (Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> DescribeDataSetPermissionsResponse
-> f DescribeDataSetPermissionsResponse
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 HTTP status of the request.
describeDataSetPermissionsResponse_status :: Lens.Lens' DescribeDataSetPermissionsResponse Prelude.Int
describeDataSetPermissionsResponse_status :: (Int -> f Int)
-> DescribeDataSetPermissionsResponse
-> f DescribeDataSetPermissionsResponse
describeDataSetPermissionsResponse_status = (DescribeDataSetPermissionsResponse -> Int)
-> (DescribeDataSetPermissionsResponse
    -> Int -> DescribeDataSetPermissionsResponse)
-> Lens
     DescribeDataSetPermissionsResponse
     DescribeDataSetPermissionsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSetPermissionsResponse' {Int
status :: Int
$sel:status:DescribeDataSetPermissionsResponse' :: DescribeDataSetPermissionsResponse -> Int
status} -> Int
status) (\s :: DescribeDataSetPermissionsResponse
s@DescribeDataSetPermissionsResponse' {} Int
a -> DescribeDataSetPermissionsResponse
s {$sel:status:DescribeDataSetPermissionsResponse' :: Int
status = Int
a} :: DescribeDataSetPermissionsResponse)

instance
  Prelude.NFData
    DescribeDataSetPermissionsResponse