{-# 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.ListWhatIfForecastExports
-- 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 what-if forecast exports created using the
-- CreateWhatIfForecastExport operation. For each what-if forecast export,
-- 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 what-if forecast export ARN with the
-- DescribeWhatIfForecastExport operation.
--
-- This operation returns paginated results.
module Amazonka.Forecast.ListWhatIfForecastExports
  ( -- * Creating a Request
    ListWhatIfForecastExports (..),
    newListWhatIfForecastExports,

    -- * Request Lenses
    listWhatIfForecastExports_filters,
    listWhatIfForecastExports_maxResults,
    listWhatIfForecastExports_nextToken,

    -- * Destructuring the Response
    ListWhatIfForecastExportsResponse (..),
    newListWhatIfForecastExportsResponse,

    -- * Response Lenses
    listWhatIfForecastExportsResponse_nextToken,
    listWhatIfForecastExportsResponse_whatIfForecastExports,
    listWhatIfForecastExportsResponse_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:/ 'newListWhatIfForecastExports' smart constructor.
data ListWhatIfForecastExports = ListWhatIfForecastExports'
  { -- | 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 what-if 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
    --     @WhatIfForecastExportArn@ and @Status@.
    --
    -- -   @Value@ - The value to match.
    --
    -- For example, to list all jobs that export a forecast named
    -- /electricityWIFExport/, specify the following filter:
    --
    -- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"WhatIfForecastExportArn\", \"Value\": \"arn:aws:forecast:us-west-2:\<acct-id>:forecast\/electricityWIFExport\" } ]@
    ListWhatIfForecastExports -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The number of items to return in the response.
    ListWhatIfForecastExports -> 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.
    ListWhatIfForecastExports -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListWhatIfForecastExports -> ListWhatIfForecastExports -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWhatIfForecastExports -> ListWhatIfForecastExports -> Bool
$c/= :: ListWhatIfForecastExports -> ListWhatIfForecastExports -> Bool
== :: ListWhatIfForecastExports -> ListWhatIfForecastExports -> Bool
$c== :: ListWhatIfForecastExports -> ListWhatIfForecastExports -> Bool
Prelude.Eq, ReadPrec [ListWhatIfForecastExports]
ReadPrec ListWhatIfForecastExports
Int -> ReadS ListWhatIfForecastExports
ReadS [ListWhatIfForecastExports]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWhatIfForecastExports]
$creadListPrec :: ReadPrec [ListWhatIfForecastExports]
readPrec :: ReadPrec ListWhatIfForecastExports
$creadPrec :: ReadPrec ListWhatIfForecastExports
readList :: ReadS [ListWhatIfForecastExports]
$creadList :: ReadS [ListWhatIfForecastExports]
readsPrec :: Int -> ReadS ListWhatIfForecastExports
$creadsPrec :: Int -> ReadS ListWhatIfForecastExports
Prelude.Read, Int -> ListWhatIfForecastExports -> ShowS
[ListWhatIfForecastExports] -> ShowS
ListWhatIfForecastExports -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWhatIfForecastExports] -> ShowS
$cshowList :: [ListWhatIfForecastExports] -> ShowS
show :: ListWhatIfForecastExports -> String
$cshow :: ListWhatIfForecastExports -> String
showsPrec :: Int -> ListWhatIfForecastExports -> ShowS
$cshowsPrec :: Int -> ListWhatIfForecastExports -> ShowS
Prelude.Show, forall x.
Rep ListWhatIfForecastExports x -> ListWhatIfForecastExports
forall x.
ListWhatIfForecastExports -> Rep ListWhatIfForecastExports x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListWhatIfForecastExports x -> ListWhatIfForecastExports
$cfrom :: forall x.
ListWhatIfForecastExports -> Rep ListWhatIfForecastExports x
Prelude.Generic)

-- |
-- Create a value of 'ListWhatIfForecastExports' 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', 'listWhatIfForecastExports_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 what-if 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
--     @WhatIfForecastExportArn@ and @Status@.
--
-- -   @Value@ - The value to match.
--
-- For example, to list all jobs that export a forecast named
-- /electricityWIFExport/, specify the following filter:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"WhatIfForecastExportArn\", \"Value\": \"arn:aws:forecast:us-west-2:\<acct-id>:forecast\/electricityWIFExport\" } ]@
--
-- 'maxResults', 'listWhatIfForecastExports_maxResults' - The number of items to return in the response.
--
-- 'nextToken', 'listWhatIfForecastExports_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.
newListWhatIfForecastExports ::
  ListWhatIfForecastExports
newListWhatIfForecastExports :: ListWhatIfForecastExports
newListWhatIfForecastExports =
  ListWhatIfForecastExports'
    { $sel:filters:ListWhatIfForecastExports' :: Maybe [Filter]
filters =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListWhatIfForecastExports' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListWhatIfForecastExports' :: 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 what-if 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
--     @WhatIfForecastExportArn@ and @Status@.
--
-- -   @Value@ - The value to match.
--
-- For example, to list all jobs that export a forecast named
-- /electricityWIFExport/, specify the following filter:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"WhatIfForecastExportArn\", \"Value\": \"arn:aws:forecast:us-west-2:\<acct-id>:forecast\/electricityWIFExport\" } ]@
listWhatIfForecastExports_filters :: Lens.Lens' ListWhatIfForecastExports (Prelude.Maybe [Filter])
listWhatIfForecastExports_filters :: Lens' ListWhatIfForecastExports (Maybe [Filter])
listWhatIfForecastExports_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWhatIfForecastExports' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListWhatIfForecastExports
s@ListWhatIfForecastExports' {} Maybe [Filter]
a -> ListWhatIfForecastExports
s {$sel:filters:ListWhatIfForecastExports' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListWhatIfForecastExports) 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.
listWhatIfForecastExports_maxResults :: Lens.Lens' ListWhatIfForecastExports (Prelude.Maybe Prelude.Natural)
listWhatIfForecastExports_maxResults :: Lens' ListWhatIfForecastExports (Maybe Natural)
listWhatIfForecastExports_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWhatIfForecastExports' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListWhatIfForecastExports
s@ListWhatIfForecastExports' {} Maybe Natural
a -> ListWhatIfForecastExports
s {$sel:maxResults:ListWhatIfForecastExports' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListWhatIfForecastExports)

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

instance Core.AWSPager ListWhatIfForecastExports where
  page :: ListWhatIfForecastExports
-> AWSResponse ListWhatIfForecastExports
-> Maybe ListWhatIfForecastExports
page ListWhatIfForecastExports
rq AWSResponse ListWhatIfForecastExports
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListWhatIfForecastExports
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListWhatIfForecastExportsResponse (Maybe Text)
listWhatIfForecastExportsResponse_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 ListWhatIfForecastExports
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListWhatIfForecastExportsResponse
  (Maybe [WhatIfForecastExportSummary])
listWhatIfForecastExportsResponse_whatIfForecastExports
            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.$ ListWhatIfForecastExports
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListWhatIfForecastExports (Maybe Text)
listWhatIfForecastExports_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListWhatIfForecastExports
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListWhatIfForecastExportsResponse (Maybe Text)
listWhatIfForecastExportsResponse_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 ListWhatIfForecastExports where
  type
    AWSResponse ListWhatIfForecastExports =
      ListWhatIfForecastExportsResponse
  request :: (Service -> Service)
-> ListWhatIfForecastExports -> Request ListWhatIfForecastExports
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 ListWhatIfForecastExports
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListWhatIfForecastExports)))
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
-> Maybe [WhatIfForecastExportSummary]
-> Int
-> ListWhatIfForecastExportsResponse
ListWhatIfForecastExportsResponse'
            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.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"WhatIfForecastExports"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListWhatIfForecastExports where
  hashWithSalt :: Int -> ListWhatIfForecastExports -> Int
hashWithSalt Int
_salt ListWhatIfForecastExports' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> Maybe Text
$sel:maxResults:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> Maybe Natural
$sel:filters:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> 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 ListWhatIfForecastExports where
  rnf :: ListWhatIfForecastExports -> ()
rnf ListWhatIfForecastExports' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> Maybe Text
$sel:maxResults:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> Maybe Natural
$sel:filters:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> 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 ListWhatIfForecastExports where
  toHeaders :: ListWhatIfForecastExports -> 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.ListWhatIfForecastExports" ::
                          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 ListWhatIfForecastExports where
  toJSON :: ListWhatIfForecastExports -> Value
toJSON ListWhatIfForecastExports' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> Maybe Text
$sel:maxResults:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> Maybe Natural
$sel:filters:ListWhatIfForecastExports' :: ListWhatIfForecastExports -> 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 ListWhatIfForecastExports where
  toPath :: ListWhatIfForecastExports -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListWhatIfForecastExportsResponse' 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', 'listWhatIfForecastExportsResponse_nextToken' - If the response is truncated, Forecast returns this token. To retrieve
-- the next set of results, use the token in the next request.
--
-- 'whatIfForecastExports', 'listWhatIfForecastExportsResponse_whatIfForecastExports' - An array of @WhatIfForecastExports@ objects that describe the matched
-- forecast exports.
--
-- 'httpStatus', 'listWhatIfForecastExportsResponse_httpStatus' - The response's http status code.
newListWhatIfForecastExportsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListWhatIfForecastExportsResponse
newListWhatIfForecastExportsResponse :: Int -> ListWhatIfForecastExportsResponse
newListWhatIfForecastExportsResponse Int
pHttpStatus_ =
  ListWhatIfForecastExportsResponse'
    { $sel:nextToken:ListWhatIfForecastExportsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:whatIfForecastExports:ListWhatIfForecastExportsResponse' :: Maybe [WhatIfForecastExportSummary]
whatIfForecastExports = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListWhatIfForecastExportsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | An array of @WhatIfForecastExports@ objects that describe the matched
-- forecast exports.
listWhatIfForecastExportsResponse_whatIfForecastExports :: Lens.Lens' ListWhatIfForecastExportsResponse (Prelude.Maybe [WhatIfForecastExportSummary])
listWhatIfForecastExportsResponse_whatIfForecastExports :: Lens'
  ListWhatIfForecastExportsResponse
  (Maybe [WhatIfForecastExportSummary])
listWhatIfForecastExportsResponse_whatIfForecastExports = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWhatIfForecastExportsResponse' {Maybe [WhatIfForecastExportSummary]
whatIfForecastExports :: Maybe [WhatIfForecastExportSummary]
$sel:whatIfForecastExports:ListWhatIfForecastExportsResponse' :: ListWhatIfForecastExportsResponse
-> Maybe [WhatIfForecastExportSummary]
whatIfForecastExports} -> Maybe [WhatIfForecastExportSummary]
whatIfForecastExports) (\s :: ListWhatIfForecastExportsResponse
s@ListWhatIfForecastExportsResponse' {} Maybe [WhatIfForecastExportSummary]
a -> ListWhatIfForecastExportsResponse
s {$sel:whatIfForecastExports:ListWhatIfForecastExportsResponse' :: Maybe [WhatIfForecastExportSummary]
whatIfForecastExports = Maybe [WhatIfForecastExportSummary]
a} :: ListWhatIfForecastExportsResponse) 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 response's http status code.
listWhatIfForecastExportsResponse_httpStatus :: Lens.Lens' ListWhatIfForecastExportsResponse Prelude.Int
listWhatIfForecastExportsResponse_httpStatus :: Lens' ListWhatIfForecastExportsResponse Int
listWhatIfForecastExportsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWhatIfForecastExportsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListWhatIfForecastExportsResponse' :: ListWhatIfForecastExportsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListWhatIfForecastExportsResponse
s@ListWhatIfForecastExportsResponse' {} Int
a -> ListWhatIfForecastExportsResponse
s {$sel:httpStatus:ListWhatIfForecastExportsResponse' :: Int
httpStatus = Int
a} :: ListWhatIfForecastExportsResponse)

instance
  Prelude.NFData
    ListWhatIfForecastExportsResponse
  where
  rnf :: ListWhatIfForecastExportsResponse -> ()
rnf ListWhatIfForecastExportsResponse' {Int
Maybe [WhatIfForecastExportSummary]
Maybe Text
httpStatus :: Int
whatIfForecastExports :: Maybe [WhatIfForecastExportSummary]
nextToken :: Maybe Text
$sel:httpStatus:ListWhatIfForecastExportsResponse' :: ListWhatIfForecastExportsResponse -> Int
$sel:whatIfForecastExports:ListWhatIfForecastExportsResponse' :: ListWhatIfForecastExportsResponse
-> Maybe [WhatIfForecastExportSummary]
$sel:nextToken:ListWhatIfForecastExportsResponse' :: ListWhatIfForecastExportsResponse -> 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 Maybe [WhatIfForecastExportSummary]
whatIfForecastExports
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus