{-# 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.Forecast.ListDatasetImportJobs
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of dataset import jobs created using the
-- <https://docs.aws.amazon.com/forecast/latest/dg/API_CreateDatasetImportJob.html CreateDatasetImportJob>
-- operation. For each import job, this operation returns a summary of its
-- properties, including its Amazon Resource Name (ARN). You can retrieve
-- the complete set of properties by using the ARN with the
-- <https://docs.aws.amazon.com/forecast/latest/dg/API_DescribeDatasetImportJob.html DescribeDatasetImportJob>
-- operation. You can filter the list by providing an array of
-- <https://docs.aws.amazon.com/forecast/latest/dg/API_Filter.html Filter>
-- objects.
--
-- This operation returns paginated results.
module Amazonka.Forecast.ListDatasetImportJobs
  ( -- * Creating a Request
    ListDatasetImportJobs (..),
    newListDatasetImportJobs,

    -- * Request Lenses
    listDatasetImportJobs_filters,
    listDatasetImportJobs_maxResults,
    listDatasetImportJobs_nextToken,

    -- * Destructuring the Response
    ListDatasetImportJobsResponse (..),
    newListDatasetImportJobsResponse,

    -- * Response Lenses
    listDatasetImportJobsResponse_datasetImportJobs,
    listDatasetImportJobsResponse_nextToken,
    listDatasetImportJobsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListDatasetImportJobs' smart constructor.
data ListDatasetImportJobs = ListDatasetImportJobs'
  { -- | An array of filters. For each filter, you provide a condition and a
    -- match statement. The condition is either @IS@ or @IS_NOT@, which
    -- specifies whether to include or exclude the datasets that match the
    -- statement from the list, respectively. The match statement consists of a
    -- key and a value.
    --
    -- __Filter properties__
    --
    -- -   @Condition@ - The condition to apply. Valid values are @IS@ and
    --     @IS_NOT@. To include the datasets that match the statement, specify
    --     @IS@. To exclude matching datasets, specify @IS_NOT@.
    --
    -- -   @Key@ - The name of the parameter to filter on. Valid values are
    --     @DatasetArn@ and @Status@.
    --
    -- -   @Value@ - The value to match.
    --
    -- For example, to list all dataset import jobs whose status is ACTIVE, you
    -- specify the following filter:
    --
    -- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]@
    ListDatasetImportJobs -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The number of items to return in the response.
    ListDatasetImportJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the result of the previous request was truncated, the response
    -- includes a @NextToken@. To retrieve the next set of results, use the
    -- token in the next request. Tokens expire after 24 hours.
    ListDatasetImportJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListDatasetImportJobs -> ListDatasetImportJobs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDatasetImportJobs -> ListDatasetImportJobs -> Bool
$c/= :: ListDatasetImportJobs -> ListDatasetImportJobs -> Bool
== :: ListDatasetImportJobs -> ListDatasetImportJobs -> Bool
$c== :: ListDatasetImportJobs -> ListDatasetImportJobs -> Bool
Prelude.Eq, ReadPrec [ListDatasetImportJobs]
ReadPrec ListDatasetImportJobs
Int -> ReadS ListDatasetImportJobs
ReadS [ListDatasetImportJobs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDatasetImportJobs]
$creadListPrec :: ReadPrec [ListDatasetImportJobs]
readPrec :: ReadPrec ListDatasetImportJobs
$creadPrec :: ReadPrec ListDatasetImportJobs
readList :: ReadS [ListDatasetImportJobs]
$creadList :: ReadS [ListDatasetImportJobs]
readsPrec :: Int -> ReadS ListDatasetImportJobs
$creadsPrec :: Int -> ReadS ListDatasetImportJobs
Prelude.Read, Int -> ListDatasetImportJobs -> ShowS
[ListDatasetImportJobs] -> ShowS
ListDatasetImportJobs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDatasetImportJobs] -> ShowS
$cshowList :: [ListDatasetImportJobs] -> ShowS
show :: ListDatasetImportJobs -> String
$cshow :: ListDatasetImportJobs -> String
showsPrec :: Int -> ListDatasetImportJobs -> ShowS
$cshowsPrec :: Int -> ListDatasetImportJobs -> ShowS
Prelude.Show, forall x. Rep ListDatasetImportJobs x -> ListDatasetImportJobs
forall x. ListDatasetImportJobs -> Rep ListDatasetImportJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDatasetImportJobs x -> ListDatasetImportJobs
$cfrom :: forall x. ListDatasetImportJobs -> Rep ListDatasetImportJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListDatasetImportJobs' 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:
--
-- 'filters', 'listDatasetImportJobs_filters' - An array of filters. For each filter, you provide a condition and a
-- match statement. The condition is either @IS@ or @IS_NOT@, which
-- specifies whether to include or exclude the datasets that match the
-- statement from the list, respectively. The match statement consists of a
-- key and a value.
--
-- __Filter properties__
--
-- -   @Condition@ - The condition to apply. Valid values are @IS@ and
--     @IS_NOT@. To include the datasets that match the statement, specify
--     @IS@. To exclude matching datasets, specify @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. Valid values are
--     @DatasetArn@ and @Status@.
--
-- -   @Value@ - The value to match.
--
-- For example, to list all dataset import jobs whose status is ACTIVE, you
-- specify the following filter:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]@
--
-- 'maxResults', 'listDatasetImportJobs_maxResults' - The number of items to return in the response.
--
-- 'nextToken', 'listDatasetImportJobs_nextToken' - If the result of the previous request was truncated, the response
-- includes a @NextToken@. To retrieve the next set of results, use the
-- token in the next request. Tokens expire after 24 hours.
newListDatasetImportJobs ::
  ListDatasetImportJobs
newListDatasetImportJobs :: ListDatasetImportJobs
newListDatasetImportJobs =
  ListDatasetImportJobs'
    { $sel:filters:ListDatasetImportJobs' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListDatasetImportJobs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDatasetImportJobs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | An array of filters. For each filter, you provide a condition and a
-- match statement. The condition is either @IS@ or @IS_NOT@, which
-- specifies whether to include or exclude the datasets that match the
-- statement from the list, respectively. The match statement consists of a
-- key and a value.
--
-- __Filter properties__
--
-- -   @Condition@ - The condition to apply. Valid values are @IS@ and
--     @IS_NOT@. To include the datasets that match the statement, specify
--     @IS@. To exclude matching datasets, specify @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. Valid values are
--     @DatasetArn@ and @Status@.
--
-- -   @Value@ - The value to match.
--
-- For example, to list all dataset import jobs whose status is ACTIVE, you
-- specify the following filter:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]@
listDatasetImportJobs_filters :: Lens.Lens' ListDatasetImportJobs (Prelude.Maybe [Filter])
listDatasetImportJobs_filters :: Lens' ListDatasetImportJobs (Maybe [Filter])
listDatasetImportJobs_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatasetImportJobs' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListDatasetImportJobs' :: ListDatasetImportJobs -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListDatasetImportJobs
s@ListDatasetImportJobs' {} Maybe [Filter]
a -> ListDatasetImportJobs
s {$sel:filters:ListDatasetImportJobs' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListDatasetImportJobs) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of items to return in the response.
listDatasetImportJobs_maxResults :: Lens.Lens' ListDatasetImportJobs (Prelude.Maybe Prelude.Natural)
listDatasetImportJobs_maxResults :: Lens' ListDatasetImportJobs (Maybe Natural)
listDatasetImportJobs_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatasetImportJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDatasetImportJobs' :: ListDatasetImportJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDatasetImportJobs
s@ListDatasetImportJobs' {} Maybe Natural
a -> ListDatasetImportJobs
s {$sel:maxResults:ListDatasetImportJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDatasetImportJobs)

-- | If the result of the previous request was truncated, the response
-- includes a @NextToken@. To retrieve the next set of results, use the
-- token in the next request. Tokens expire after 24 hours.
listDatasetImportJobs_nextToken :: Lens.Lens' ListDatasetImportJobs (Prelude.Maybe Prelude.Text)
listDatasetImportJobs_nextToken :: Lens' ListDatasetImportJobs (Maybe Text)
listDatasetImportJobs_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatasetImportJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDatasetImportJobs' :: ListDatasetImportJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDatasetImportJobs
s@ListDatasetImportJobs' {} Maybe Text
a -> ListDatasetImportJobs
s {$sel:nextToken:ListDatasetImportJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListDatasetImportJobs)

instance Core.AWSPager ListDatasetImportJobs where
  page :: ListDatasetImportJobs
-> AWSResponse ListDatasetImportJobs -> Maybe ListDatasetImportJobs
page ListDatasetImportJobs
rq AWSResponse ListDatasetImportJobs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDatasetImportJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDatasetImportJobsResponse (Maybe Text)
listDatasetImportJobsResponse_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 ListDatasetImportJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListDatasetImportJobsResponse (Maybe [DatasetImportJobSummary])
listDatasetImportJobsResponse_datasetImportJobs
            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.$ ListDatasetImportJobs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListDatasetImportJobs (Maybe Text)
listDatasetImportJobs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDatasetImportJobs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDatasetImportJobsResponse (Maybe Text)
listDatasetImportJobsResponse_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 ListDatasetImportJobs where
  type
    AWSResponse ListDatasetImportJobs =
      ListDatasetImportJobsResponse
  request :: (Service -> Service)
-> ListDatasetImportJobs -> Request ListDatasetImportJobs
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 ListDatasetImportJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDatasetImportJobs)))
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 [DatasetImportJobSummary]
-> Maybe Text -> Int -> ListDatasetImportJobsResponse
ListDatasetImportJobsResponse'
            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
"DatasetImportJobs"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListDatasetImportJobs where
  hashWithSalt :: Int -> ListDatasetImportJobs -> Int
hashWithSalt Int
_salt ListDatasetImportJobs' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListDatasetImportJobs' :: ListDatasetImportJobs -> Maybe Text
$sel:maxResults:ListDatasetImportJobs' :: ListDatasetImportJobs -> Maybe Natural
$sel:filters:ListDatasetImportJobs' :: ListDatasetImportJobs -> Maybe [Filter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

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

instance Data.ToHeaders ListDatasetImportJobs where
  toHeaders :: ListDatasetImportJobs -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AmazonForecast.ListDatasetImportJobs" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListDatasetImportJobs where
  toJSON :: ListDatasetImportJobs -> Value
toJSON ListDatasetImportJobs' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListDatasetImportJobs' :: ListDatasetImportJobs -> Maybe Text
$sel:maxResults:ListDatasetImportJobs' :: ListDatasetImportJobs -> Maybe Natural
$sel:filters:ListDatasetImportJobs' :: ListDatasetImportJobs -> Maybe [Filter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filters" 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 [Filter]
filters,
            (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
          ]
      )

instance Data.ToPath ListDatasetImportJobs where
  toPath :: ListDatasetImportJobs -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListDatasetImportJobsResponse' smart constructor.
data ListDatasetImportJobsResponse = ListDatasetImportJobsResponse'
  { -- | An array of objects that summarize each dataset import job\'s
    -- properties.
    ListDatasetImportJobsResponse -> Maybe [DatasetImportJobSummary]
datasetImportJobs :: Prelude.Maybe [DatasetImportJobSummary],
    -- | If the response is truncated, Amazon Forecast returns this token. To
    -- retrieve the next set of results, use the token in the next request.
    ListDatasetImportJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDatasetImportJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDatasetImportJobsResponse
-> ListDatasetImportJobsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDatasetImportJobsResponse
-> ListDatasetImportJobsResponse -> Bool
$c/= :: ListDatasetImportJobsResponse
-> ListDatasetImportJobsResponse -> Bool
== :: ListDatasetImportJobsResponse
-> ListDatasetImportJobsResponse -> Bool
$c== :: ListDatasetImportJobsResponse
-> ListDatasetImportJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListDatasetImportJobsResponse]
ReadPrec ListDatasetImportJobsResponse
Int -> ReadS ListDatasetImportJobsResponse
ReadS [ListDatasetImportJobsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDatasetImportJobsResponse]
$creadListPrec :: ReadPrec [ListDatasetImportJobsResponse]
readPrec :: ReadPrec ListDatasetImportJobsResponse
$creadPrec :: ReadPrec ListDatasetImportJobsResponse
readList :: ReadS [ListDatasetImportJobsResponse]
$creadList :: ReadS [ListDatasetImportJobsResponse]
readsPrec :: Int -> ReadS ListDatasetImportJobsResponse
$creadsPrec :: Int -> ReadS ListDatasetImportJobsResponse
Prelude.Read, Int -> ListDatasetImportJobsResponse -> ShowS
[ListDatasetImportJobsResponse] -> ShowS
ListDatasetImportJobsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDatasetImportJobsResponse] -> ShowS
$cshowList :: [ListDatasetImportJobsResponse] -> ShowS
show :: ListDatasetImportJobsResponse -> String
$cshow :: ListDatasetImportJobsResponse -> String
showsPrec :: Int -> ListDatasetImportJobsResponse -> ShowS
$cshowsPrec :: Int -> ListDatasetImportJobsResponse -> ShowS
Prelude.Show, forall x.
Rep ListDatasetImportJobsResponse x
-> ListDatasetImportJobsResponse
forall x.
ListDatasetImportJobsResponse
-> Rep ListDatasetImportJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDatasetImportJobsResponse x
-> ListDatasetImportJobsResponse
$cfrom :: forall x.
ListDatasetImportJobsResponse
-> Rep ListDatasetImportJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDatasetImportJobsResponse' 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:
--
-- 'datasetImportJobs', 'listDatasetImportJobsResponse_datasetImportJobs' - An array of objects that summarize each dataset import job\'s
-- properties.
--
-- 'nextToken', 'listDatasetImportJobsResponse_nextToken' - If the response is truncated, Amazon Forecast returns this token. To
-- retrieve the next set of results, use the token in the next request.
--
-- 'httpStatus', 'listDatasetImportJobsResponse_httpStatus' - The response's http status code.
newListDatasetImportJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDatasetImportJobsResponse
newListDatasetImportJobsResponse :: Int -> ListDatasetImportJobsResponse
newListDatasetImportJobsResponse Int
pHttpStatus_ =
  ListDatasetImportJobsResponse'
    { $sel:datasetImportJobs:ListDatasetImportJobsResponse' :: Maybe [DatasetImportJobSummary]
datasetImportJobs =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDatasetImportJobsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDatasetImportJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of objects that summarize each dataset import job\'s
-- properties.
listDatasetImportJobsResponse_datasetImportJobs :: Lens.Lens' ListDatasetImportJobsResponse (Prelude.Maybe [DatasetImportJobSummary])
listDatasetImportJobsResponse_datasetImportJobs :: Lens'
  ListDatasetImportJobsResponse (Maybe [DatasetImportJobSummary])
listDatasetImportJobsResponse_datasetImportJobs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatasetImportJobsResponse' {Maybe [DatasetImportJobSummary]
datasetImportJobs :: Maybe [DatasetImportJobSummary]
$sel:datasetImportJobs:ListDatasetImportJobsResponse' :: ListDatasetImportJobsResponse -> Maybe [DatasetImportJobSummary]
datasetImportJobs} -> Maybe [DatasetImportJobSummary]
datasetImportJobs) (\s :: ListDatasetImportJobsResponse
s@ListDatasetImportJobsResponse' {} Maybe [DatasetImportJobSummary]
a -> ListDatasetImportJobsResponse
s {$sel:datasetImportJobs:ListDatasetImportJobsResponse' :: Maybe [DatasetImportJobSummary]
datasetImportJobs = Maybe [DatasetImportJobSummary]
a} :: ListDatasetImportJobsResponse) 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

-- | If the response is truncated, Amazon Forecast returns this token. To
-- retrieve the next set of results, use the token in the next request.
listDatasetImportJobsResponse_nextToken :: Lens.Lens' ListDatasetImportJobsResponse (Prelude.Maybe Prelude.Text)
listDatasetImportJobsResponse_nextToken :: Lens' ListDatasetImportJobsResponse (Maybe Text)
listDatasetImportJobsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatasetImportJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDatasetImportJobsResponse' :: ListDatasetImportJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDatasetImportJobsResponse
s@ListDatasetImportJobsResponse' {} Maybe Text
a -> ListDatasetImportJobsResponse
s {$sel:nextToken:ListDatasetImportJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDatasetImportJobsResponse)

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

instance Prelude.NFData ListDatasetImportJobsResponse where
  rnf :: ListDatasetImportJobsResponse -> ()
rnf ListDatasetImportJobsResponse' {Int
Maybe [DatasetImportJobSummary]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
datasetImportJobs :: Maybe [DatasetImportJobSummary]
$sel:httpStatus:ListDatasetImportJobsResponse' :: ListDatasetImportJobsResponse -> Int
$sel:nextToken:ListDatasetImportJobsResponse' :: ListDatasetImportJobsResponse -> Maybe Text
$sel:datasetImportJobs:ListDatasetImportJobsResponse' :: ListDatasetImportJobsResponse -> Maybe [DatasetImportJobSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [DatasetImportJobSummary]
datasetImportJobs
      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 Int
httpStatus