{-# 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.ListDataSetImportHistory
-- 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 set imports for the specified application.
--
-- This operation returns paginated results.
module Amazonka.M2.ListDataSetImportHistory
  ( -- * Creating a Request
    ListDataSetImportHistory (..),
    newListDataSetImportHistory,

    -- * Request Lenses
    listDataSetImportHistory_maxResults,
    listDataSetImportHistory_nextToken,
    listDataSetImportHistory_applicationId,

    -- * Destructuring the Response
    ListDataSetImportHistoryResponse (..),
    newListDataSetImportHistoryResponse,

    -- * Response Lenses
    listDataSetImportHistoryResponse_nextToken,
    listDataSetImportHistoryResponse_httpStatus,
    listDataSetImportHistoryResponse_dataSetImportTasks,
  )
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:/ 'newListDataSetImportHistory' smart constructor.
data ListDataSetImportHistory = ListDataSetImportHistory'
  { -- | The maximum number of objects to return.
    ListDataSetImportHistory -> 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.
    ListDataSetImportHistory -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the application.
    ListDataSetImportHistory -> Text
applicationId :: Prelude.Text
  }
  deriving (ListDataSetImportHistory -> ListDataSetImportHistory -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataSetImportHistory -> ListDataSetImportHistory -> Bool
$c/= :: ListDataSetImportHistory -> ListDataSetImportHistory -> Bool
== :: ListDataSetImportHistory -> ListDataSetImportHistory -> Bool
$c== :: ListDataSetImportHistory -> ListDataSetImportHistory -> Bool
Prelude.Eq, ReadPrec [ListDataSetImportHistory]
ReadPrec ListDataSetImportHistory
Int -> ReadS ListDataSetImportHistory
ReadS [ListDataSetImportHistory]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataSetImportHistory]
$creadListPrec :: ReadPrec [ListDataSetImportHistory]
readPrec :: ReadPrec ListDataSetImportHistory
$creadPrec :: ReadPrec ListDataSetImportHistory
readList :: ReadS [ListDataSetImportHistory]
$creadList :: ReadS [ListDataSetImportHistory]
readsPrec :: Int -> ReadS ListDataSetImportHistory
$creadsPrec :: Int -> ReadS ListDataSetImportHistory
Prelude.Read, Int -> ListDataSetImportHistory -> ShowS
[ListDataSetImportHistory] -> ShowS
ListDataSetImportHistory -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataSetImportHistory] -> ShowS
$cshowList :: [ListDataSetImportHistory] -> ShowS
show :: ListDataSetImportHistory -> String
$cshow :: ListDataSetImportHistory -> String
showsPrec :: Int -> ListDataSetImportHistory -> ShowS
$cshowsPrec :: Int -> ListDataSetImportHistory -> ShowS
Prelude.Show, forall x.
Rep ListDataSetImportHistory x -> ListDataSetImportHistory
forall x.
ListDataSetImportHistory -> Rep ListDataSetImportHistory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDataSetImportHistory x -> ListDataSetImportHistory
$cfrom :: forall x.
ListDataSetImportHistory -> Rep ListDataSetImportHistory x
Prelude.Generic)

-- |
-- Create a value of 'ListDataSetImportHistory' 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', 'listDataSetImportHistory_maxResults' - The maximum number of objects to return.
--
-- 'nextToken', 'listDataSetImportHistory_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.
--
-- 'applicationId', 'listDataSetImportHistory_applicationId' - The unique identifier of the application.
newListDataSetImportHistory ::
  -- | 'applicationId'
  Prelude.Text ->
  ListDataSetImportHistory
newListDataSetImportHistory :: Text -> ListDataSetImportHistory
newListDataSetImportHistory Text
pApplicationId_ =
  ListDataSetImportHistory'
    { $sel:maxResults:ListDataSetImportHistory' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDataSetImportHistory' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:ListDataSetImportHistory' :: Text
applicationId = Text
pApplicationId_
    }

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

-- | 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.
listDataSetImportHistory_nextToken :: Lens.Lens' ListDataSetImportHistory (Prelude.Maybe Prelude.Text)
listDataSetImportHistory_nextToken :: Lens' ListDataSetImportHistory (Maybe Text)
listDataSetImportHistory_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSetImportHistory' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataSetImportHistory' :: ListDataSetImportHistory -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataSetImportHistory
s@ListDataSetImportHistory' {} Maybe Text
a -> ListDataSetImportHistory
s {$sel:nextToken:ListDataSetImportHistory' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataSetImportHistory)

-- | The unique identifier of the application.
listDataSetImportHistory_applicationId :: Lens.Lens' ListDataSetImportHistory Prelude.Text
listDataSetImportHistory_applicationId :: Lens' ListDataSetImportHistory Text
listDataSetImportHistory_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSetImportHistory' {Text
applicationId :: Text
$sel:applicationId:ListDataSetImportHistory' :: ListDataSetImportHistory -> Text
applicationId} -> Text
applicationId) (\s :: ListDataSetImportHistory
s@ListDataSetImportHistory' {} Text
a -> ListDataSetImportHistory
s {$sel:applicationId:ListDataSetImportHistory' :: Text
applicationId = Text
a} :: ListDataSetImportHistory)

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

instance Prelude.Hashable ListDataSetImportHistory where
  hashWithSalt :: Int -> ListDataSetImportHistory -> Int
hashWithSalt Int
_salt ListDataSetImportHistory' {Maybe Natural
Maybe Text
Text
applicationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:applicationId:ListDataSetImportHistory' :: ListDataSetImportHistory -> Text
$sel:nextToken:ListDataSetImportHistory' :: ListDataSetImportHistory -> Maybe Text
$sel:maxResults:ListDataSetImportHistory' :: ListDataSetImportHistory -> 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
applicationId

instance Prelude.NFData ListDataSetImportHistory where
  rnf :: ListDataSetImportHistory -> ()
rnf ListDataSetImportHistory' {Maybe Natural
Maybe Text
Text
applicationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:applicationId:ListDataSetImportHistory' :: ListDataSetImportHistory -> Text
$sel:nextToken:ListDataSetImportHistory' :: ListDataSetImportHistory -> Maybe Text
$sel:maxResults:ListDataSetImportHistory' :: ListDataSetImportHistory -> 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
applicationId

instance Data.ToHeaders ListDataSetImportHistory where
  toHeaders :: ListDataSetImportHistory -> 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 ListDataSetImportHistory where
  toPath :: ListDataSetImportHistory -> ByteString
toPath ListDataSetImportHistory' {Maybe Natural
Maybe Text
Text
applicationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:applicationId:ListDataSetImportHistory' :: ListDataSetImportHistory -> Text
$sel:nextToken:ListDataSetImportHistory' :: ListDataSetImportHistory -> Maybe Text
$sel:maxResults:ListDataSetImportHistory' :: ListDataSetImportHistory -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/applications/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
applicationId,
        ByteString
"/dataset-import-tasks"
      ]

instance Data.ToQuery ListDataSetImportHistory where
  toQuery :: ListDataSetImportHistory -> QueryString
toQuery ListDataSetImportHistory' {Maybe Natural
Maybe Text
Text
applicationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:applicationId:ListDataSetImportHistory' :: ListDataSetImportHistory -> Text
$sel:nextToken:ListDataSetImportHistory' :: ListDataSetImportHistory -> Maybe Text
$sel:maxResults:ListDataSetImportHistory' :: ListDataSetImportHistory -> 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
      ]

-- | /See:/ 'newListDataSetImportHistoryResponse' smart constructor.
data ListDataSetImportHistoryResponse = ListDataSetImportHistoryResponse'
  { -- | 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.
    ListDataSetImportHistoryResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDataSetImportHistoryResponse -> Int
httpStatus :: Prelude.Int,
    -- | The data set import tasks.
    ListDataSetImportHistoryResponse -> [DataSetImportTask]
dataSetImportTasks :: [DataSetImportTask]
  }
  deriving (ListDataSetImportHistoryResponse
-> ListDataSetImportHistoryResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataSetImportHistoryResponse
-> ListDataSetImportHistoryResponse -> Bool
$c/= :: ListDataSetImportHistoryResponse
-> ListDataSetImportHistoryResponse -> Bool
== :: ListDataSetImportHistoryResponse
-> ListDataSetImportHistoryResponse -> Bool
$c== :: ListDataSetImportHistoryResponse
-> ListDataSetImportHistoryResponse -> Bool
Prelude.Eq, ReadPrec [ListDataSetImportHistoryResponse]
ReadPrec ListDataSetImportHistoryResponse
Int -> ReadS ListDataSetImportHistoryResponse
ReadS [ListDataSetImportHistoryResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataSetImportHistoryResponse]
$creadListPrec :: ReadPrec [ListDataSetImportHistoryResponse]
readPrec :: ReadPrec ListDataSetImportHistoryResponse
$creadPrec :: ReadPrec ListDataSetImportHistoryResponse
readList :: ReadS [ListDataSetImportHistoryResponse]
$creadList :: ReadS [ListDataSetImportHistoryResponse]
readsPrec :: Int -> ReadS ListDataSetImportHistoryResponse
$creadsPrec :: Int -> ReadS ListDataSetImportHistoryResponse
Prelude.Read, Int -> ListDataSetImportHistoryResponse -> ShowS
[ListDataSetImportHistoryResponse] -> ShowS
ListDataSetImportHistoryResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataSetImportHistoryResponse] -> ShowS
$cshowList :: [ListDataSetImportHistoryResponse] -> ShowS
show :: ListDataSetImportHistoryResponse -> String
$cshow :: ListDataSetImportHistoryResponse -> String
showsPrec :: Int -> ListDataSetImportHistoryResponse -> ShowS
$cshowsPrec :: Int -> ListDataSetImportHistoryResponse -> ShowS
Prelude.Show, forall x.
Rep ListDataSetImportHistoryResponse x
-> ListDataSetImportHistoryResponse
forall x.
ListDataSetImportHistoryResponse
-> Rep ListDataSetImportHistoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDataSetImportHistoryResponse x
-> ListDataSetImportHistoryResponse
$cfrom :: forall x.
ListDataSetImportHistoryResponse
-> Rep ListDataSetImportHistoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDataSetImportHistoryResponse' 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', 'listDataSetImportHistoryResponse_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', 'listDataSetImportHistoryResponse_httpStatus' - The response's http status code.
--
-- 'dataSetImportTasks', 'listDataSetImportHistoryResponse_dataSetImportTasks' - The data set import tasks.
newListDataSetImportHistoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDataSetImportHistoryResponse
newListDataSetImportHistoryResponse :: Int -> ListDataSetImportHistoryResponse
newListDataSetImportHistoryResponse Int
pHttpStatus_ =
  ListDataSetImportHistoryResponse'
    { $sel:nextToken:ListDataSetImportHistoryResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDataSetImportHistoryResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:dataSetImportTasks:ListDataSetImportHistoryResponse' :: [DataSetImportTask]
dataSetImportTasks = 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.
listDataSetImportHistoryResponse_nextToken :: Lens.Lens' ListDataSetImportHistoryResponse (Prelude.Maybe Prelude.Text)
listDataSetImportHistoryResponse_nextToken :: Lens' ListDataSetImportHistoryResponse (Maybe Text)
listDataSetImportHistoryResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSetImportHistoryResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataSetImportHistoryResponse' :: ListDataSetImportHistoryResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataSetImportHistoryResponse
s@ListDataSetImportHistoryResponse' {} Maybe Text
a -> ListDataSetImportHistoryResponse
s {$sel:nextToken:ListDataSetImportHistoryResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataSetImportHistoryResponse)

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

-- | The data set import tasks.
listDataSetImportHistoryResponse_dataSetImportTasks :: Lens.Lens' ListDataSetImportHistoryResponse [DataSetImportTask]
listDataSetImportHistoryResponse_dataSetImportTasks :: Lens' ListDataSetImportHistoryResponse [DataSetImportTask]
listDataSetImportHistoryResponse_dataSetImportTasks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataSetImportHistoryResponse' {[DataSetImportTask]
dataSetImportTasks :: [DataSetImportTask]
$sel:dataSetImportTasks:ListDataSetImportHistoryResponse' :: ListDataSetImportHistoryResponse -> [DataSetImportTask]
dataSetImportTasks} -> [DataSetImportTask]
dataSetImportTasks) (\s :: ListDataSetImportHistoryResponse
s@ListDataSetImportHistoryResponse' {} [DataSetImportTask]
a -> ListDataSetImportHistoryResponse
s {$sel:dataSetImportTasks:ListDataSetImportHistoryResponse' :: [DataSetImportTask]
dataSetImportTasks = [DataSetImportTask]
a} :: ListDataSetImportHistoryResponse) 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
    ListDataSetImportHistoryResponse
  where
  rnf :: ListDataSetImportHistoryResponse -> ()
rnf ListDataSetImportHistoryResponse' {Int
[DataSetImportTask]
Maybe Text
dataSetImportTasks :: [DataSetImportTask]
httpStatus :: Int
nextToken :: Maybe Text
$sel:dataSetImportTasks:ListDataSetImportHistoryResponse' :: ListDataSetImportHistoryResponse -> [DataSetImportTask]
$sel:httpStatus:ListDataSetImportHistoryResponse' :: ListDataSetImportHistoryResponse -> Int
$sel:nextToken:ListDataSetImportHistoryResponse' :: ListDataSetImportHistoryResponse -> 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 [DataSetImportTask]
dataSetImportTasks