{-# 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.M2.ListDataSets
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the data sets imported for a specific application. In Amazon Web
-- Services Mainframe Modernization, data sets are associated with
-- applications deployed on runtime environments. This is known as
-- importing data sets. Currently, Amazon Web Services Mainframe
-- Modernization can import data sets into catalogs using
-- <https://docs.aws.amazon.com/m2/latest/APIReference/API_CreateDataSetImportTask.html CreateDataSetImportTask>.
--
-- This operation returns paginated results.
module Amazonka.M2.ListDataSets
  ( -- * Creating a Request
    ListDataSets (..),
    newListDataSets,

    -- * Request Lenses
    listDataSets_maxResults,
    listDataSets_nextToken,
    listDataSets_prefix,
    listDataSets_applicationId,

    -- * Destructuring the Response
    ListDataSetsResponse (..),
    newListDataSetsResponse,

    -- * Response Lenses
    listDataSetsResponse_nextToken,
    listDataSetsResponse_httpStatus,
    listDataSetsResponse_dataSets,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.M2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListDataSets' smart constructor.
data ListDataSets = ListDataSets'
  { -- | The maximum number of objects to return.
    ListDataSets -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A pagination token returned from a previous call to this operation. This
    -- specifies the next item to return. To return to the beginning of the
    -- list, exclude this parameter.
    ListDataSets -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The prefix of the data set name, which you can use to filter the list of
    -- data sets.
    ListDataSets -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the application for which you want to list the
    -- associated data sets.
    ListDataSets -> Text
applicationId :: Prelude.Text
  }
  deriving (ListDataSets -> ListDataSets -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataSets -> ListDataSets -> Bool
$c/= :: ListDataSets -> ListDataSets -> Bool
== :: ListDataSets -> ListDataSets -> Bool
$c== :: ListDataSets -> ListDataSets -> Bool
Prelude.Eq, ReadPrec [ListDataSets]
ReadPrec ListDataSets
Int -> ReadS ListDataSets
ReadS [ListDataSets]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataSets]
$creadListPrec :: ReadPrec [ListDataSets]
readPrec :: ReadPrec ListDataSets
$creadPrec :: ReadPrec ListDataSets
readList :: ReadS [ListDataSets]
$creadList :: ReadS [ListDataSets]
readsPrec :: Int -> ReadS ListDataSets
$creadsPrec :: Int -> ReadS ListDataSets
Prelude.Read, Int -> ListDataSets -> ShowS
[ListDataSets] -> ShowS
ListDataSets -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataSets] -> ShowS
$cshowList :: [ListDataSets] -> ShowS
show :: ListDataSets -> String
$cshow :: ListDataSets -> String
showsPrec :: Int -> ListDataSets -> ShowS
$cshowsPrec :: Int -> ListDataSets -> ShowS
Prelude.Show, forall x. Rep ListDataSets x -> ListDataSets
forall x. ListDataSets -> Rep ListDataSets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDataSets x -> ListDataSets
$cfrom :: forall x. ListDataSets -> Rep ListDataSets x
Prelude.Generic)

-- |
-- Create a value of 'ListDataSets' 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', 'listDataSets_maxResults' - The maximum number of objects to return.
--
-- 'nextToken', 'listDataSets_nextToken' - A pagination token returned from a previous call to this operation. This
-- specifies the next item to return. To return to the beginning of the
-- list, exclude this parameter.
--
-- 'prefix', 'listDataSets_prefix' - The prefix of the data set name, which you can use to filter the list of
-- data sets.
--
-- 'applicationId', 'listDataSets_applicationId' - The unique identifier of the application for which you want to list the
-- associated data sets.
newListDataSets ::
  -- | 'applicationId'
  Prelude.Text ->
  ListDataSets
newListDataSets :: Text -> ListDataSets
newListDataSets Text
pApplicationId_ =
  ListDataSets'
    { $sel:maxResults:ListDataSets' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDataSets' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:prefix:ListDataSets' :: Maybe Text
prefix = forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:ListDataSets' :: Text
applicationId = Text
pApplicationId_
    }

-- | The maximum number of objects to return.
listDataSets_maxResults :: Lens.Lens' ListDataSets (Prelude.Maybe Prelude.Natural)
listDataSets_maxResults :: Lens' ListDataSets (Maybe Natural)
listDataSets_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSets' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDataSets' :: ListDataSets -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDataSets
s@ListDataSets' {} Maybe Natural
a -> ListDataSets
s {$sel:maxResults:ListDataSets' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDataSets)

-- | A pagination token returned from a previous call to this operation. This
-- specifies the next item to return. To return to the beginning of the
-- list, exclude this parameter.
listDataSets_nextToken :: Lens.Lens' ListDataSets (Prelude.Maybe Prelude.Text)
listDataSets_nextToken :: Lens' ListDataSets (Maybe Text)
listDataSets_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSets' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataSets' :: ListDataSets -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataSets
s@ListDataSets' {} Maybe Text
a -> ListDataSets
s {$sel:nextToken:ListDataSets' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataSets)

-- | The prefix of the data set name, which you can use to filter the list of
-- data sets.
listDataSets_prefix :: Lens.Lens' ListDataSets (Prelude.Maybe Prelude.Text)
listDataSets_prefix :: Lens' ListDataSets (Maybe Text)
listDataSets_prefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSets' {Maybe Text
prefix :: Maybe Text
$sel:prefix:ListDataSets' :: ListDataSets -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: ListDataSets
s@ListDataSets' {} Maybe Text
a -> ListDataSets
s {$sel:prefix:ListDataSets' :: Maybe Text
prefix = Maybe Text
a} :: ListDataSets)

-- | The unique identifier of the application for which you want to list the
-- associated data sets.
listDataSets_applicationId :: Lens.Lens' ListDataSets Prelude.Text
listDataSets_applicationId :: Lens' ListDataSets Text
listDataSets_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSets' {Text
applicationId :: Text
$sel:applicationId:ListDataSets' :: ListDataSets -> Text
applicationId} -> Text
applicationId) (\s :: ListDataSets
s@ListDataSets' {} Text
a -> ListDataSets
s {$sel:applicationId:ListDataSets' :: Text
applicationId = Text
a} :: ListDataSets)

instance Core.AWSPager ListDataSets where
  page :: ListDataSets -> AWSResponse ListDataSets -> Maybe ListDataSets
page ListDataSets
rq AWSResponse ListDataSets
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDataSets
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDataSetsResponse (Maybe Text)
listDataSetsResponse_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 ListDataSets
rs forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListDataSetsResponse [DataSetSummary]
listDataSetsResponse_dataSets) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListDataSets
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListDataSets (Maybe Text)
listDataSets_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDataSets
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDataSetsResponse (Maybe Text)
listDataSetsResponse_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 ListDataSets where
  type AWSResponse ListDataSets = ListDataSetsResponse
  request :: (Service -> Service) -> ListDataSets -> Request ListDataSets
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 ListDataSets
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDataSets)))
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 -> Int -> [DataSetSummary] -> ListDataSetsResponse
ListDataSetsResponse'
            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
"nextToken")
            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))
            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
"dataSets" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListDataSets where
  hashWithSalt :: Int -> ListDataSets -> Int
hashWithSalt Int
_salt ListDataSets' {Maybe Natural
Maybe Text
Text
applicationId :: Text
prefix :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:applicationId:ListDataSets' :: ListDataSets -> Text
$sel:prefix:ListDataSets' :: ListDataSets -> Maybe Text
$sel:nextToken:ListDataSets' :: ListDataSets -> Maybe Text
$sel:maxResults:ListDataSets' :: ListDataSets -> 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` Maybe Text
prefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationId

instance Prelude.NFData ListDataSets where
  rnf :: ListDataSets -> ()
rnf ListDataSets' {Maybe Natural
Maybe Text
Text
applicationId :: Text
prefix :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:applicationId:ListDataSets' :: ListDataSets -> Text
$sel:prefix:ListDataSets' :: ListDataSets -> Maybe Text
$sel:nextToken:ListDataSets' :: ListDataSets -> Maybe Text
$sel:maxResults:ListDataSets' :: ListDataSets -> 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 Maybe Text
prefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationId

instance Data.ToHeaders ListDataSets where
  toHeaders :: ListDataSets -> 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.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath ListDataSets where
  toPath :: ListDataSets -> ByteString
toPath ListDataSets' {Maybe Natural
Maybe Text
Text
applicationId :: Text
prefix :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:applicationId:ListDataSets' :: ListDataSets -> Text
$sel:prefix:ListDataSets' :: ListDataSets -> Maybe Text
$sel:nextToken:ListDataSets' :: ListDataSets -> Maybe Text
$sel:maxResults:ListDataSets' :: ListDataSets -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/applications/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
applicationId,
        ByteString
"/datasets"
      ]

instance Data.ToQuery ListDataSets where
  toQuery :: ListDataSets -> QueryString
toQuery ListDataSets' {Maybe Natural
Maybe Text
Text
applicationId :: Text
prefix :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:applicationId:ListDataSets' :: ListDataSets -> Text
$sel:prefix:ListDataSets' :: ListDataSets -> Maybe Text
$sel:nextToken:ListDataSets' :: ListDataSets -> Maybe Text
$sel:maxResults:ListDataSets' :: ListDataSets -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"prefix" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
prefix
      ]

-- | /See:/ 'newListDataSetsResponse' smart constructor.
data ListDataSetsResponse = ListDataSetsResponse'
  { -- | If there are more items to return, this contains a token that is passed
    -- to a subsequent call to this operation to retrieve the next set of
    -- items.
    ListDataSetsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDataSetsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The list of data sets, containing information including the creation
    -- time, the data set name, the data set organization, the data set format,
    -- and the last time the data set was referenced or updated.
    ListDataSetsResponse -> [DataSetSummary]
dataSets :: [DataSetSummary]
  }
  deriving (ListDataSetsResponse -> ListDataSetsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataSetsResponse -> ListDataSetsResponse -> Bool
$c/= :: ListDataSetsResponse -> ListDataSetsResponse -> Bool
== :: ListDataSetsResponse -> ListDataSetsResponse -> Bool
$c== :: ListDataSetsResponse -> ListDataSetsResponse -> Bool
Prelude.Eq, ReadPrec [ListDataSetsResponse]
ReadPrec ListDataSetsResponse
Int -> ReadS ListDataSetsResponse
ReadS [ListDataSetsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataSetsResponse]
$creadListPrec :: ReadPrec [ListDataSetsResponse]
readPrec :: ReadPrec ListDataSetsResponse
$creadPrec :: ReadPrec ListDataSetsResponse
readList :: ReadS [ListDataSetsResponse]
$creadList :: ReadS [ListDataSetsResponse]
readsPrec :: Int -> ReadS ListDataSetsResponse
$creadsPrec :: Int -> ReadS ListDataSetsResponse
Prelude.Read, Int -> ListDataSetsResponse -> ShowS
[ListDataSetsResponse] -> ShowS
ListDataSetsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataSetsResponse] -> ShowS
$cshowList :: [ListDataSetsResponse] -> ShowS
show :: ListDataSetsResponse -> String
$cshow :: ListDataSetsResponse -> String
showsPrec :: Int -> ListDataSetsResponse -> ShowS
$cshowsPrec :: Int -> ListDataSetsResponse -> ShowS
Prelude.Show, forall x. Rep ListDataSetsResponse x -> ListDataSetsResponse
forall x. ListDataSetsResponse -> Rep ListDataSetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDataSetsResponse x -> ListDataSetsResponse
$cfrom :: forall x. ListDataSetsResponse -> Rep ListDataSetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDataSetsResponse' 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:
--
-- 'nextToken', 'listDataSetsResponse_nextToken' - If there are more items to return, this contains a token that is passed
-- to a subsequent call to this operation to retrieve the next set of
-- items.
--
-- 'httpStatus', 'listDataSetsResponse_httpStatus' - The response's http status code.
--
-- 'dataSets', 'listDataSetsResponse_dataSets' - The list of data sets, containing information including the creation
-- time, the data set name, the data set organization, the data set format,
-- and the last time the data set was referenced or updated.
newListDataSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDataSetsResponse
newListDataSetsResponse :: Int -> ListDataSetsResponse
newListDataSetsResponse Int
pHttpStatus_ =
  ListDataSetsResponse'
    { $sel:nextToken:ListDataSetsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDataSetsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:dataSets:ListDataSetsResponse' :: [DataSetSummary]
dataSets = forall a. Monoid a => a
Prelude.mempty
    }

-- | If there are more items to return, this contains a token that is passed
-- to a subsequent call to this operation to retrieve the next set of
-- items.
listDataSetsResponse_nextToken :: Lens.Lens' ListDataSetsResponse (Prelude.Maybe Prelude.Text)
listDataSetsResponse_nextToken :: Lens' ListDataSetsResponse (Maybe Text)
listDataSetsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSetsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataSetsResponse' :: ListDataSetsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataSetsResponse
s@ListDataSetsResponse' {} Maybe Text
a -> ListDataSetsResponse
s {$sel:nextToken:ListDataSetsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataSetsResponse)

-- | The response's http status code.
listDataSetsResponse_httpStatus :: Lens.Lens' ListDataSetsResponse Prelude.Int
listDataSetsResponse_httpStatus :: Lens' ListDataSetsResponse Int
listDataSetsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSetsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListDataSetsResponse' :: ListDataSetsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListDataSetsResponse
s@ListDataSetsResponse' {} Int
a -> ListDataSetsResponse
s {$sel:httpStatus:ListDataSetsResponse' :: Int
httpStatus = Int
a} :: ListDataSetsResponse)

-- | The list of data sets, containing information including the creation
-- time, the data set name, the data set organization, the data set format,
-- and the last time the data set was referenced or updated.
listDataSetsResponse_dataSets :: Lens.Lens' ListDataSetsResponse [DataSetSummary]
listDataSetsResponse_dataSets :: Lens' ListDataSetsResponse [DataSetSummary]
listDataSetsResponse_dataSets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSetsResponse' {[DataSetSummary]
dataSets :: [DataSetSummary]
$sel:dataSets:ListDataSetsResponse' :: ListDataSetsResponse -> [DataSetSummary]
dataSets} -> [DataSetSummary]
dataSets) (\s :: ListDataSetsResponse
s@ListDataSetsResponse' {} [DataSetSummary]
a -> ListDataSetsResponse
s {$sel:dataSets:ListDataSetsResponse' :: [DataSetSummary]
dataSets = [DataSetSummary]
a} :: ListDataSetsResponse) 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 Prelude.NFData ListDataSetsResponse where
  rnf :: ListDataSetsResponse -> ()
rnf ListDataSetsResponse' {Int
[DataSetSummary]
Maybe Text
dataSets :: [DataSetSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:dataSets:ListDataSetsResponse' :: ListDataSetsResponse -> [DataSetSummary]
$sel:httpStatus:ListDataSetsResponse' :: ListDataSetsResponse -> Int
$sel:nextToken:ListDataSetsResponse' :: ListDataSetsResponse -> Maybe Text
..} =
    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 Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [DataSetSummary]
dataSets