{-# 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.ListForecastExportJobs
-- 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 forecast export jobs created using the
-- CreateForecastExportJob operation. For each forecast export job, this
-- operation returns a summary of its properties, including its Amazon
-- Resource Name (ARN). To retrieve the complete set of properties, use the
-- ARN with the DescribeForecastExportJob operation. You can filter the
-- list using an array of Filter objects.
--
-- This operation returns paginated results.
module Amazonka.Forecast.ListForecastExportJobs
  ( -- * Creating a Request
    ListForecastExportJobs (..),
    newListForecastExportJobs,

    -- * Request Lenses
    listForecastExportJobs_filters,
    listForecastExportJobs_maxResults,
    listForecastExportJobs_nextToken,

    -- * Destructuring the Response
    ListForecastExportJobsResponse (..),
    newListForecastExportJobsResponse,

    -- * Response Lenses
    listForecastExportJobsResponse_forecastExportJobs,
    listForecastExportJobsResponse_nextToken,
    listForecastExportJobsResponse_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:/ 'newListForecastExportJobs' smart constructor.
data ListForecastExportJobs = ListForecastExportJobs'
  { -- | 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 forecast export jobs 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 forecast export jobs that match the
    --     statement, specify @IS@. To exclude matching forecast export jobs,
    --     specify @IS_NOT@.
    --
    -- -   @Key@ - The name of the parameter to filter on. Valid values are
    --     @ForecastArn@ and @Status@.
    --
    -- -   @Value@ - The value to match.
    --
    -- For example, to list all jobs that export a forecast named
    -- /electricityforecast/, specify the following filter:
    --
    -- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"ForecastArn\", \"Value\": \"arn:aws:forecast:us-west-2:\<acct-id>:forecast\/electricityforecast\" } ]@
    ListForecastExportJobs -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The number of items to return in the response.
    ListForecastExportJobs -> 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.
    ListForecastExportJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListForecastExportJobs -> ListForecastExportJobs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListForecastExportJobs -> ListForecastExportJobs -> Bool
$c/= :: ListForecastExportJobs -> ListForecastExportJobs -> Bool
== :: ListForecastExportJobs -> ListForecastExportJobs -> Bool
$c== :: ListForecastExportJobs -> ListForecastExportJobs -> Bool
Prelude.Eq, ReadPrec [ListForecastExportJobs]
ReadPrec ListForecastExportJobs
Int -> ReadS ListForecastExportJobs
ReadS [ListForecastExportJobs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListForecastExportJobs]
$creadListPrec :: ReadPrec [ListForecastExportJobs]
readPrec :: ReadPrec ListForecastExportJobs
$creadPrec :: ReadPrec ListForecastExportJobs
readList :: ReadS [ListForecastExportJobs]
$creadList :: ReadS [ListForecastExportJobs]
readsPrec :: Int -> ReadS ListForecastExportJobs
$creadsPrec :: Int -> ReadS ListForecastExportJobs
Prelude.Read, Int -> ListForecastExportJobs -> ShowS
[ListForecastExportJobs] -> ShowS
ListForecastExportJobs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListForecastExportJobs] -> ShowS
$cshowList :: [ListForecastExportJobs] -> ShowS
show :: ListForecastExportJobs -> String
$cshow :: ListForecastExportJobs -> String
showsPrec :: Int -> ListForecastExportJobs -> ShowS
$cshowsPrec :: Int -> ListForecastExportJobs -> ShowS
Prelude.Show, forall x. Rep ListForecastExportJobs x -> ListForecastExportJobs
forall x. ListForecastExportJobs -> Rep ListForecastExportJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListForecastExportJobs x -> ListForecastExportJobs
$cfrom :: forall x. ListForecastExportJobs -> Rep ListForecastExportJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListForecastExportJobs' 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', 'listForecastExportJobs_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 forecast export jobs 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 forecast export jobs that match the
--     statement, specify @IS@. To exclude matching forecast export jobs,
--     specify @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. Valid values are
--     @ForecastArn@ and @Status@.
--
-- -   @Value@ - The value to match.
--
-- For example, to list all jobs that export a forecast named
-- /electricityforecast/, specify the following filter:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"ForecastArn\", \"Value\": \"arn:aws:forecast:us-west-2:\<acct-id>:forecast\/electricityforecast\" } ]@
--
-- 'maxResults', 'listForecastExportJobs_maxResults' - The number of items to return in the response.
--
-- 'nextToken', 'listForecastExportJobs_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.
newListForecastExportJobs ::
  ListForecastExportJobs
newListForecastExportJobs :: ListForecastExportJobs
newListForecastExportJobs =
  ListForecastExportJobs'
    { $sel:filters:ListForecastExportJobs' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListForecastExportJobs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListForecastExportJobs' :: 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 forecast export jobs 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 forecast export jobs that match the
--     statement, specify @IS@. To exclude matching forecast export jobs,
--     specify @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. Valid values are
--     @ForecastArn@ and @Status@.
--
-- -   @Value@ - The value to match.
--
-- For example, to list all jobs that export a forecast named
-- /electricityforecast/, specify the following filter:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"ForecastArn\", \"Value\": \"arn:aws:forecast:us-west-2:\<acct-id>:forecast\/electricityforecast\" } ]@
listForecastExportJobs_filters :: Lens.Lens' ListForecastExportJobs (Prelude.Maybe [Filter])
listForecastExportJobs_filters :: Lens' ListForecastExportJobs (Maybe [Filter])
listForecastExportJobs_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListForecastExportJobs' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListForecastExportJobs' :: ListForecastExportJobs -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListForecastExportJobs
s@ListForecastExportJobs' {} Maybe [Filter]
a -> ListForecastExportJobs
s {$sel:filters:ListForecastExportJobs' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListForecastExportJobs) 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.
listForecastExportJobs_maxResults :: Lens.Lens' ListForecastExportJobs (Prelude.Maybe Prelude.Natural)
listForecastExportJobs_maxResults :: Lens' ListForecastExportJobs (Maybe Natural)
listForecastExportJobs_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListForecastExportJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListForecastExportJobs' :: ListForecastExportJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListForecastExportJobs
s@ListForecastExportJobs' {} Maybe Natural
a -> ListForecastExportJobs
s {$sel:maxResults:ListForecastExportJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListForecastExportJobs)

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

instance Core.AWSPager ListForecastExportJobs where
  page :: ListForecastExportJobs
-> AWSResponse ListForecastExportJobs
-> Maybe ListForecastExportJobs
page ListForecastExportJobs
rq AWSResponse ListForecastExportJobs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListForecastExportJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListForecastExportJobsResponse (Maybe Text)
listForecastExportJobsResponse_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 ListForecastExportJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListForecastExportJobsResponse (Maybe [ForecastExportJobSummary])
listForecastExportJobsResponse_forecastExportJobs
            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.$ ListForecastExportJobs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListForecastExportJobs (Maybe Text)
listForecastExportJobs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListForecastExportJobs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListForecastExportJobsResponse (Maybe Text)
listForecastExportJobsResponse_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 ListForecastExportJobs where
  type
    AWSResponse ListForecastExportJobs =
      ListForecastExportJobsResponse
  request :: (Service -> Service)
-> ListForecastExportJobs -> Request ListForecastExportJobs
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 ListForecastExportJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListForecastExportJobs)))
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 [ForecastExportJobSummary]
-> Maybe Text -> Int -> ListForecastExportJobsResponse
ListForecastExportJobsResponse'
            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
"ForecastExportJobs"
                            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 ListForecastExportJobs where
  hashWithSalt :: Int -> ListForecastExportJobs -> Int
hashWithSalt Int
_salt ListForecastExportJobs' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListForecastExportJobs' :: ListForecastExportJobs -> Maybe Text
$sel:maxResults:ListForecastExportJobs' :: ListForecastExportJobs -> Maybe Natural
$sel:filters:ListForecastExportJobs' :: ListForecastExportJobs -> 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 ListForecastExportJobs where
  rnf :: ListForecastExportJobs -> ()
rnf ListForecastExportJobs' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListForecastExportJobs' :: ListForecastExportJobs -> Maybe Text
$sel:maxResults:ListForecastExportJobs' :: ListForecastExportJobs -> Maybe Natural
$sel:filters:ListForecastExportJobs' :: ListForecastExportJobs -> 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 ListForecastExportJobs where
  toHeaders :: ListForecastExportJobs -> 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.ListForecastExportJobs" ::
                          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 ListForecastExportJobs where
  toJSON :: ListForecastExportJobs -> Value
toJSON ListForecastExportJobs' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListForecastExportJobs' :: ListForecastExportJobs -> Maybe Text
$sel:maxResults:ListForecastExportJobs' :: ListForecastExportJobs -> Maybe Natural
$sel:filters:ListForecastExportJobs' :: ListForecastExportJobs -> 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 ListForecastExportJobs where
  toPath :: ListForecastExportJobs -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListForecastExportJobsResponse' 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:
--
-- 'forecastExportJobs', 'listForecastExportJobsResponse_forecastExportJobs' - An array of objects that summarize each export job\'s properties.
--
-- 'nextToken', 'listForecastExportJobsResponse_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', 'listForecastExportJobsResponse_httpStatus' - The response's http status code.
newListForecastExportJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListForecastExportJobsResponse
newListForecastExportJobsResponse :: Int -> ListForecastExportJobsResponse
newListForecastExportJobsResponse Int
pHttpStatus_ =
  ListForecastExportJobsResponse'
    { $sel:forecastExportJobs:ListForecastExportJobsResponse' :: Maybe [ForecastExportJobSummary]
forecastExportJobs =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListForecastExportJobsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListForecastExportJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of objects that summarize each export job\'s properties.
listForecastExportJobsResponse_forecastExportJobs :: Lens.Lens' ListForecastExportJobsResponse (Prelude.Maybe [ForecastExportJobSummary])
listForecastExportJobsResponse_forecastExportJobs :: Lens'
  ListForecastExportJobsResponse (Maybe [ForecastExportJobSummary])
listForecastExportJobsResponse_forecastExportJobs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListForecastExportJobsResponse' {Maybe [ForecastExportJobSummary]
forecastExportJobs :: Maybe [ForecastExportJobSummary]
$sel:forecastExportJobs:ListForecastExportJobsResponse' :: ListForecastExportJobsResponse -> Maybe [ForecastExportJobSummary]
forecastExportJobs} -> Maybe [ForecastExportJobSummary]
forecastExportJobs) (\s :: ListForecastExportJobsResponse
s@ListForecastExportJobsResponse' {} Maybe [ForecastExportJobSummary]
a -> ListForecastExportJobsResponse
s {$sel:forecastExportJobs:ListForecastExportJobsResponse' :: Maybe [ForecastExportJobSummary]
forecastExportJobs = Maybe [ForecastExportJobSummary]
a} :: ListForecastExportJobsResponse) 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.
listForecastExportJobsResponse_nextToken :: Lens.Lens' ListForecastExportJobsResponse (Prelude.Maybe Prelude.Text)
listForecastExportJobsResponse_nextToken :: Lens' ListForecastExportJobsResponse (Maybe Text)
listForecastExportJobsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListForecastExportJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListForecastExportJobsResponse' :: ListForecastExportJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListForecastExportJobsResponse
s@ListForecastExportJobsResponse' {} Maybe Text
a -> ListForecastExportJobsResponse
s {$sel:nextToken:ListForecastExportJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListForecastExportJobsResponse)

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

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