{-# 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.SearchDataSets
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Use the @SearchDataSets@ operation to search for datasets that belong to
-- an account.
--
-- This operation returns paginated results.
module Amazonka.QuickSight.SearchDataSets
  ( -- * Creating a Request
    SearchDataSets (..),
    newSearchDataSets,

    -- * Request Lenses
    searchDataSets_maxResults,
    searchDataSets_nextToken,
    searchDataSets_awsAccountId,
    searchDataSets_filters,

    -- * Destructuring the Response
    SearchDataSetsResponse (..),
    newSearchDataSetsResponse,

    -- * Response Lenses
    searchDataSetsResponse_dataSetSummaries,
    searchDataSetsResponse_nextToken,
    searchDataSetsResponse_requestId,
    searchDataSetsResponse_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:/ 'newSearchDataSets' smart constructor.
data SearchDataSets = SearchDataSets'
  { -- | The maximum number of results to be returned per request.
    SearchDataSets -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A pagination token that can be used in a subsequent request.
    SearchDataSets -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services account ID.
    SearchDataSets -> Text
awsAccountId :: Prelude.Text,
    -- | The filters to apply to the search.
    SearchDataSets -> NonEmpty DataSetSearchFilter
filters :: Prelude.NonEmpty DataSetSearchFilter
  }
  deriving (SearchDataSets -> SearchDataSets -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchDataSets -> SearchDataSets -> Bool
$c/= :: SearchDataSets -> SearchDataSets -> Bool
== :: SearchDataSets -> SearchDataSets -> Bool
$c== :: SearchDataSets -> SearchDataSets -> Bool
Prelude.Eq, ReadPrec [SearchDataSets]
ReadPrec SearchDataSets
Int -> ReadS SearchDataSets
ReadS [SearchDataSets]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchDataSets]
$creadListPrec :: ReadPrec [SearchDataSets]
readPrec :: ReadPrec SearchDataSets
$creadPrec :: ReadPrec SearchDataSets
readList :: ReadS [SearchDataSets]
$creadList :: ReadS [SearchDataSets]
readsPrec :: Int -> ReadS SearchDataSets
$creadsPrec :: Int -> ReadS SearchDataSets
Prelude.Read, Int -> SearchDataSets -> ShowS
[SearchDataSets] -> ShowS
SearchDataSets -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchDataSets] -> ShowS
$cshowList :: [SearchDataSets] -> ShowS
show :: SearchDataSets -> String
$cshow :: SearchDataSets -> String
showsPrec :: Int -> SearchDataSets -> ShowS
$cshowsPrec :: Int -> SearchDataSets -> ShowS
Prelude.Show, forall x. Rep SearchDataSets x -> SearchDataSets
forall x. SearchDataSets -> Rep SearchDataSets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchDataSets x -> SearchDataSets
$cfrom :: forall x. SearchDataSets -> Rep SearchDataSets x
Prelude.Generic)

-- |
-- Create a value of 'SearchDataSets' 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:
--
-- 'maxResults', 'searchDataSets_maxResults' - The maximum number of results to be returned per request.
--
-- 'nextToken', 'searchDataSets_nextToken' - A pagination token that can be used in a subsequent request.
--
-- 'awsAccountId', 'searchDataSets_awsAccountId' - The Amazon Web Services account ID.
--
-- 'filters', 'searchDataSets_filters' - The filters to apply to the search.
newSearchDataSets ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'filters'
  Prelude.NonEmpty DataSetSearchFilter ->
  SearchDataSets
newSearchDataSets :: Text -> NonEmpty DataSetSearchFilter -> SearchDataSets
newSearchDataSets Text
pAwsAccountId_ NonEmpty DataSetSearchFilter
pFilters_ =
  SearchDataSets'
    { $sel:maxResults:SearchDataSets' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:SearchDataSets' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:SearchDataSets' :: Text
awsAccountId = Text
pAwsAccountId_,
      $sel:filters:SearchDataSets' :: NonEmpty DataSetSearchFilter
filters = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty DataSetSearchFilter
pFilters_
    }

-- | The maximum number of results to be returned per request.
searchDataSets_maxResults :: Lens.Lens' SearchDataSets (Prelude.Maybe Prelude.Natural)
searchDataSets_maxResults :: Lens' SearchDataSets (Maybe Natural)
searchDataSets_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchDataSets' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:SearchDataSets' :: SearchDataSets -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: SearchDataSets
s@SearchDataSets' {} Maybe Natural
a -> SearchDataSets
s {$sel:maxResults:SearchDataSets' :: Maybe Natural
maxResults = Maybe Natural
a} :: SearchDataSets)

-- | A pagination token that can be used in a subsequent request.
searchDataSets_nextToken :: Lens.Lens' SearchDataSets (Prelude.Maybe Prelude.Text)
searchDataSets_nextToken :: Lens' SearchDataSets (Maybe Text)
searchDataSets_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchDataSets' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchDataSets' :: SearchDataSets -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchDataSets
s@SearchDataSets' {} Maybe Text
a -> SearchDataSets
s {$sel:nextToken:SearchDataSets' :: Maybe Text
nextToken = Maybe Text
a} :: SearchDataSets)

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

-- | The filters to apply to the search.
searchDataSets_filters :: Lens.Lens' SearchDataSets (Prelude.NonEmpty DataSetSearchFilter)
searchDataSets_filters :: Lens' SearchDataSets (NonEmpty DataSetSearchFilter)
searchDataSets_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchDataSets' {NonEmpty DataSetSearchFilter
filters :: NonEmpty DataSetSearchFilter
$sel:filters:SearchDataSets' :: SearchDataSets -> NonEmpty DataSetSearchFilter
filters} -> NonEmpty DataSetSearchFilter
filters) (\s :: SearchDataSets
s@SearchDataSets' {} NonEmpty DataSetSearchFilter
a -> SearchDataSets
s {$sel:filters:SearchDataSets' :: NonEmpty DataSetSearchFilter
filters = NonEmpty DataSetSearchFilter
a} :: SearchDataSets) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSPager SearchDataSets where
  page :: SearchDataSets
-> AWSResponse SearchDataSets -> Maybe SearchDataSets
page SearchDataSets
rq AWSResponse SearchDataSets
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse SearchDataSets
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchDataSetsResponse (Maybe Text)
searchDataSetsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse SearchDataSets
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchDataSetsResponse (Maybe [DataSetSummary])
searchDataSetsResponse_dataSetSummaries
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ SearchDataSets
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' SearchDataSets (Maybe Text)
searchDataSets_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse SearchDataSets
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchDataSetsResponse (Maybe Text)
searchDataSetsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest SearchDataSets where
  type
    AWSResponse SearchDataSets =
      SearchDataSetsResponse
  request :: (Service -> Service) -> SearchDataSets -> Request SearchDataSets
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SearchDataSets
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SearchDataSets)))
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 [DataSetSummary]
-> Maybe Text -> Maybe Text -> Int -> SearchDataSetsResponse
SearchDataSetsResponse'
            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
"DataSetSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            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
"NextToken")
            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 SearchDataSets where
  hashWithSalt :: Int -> SearchDataSets -> Int
hashWithSalt Int
_salt SearchDataSets' {Maybe Natural
Maybe Text
NonEmpty DataSetSearchFilter
Text
filters :: NonEmpty DataSetSearchFilter
awsAccountId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:filters:SearchDataSets' :: SearchDataSets -> NonEmpty DataSetSearchFilter
$sel:awsAccountId:SearchDataSets' :: SearchDataSets -> Text
$sel:nextToken:SearchDataSets' :: SearchDataSets -> Maybe Text
$sel:maxResults:SearchDataSets' :: SearchDataSets -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awsAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty DataSetSearchFilter
filters

instance Prelude.NFData SearchDataSets where
  rnf :: SearchDataSets -> ()
rnf SearchDataSets' {Maybe Natural
Maybe Text
NonEmpty DataSetSearchFilter
Text
filters :: NonEmpty DataSetSearchFilter
awsAccountId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:filters:SearchDataSets' :: SearchDataSets -> NonEmpty DataSetSearchFilter
$sel:awsAccountId:SearchDataSets' :: SearchDataSets -> Text
$sel:nextToken:SearchDataSets' :: SearchDataSets -> Maybe Text
$sel:maxResults:SearchDataSets' :: SearchDataSets -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 NonEmpty DataSetSearchFilter
filters

instance Data.ToHeaders SearchDataSets where
  toHeaders :: SearchDataSets -> 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.ToJSON SearchDataSets where
  toJSON :: SearchDataSets -> Value
toJSON SearchDataSets' {Maybe Natural
Maybe Text
NonEmpty DataSetSearchFilter
Text
filters :: NonEmpty DataSetSearchFilter
awsAccountId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:filters:SearchDataSets' :: SearchDataSets -> NonEmpty DataSetSearchFilter
$sel:awsAccountId:SearchDataSets' :: SearchDataSets -> Text
$sel:nextToken:SearchDataSets' :: SearchDataSets -> Maybe Text
$sel:maxResults:SearchDataSets' :: SearchDataSets -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just (Key
"Filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty DataSetSearchFilter
filters)
          ]
      )

instance Data.ToPath SearchDataSets where
  toPath :: SearchDataSets -> ByteString
toPath SearchDataSets' {Maybe Natural
Maybe Text
NonEmpty DataSetSearchFilter
Text
filters :: NonEmpty DataSetSearchFilter
awsAccountId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:filters:SearchDataSets' :: SearchDataSets -> NonEmpty DataSetSearchFilter
$sel:awsAccountId:SearchDataSets' :: SearchDataSets -> Text
$sel:nextToken:SearchDataSets' :: SearchDataSets -> Maybe Text
$sel:maxResults:SearchDataSets' :: SearchDataSets -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
awsAccountId,
        ByteString
"/search/data-sets"
      ]

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

-- | /See:/ 'newSearchDataSetsResponse' smart constructor.
data SearchDataSetsResponse = SearchDataSetsResponse'
  { -- | A @DataSetSummaries@ object that returns a summary of a dataset.
    SearchDataSetsResponse -> Maybe [DataSetSummary]
dataSetSummaries :: Prelude.Maybe [DataSetSummary],
    -- | A pagination token that can be used in a subsequent request.
    SearchDataSetsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services request ID for this operation.
    SearchDataSetsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status of the request.
    SearchDataSetsResponse -> Int
status :: Prelude.Int
  }
  deriving (SearchDataSetsResponse -> SearchDataSetsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchDataSetsResponse -> SearchDataSetsResponse -> Bool
$c/= :: SearchDataSetsResponse -> SearchDataSetsResponse -> Bool
== :: SearchDataSetsResponse -> SearchDataSetsResponse -> Bool
$c== :: SearchDataSetsResponse -> SearchDataSetsResponse -> Bool
Prelude.Eq, ReadPrec [SearchDataSetsResponse]
ReadPrec SearchDataSetsResponse
Int -> ReadS SearchDataSetsResponse
ReadS [SearchDataSetsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchDataSetsResponse]
$creadListPrec :: ReadPrec [SearchDataSetsResponse]
readPrec :: ReadPrec SearchDataSetsResponse
$creadPrec :: ReadPrec SearchDataSetsResponse
readList :: ReadS [SearchDataSetsResponse]
$creadList :: ReadS [SearchDataSetsResponse]
readsPrec :: Int -> ReadS SearchDataSetsResponse
$creadsPrec :: Int -> ReadS SearchDataSetsResponse
Prelude.Read, Int -> SearchDataSetsResponse -> ShowS
[SearchDataSetsResponse] -> ShowS
SearchDataSetsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchDataSetsResponse] -> ShowS
$cshowList :: [SearchDataSetsResponse] -> ShowS
show :: SearchDataSetsResponse -> String
$cshow :: SearchDataSetsResponse -> String
showsPrec :: Int -> SearchDataSetsResponse -> ShowS
$cshowsPrec :: Int -> SearchDataSetsResponse -> ShowS
Prelude.Show, forall x. Rep SearchDataSetsResponse x -> SearchDataSetsResponse
forall x. SearchDataSetsResponse -> Rep SearchDataSetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchDataSetsResponse x -> SearchDataSetsResponse
$cfrom :: forall x. SearchDataSetsResponse -> Rep SearchDataSetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'SearchDataSetsResponse' 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:
--
-- 'dataSetSummaries', 'searchDataSetsResponse_dataSetSummaries' - A @DataSetSummaries@ object that returns a summary of a dataset.
--
-- 'nextToken', 'searchDataSetsResponse_nextToken' - A pagination token that can be used in a subsequent request.
--
-- 'requestId', 'searchDataSetsResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'status', 'searchDataSetsResponse_status' - The HTTP status of the request.
newSearchDataSetsResponse ::
  -- | 'status'
  Prelude.Int ->
  SearchDataSetsResponse
newSearchDataSetsResponse :: Int -> SearchDataSetsResponse
newSearchDataSetsResponse Int
pStatus_ =
  SearchDataSetsResponse'
    { $sel:dataSetSummaries:SearchDataSetsResponse' :: Maybe [DataSetSummary]
dataSetSummaries =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:SearchDataSetsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:SearchDataSetsResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:status:SearchDataSetsResponse' :: Int
status = Int
pStatus_
    }

-- | A @DataSetSummaries@ object that returns a summary of a dataset.
searchDataSetsResponse_dataSetSummaries :: Lens.Lens' SearchDataSetsResponse (Prelude.Maybe [DataSetSummary])
searchDataSetsResponse_dataSetSummaries :: Lens' SearchDataSetsResponse (Maybe [DataSetSummary])
searchDataSetsResponse_dataSetSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchDataSetsResponse' {Maybe [DataSetSummary]
dataSetSummaries :: Maybe [DataSetSummary]
$sel:dataSetSummaries:SearchDataSetsResponse' :: SearchDataSetsResponse -> Maybe [DataSetSummary]
dataSetSummaries} -> Maybe [DataSetSummary]
dataSetSummaries) (\s :: SearchDataSetsResponse
s@SearchDataSetsResponse' {} Maybe [DataSetSummary]
a -> SearchDataSetsResponse
s {$sel:dataSetSummaries:SearchDataSetsResponse' :: Maybe [DataSetSummary]
dataSetSummaries = Maybe [DataSetSummary]
a} :: SearchDataSetsResponse) 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

-- | A pagination token that can be used in a subsequent request.
searchDataSetsResponse_nextToken :: Lens.Lens' SearchDataSetsResponse (Prelude.Maybe Prelude.Text)
searchDataSetsResponse_nextToken :: Lens' SearchDataSetsResponse (Maybe Text)
searchDataSetsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchDataSetsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchDataSetsResponse' :: SearchDataSetsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchDataSetsResponse
s@SearchDataSetsResponse' {} Maybe Text
a -> SearchDataSetsResponse
s {$sel:nextToken:SearchDataSetsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: SearchDataSetsResponse)

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

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

instance Prelude.NFData SearchDataSetsResponse where
  rnf :: SearchDataSetsResponse -> ()
rnf SearchDataSetsResponse' {Int
Maybe [DataSetSummary]
Maybe Text
status :: Int
requestId :: Maybe Text
nextToken :: Maybe Text
dataSetSummaries :: Maybe [DataSetSummary]
$sel:status:SearchDataSetsResponse' :: SearchDataSetsResponse -> Int
$sel:requestId:SearchDataSetsResponse' :: SearchDataSetsResponse -> Maybe Text
$sel:nextToken:SearchDataSetsResponse' :: SearchDataSetsResponse -> Maybe Text
$sel:dataSetSummaries:SearchDataSetsResponse' :: SearchDataSetsResponse -> Maybe [DataSetSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [DataSetSummary]
dataSetSummaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      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