{-# 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.DescribeForecast
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes a forecast created using the CreateForecast operation.
--
-- In addition to listing the properties provided in the @CreateForecast@
-- request, this operation lists the following properties:
--
-- -   @DatasetGroupArn@ - The dataset group that provided the training
--     data.
--
-- -   @CreationTime@
--
-- -   @LastModificationTime@
--
-- -   @Status@
--
-- -   @Message@ - If an error occurred, information about the error.
module Amazonka.Forecast.DescribeForecast
  ( -- * Creating a Request
    DescribeForecast (..),
    newDescribeForecast,

    -- * Request Lenses
    describeForecast_forecastArn,

    -- * Destructuring the Response
    DescribeForecastResponse (..),
    newDescribeForecastResponse,

    -- * Response Lenses
    describeForecastResponse_creationTime,
    describeForecastResponse_datasetGroupArn,
    describeForecastResponse_estimatedTimeRemainingInMinutes,
    describeForecastResponse_forecastArn,
    describeForecastResponse_forecastName,
    describeForecastResponse_forecastTypes,
    describeForecastResponse_lastModificationTime,
    describeForecastResponse_message,
    describeForecastResponse_predictorArn,
    describeForecastResponse_status,
    describeForecastResponse_timeSeriesSelector,
    describeForecastResponse_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:/ 'newDescribeForecast' smart constructor.
data DescribeForecast = DescribeForecast'
  { -- | The Amazon Resource Name (ARN) of the forecast.
    DescribeForecast -> Text
forecastArn :: Prelude.Text
  }
  deriving (DescribeForecast -> DescribeForecast -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeForecast -> DescribeForecast -> Bool
$c/= :: DescribeForecast -> DescribeForecast -> Bool
== :: DescribeForecast -> DescribeForecast -> Bool
$c== :: DescribeForecast -> DescribeForecast -> Bool
Prelude.Eq, ReadPrec [DescribeForecast]
ReadPrec DescribeForecast
Int -> ReadS DescribeForecast
ReadS [DescribeForecast]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeForecast]
$creadListPrec :: ReadPrec [DescribeForecast]
readPrec :: ReadPrec DescribeForecast
$creadPrec :: ReadPrec DescribeForecast
readList :: ReadS [DescribeForecast]
$creadList :: ReadS [DescribeForecast]
readsPrec :: Int -> ReadS DescribeForecast
$creadsPrec :: Int -> ReadS DescribeForecast
Prelude.Read, Int -> DescribeForecast -> ShowS
[DescribeForecast] -> ShowS
DescribeForecast -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeForecast] -> ShowS
$cshowList :: [DescribeForecast] -> ShowS
show :: DescribeForecast -> String
$cshow :: DescribeForecast -> String
showsPrec :: Int -> DescribeForecast -> ShowS
$cshowsPrec :: Int -> DescribeForecast -> ShowS
Prelude.Show, forall x. Rep DescribeForecast x -> DescribeForecast
forall x. DescribeForecast -> Rep DescribeForecast x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeForecast x -> DescribeForecast
$cfrom :: forall x. DescribeForecast -> Rep DescribeForecast x
Prelude.Generic)

-- |
-- Create a value of 'DescribeForecast' 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:
--
-- 'forecastArn', 'describeForecast_forecastArn' - The Amazon Resource Name (ARN) of the forecast.
newDescribeForecast ::
  -- | 'forecastArn'
  Prelude.Text ->
  DescribeForecast
newDescribeForecast :: Text -> DescribeForecast
newDescribeForecast Text
pForecastArn_ =
  DescribeForecast' {$sel:forecastArn:DescribeForecast' :: Text
forecastArn = Text
pForecastArn_}

-- | The Amazon Resource Name (ARN) of the forecast.
describeForecast_forecastArn :: Lens.Lens' DescribeForecast Prelude.Text
describeForecast_forecastArn :: Lens' DescribeForecast Text
describeForecast_forecastArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecast' {Text
forecastArn :: Text
$sel:forecastArn:DescribeForecast' :: DescribeForecast -> Text
forecastArn} -> Text
forecastArn) (\s :: DescribeForecast
s@DescribeForecast' {} Text
a -> DescribeForecast
s {$sel:forecastArn:DescribeForecast' :: Text
forecastArn = Text
a} :: DescribeForecast)

instance Core.AWSRequest DescribeForecast where
  type
    AWSResponse DescribeForecast =
      DescribeForecastResponse
  request :: (Service -> Service)
-> DescribeForecast -> Request DescribeForecast
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 DescribeForecast
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeForecast)))
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 POSIX
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TimeSeriesSelector
-> Int
-> DescribeForecastResponse
DescribeForecastResponse'
            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
"CreationTime")
            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
"DatasetGroupArn")
            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
"EstimatedTimeRemainingInMinutes")
            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
"ForecastArn")
            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
"ForecastName")
            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
"ForecastTypes")
            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
"LastModificationTime")
            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
"Message")
            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
"PredictorArn")
            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
"Status")
            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
"TimeSeriesSelector")
            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 DescribeForecast where
  hashWithSalt :: Int -> DescribeForecast -> Int
hashWithSalt Int
_salt DescribeForecast' {Text
forecastArn :: Text
$sel:forecastArn:DescribeForecast' :: DescribeForecast -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
forecastArn

instance Prelude.NFData DescribeForecast where
  rnf :: DescribeForecast -> ()
rnf DescribeForecast' {Text
forecastArn :: Text
$sel:forecastArn:DescribeForecast' :: DescribeForecast -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
forecastArn

instance Data.ToHeaders DescribeForecast where
  toHeaders :: DescribeForecast -> 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.DescribeForecast" ::
                          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 DescribeForecast where
  toJSON :: DescribeForecast -> Value
toJSON DescribeForecast' {Text
forecastArn :: Text
$sel:forecastArn:DescribeForecast' :: DescribeForecast -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"ForecastArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
forecastArn)]
      )

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

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

-- | /See:/ 'newDescribeForecastResponse' smart constructor.
data DescribeForecastResponse = DescribeForecastResponse'
  { -- | When the forecast creation task was created.
    DescribeForecastResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
    -- | The ARN of the dataset group that provided the data used to train the
    -- predictor.
    DescribeForecastResponse -> Maybe Text
datasetGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The estimated time remaining in minutes for the forecast job to
    -- complete.
    DescribeForecastResponse -> Maybe Integer
estimatedTimeRemainingInMinutes :: Prelude.Maybe Prelude.Integer,
    -- | The forecast ARN as specified in the request.
    DescribeForecastResponse -> Maybe Text
forecastArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the forecast.
    DescribeForecastResponse -> Maybe Text
forecastName :: Prelude.Maybe Prelude.Text,
    -- | The quantiles at which probabilistic forecasts were generated.
    DescribeForecastResponse -> Maybe (NonEmpty Text)
forecastTypes :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The last time the resource was modified. The timestamp depends on the
    -- status of the job:
    --
    -- -   @CREATE_PENDING@ - The @CreationTime@.
    --
    -- -   @CREATE_IN_PROGRESS@ - The current timestamp.
    --
    -- -   @CREATE_STOPPING@ - The current timestamp.
    --
    -- -   @CREATE_STOPPED@ - When the job stopped.
    --
    -- -   @ACTIVE@ or @CREATE_FAILED@ - When the job finished or failed.
    DescribeForecastResponse -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Data.POSIX,
    -- | If an error occurred, an informational message about the error.
    DescribeForecastResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the predictor used to generate the forecast.
    DescribeForecastResponse -> Maybe Text
predictorArn :: Prelude.Maybe Prelude.Text,
    -- | The status of the forecast. States include:
    --
    -- -   @ACTIVE@
    --
    -- -   @CREATE_PENDING@, @CREATE_IN_PROGRESS@, @CREATE_FAILED@
    --
    -- -   @CREATE_STOPPING@, @CREATE_STOPPED@
    --
    -- -   @DELETE_PENDING@, @DELETE_IN_PROGRESS@, @DELETE_FAILED@
    --
    -- The @Status@ of the forecast must be @ACTIVE@ before you can query or
    -- export the forecast.
    DescribeForecastResponse -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The time series to include in the forecast.
    DescribeForecastResponse -> Maybe TimeSeriesSelector
timeSeriesSelector :: Prelude.Maybe TimeSeriesSelector,
    -- | The response's http status code.
    DescribeForecastResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeForecastResponse -> DescribeForecastResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeForecastResponse -> DescribeForecastResponse -> Bool
$c/= :: DescribeForecastResponse -> DescribeForecastResponse -> Bool
== :: DescribeForecastResponse -> DescribeForecastResponse -> Bool
$c== :: DescribeForecastResponse -> DescribeForecastResponse -> Bool
Prelude.Eq, ReadPrec [DescribeForecastResponse]
ReadPrec DescribeForecastResponse
Int -> ReadS DescribeForecastResponse
ReadS [DescribeForecastResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeForecastResponse]
$creadListPrec :: ReadPrec [DescribeForecastResponse]
readPrec :: ReadPrec DescribeForecastResponse
$creadPrec :: ReadPrec DescribeForecastResponse
readList :: ReadS [DescribeForecastResponse]
$creadList :: ReadS [DescribeForecastResponse]
readsPrec :: Int -> ReadS DescribeForecastResponse
$creadsPrec :: Int -> ReadS DescribeForecastResponse
Prelude.Read, Int -> DescribeForecastResponse -> ShowS
[DescribeForecastResponse] -> ShowS
DescribeForecastResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeForecastResponse] -> ShowS
$cshowList :: [DescribeForecastResponse] -> ShowS
show :: DescribeForecastResponse -> String
$cshow :: DescribeForecastResponse -> String
showsPrec :: Int -> DescribeForecastResponse -> ShowS
$cshowsPrec :: Int -> DescribeForecastResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeForecastResponse x -> DescribeForecastResponse
forall x.
DescribeForecastResponse -> Rep DescribeForecastResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeForecastResponse x -> DescribeForecastResponse
$cfrom :: forall x.
DescribeForecastResponse -> Rep DescribeForecastResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeForecastResponse' 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:
--
-- 'creationTime', 'describeForecastResponse_creationTime' - When the forecast creation task was created.
--
-- 'datasetGroupArn', 'describeForecastResponse_datasetGroupArn' - The ARN of the dataset group that provided the data used to train the
-- predictor.
--
-- 'estimatedTimeRemainingInMinutes', 'describeForecastResponse_estimatedTimeRemainingInMinutes' - The estimated time remaining in minutes for the forecast job to
-- complete.
--
-- 'forecastArn', 'describeForecastResponse_forecastArn' - The forecast ARN as specified in the request.
--
-- 'forecastName', 'describeForecastResponse_forecastName' - The name of the forecast.
--
-- 'forecastTypes', 'describeForecastResponse_forecastTypes' - The quantiles at which probabilistic forecasts were generated.
--
-- 'lastModificationTime', 'describeForecastResponse_lastModificationTime' - The last time the resource was modified. The timestamp depends on the
-- status of the job:
--
-- -   @CREATE_PENDING@ - The @CreationTime@.
--
-- -   @CREATE_IN_PROGRESS@ - The current timestamp.
--
-- -   @CREATE_STOPPING@ - The current timestamp.
--
-- -   @CREATE_STOPPED@ - When the job stopped.
--
-- -   @ACTIVE@ or @CREATE_FAILED@ - When the job finished or failed.
--
-- 'message', 'describeForecastResponse_message' - If an error occurred, an informational message about the error.
--
-- 'predictorArn', 'describeForecastResponse_predictorArn' - The ARN of the predictor used to generate the forecast.
--
-- 'status', 'describeForecastResponse_status' - The status of the forecast. States include:
--
-- -   @ACTIVE@
--
-- -   @CREATE_PENDING@, @CREATE_IN_PROGRESS@, @CREATE_FAILED@
--
-- -   @CREATE_STOPPING@, @CREATE_STOPPED@
--
-- -   @DELETE_PENDING@, @DELETE_IN_PROGRESS@, @DELETE_FAILED@
--
-- The @Status@ of the forecast must be @ACTIVE@ before you can query or
-- export the forecast.
--
-- 'timeSeriesSelector', 'describeForecastResponse_timeSeriesSelector' - The time series to include in the forecast.
--
-- 'httpStatus', 'describeForecastResponse_httpStatus' - The response's http status code.
newDescribeForecastResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeForecastResponse
newDescribeForecastResponse :: Int -> DescribeForecastResponse
newDescribeForecastResponse Int
pHttpStatus_ =
  DescribeForecastResponse'
    { $sel:creationTime:DescribeForecastResponse' :: Maybe POSIX
creationTime =
        forall a. Maybe a
Prelude.Nothing,
      $sel:datasetGroupArn:DescribeForecastResponse' :: Maybe Text
datasetGroupArn = forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedTimeRemainingInMinutes:DescribeForecastResponse' :: Maybe Integer
estimatedTimeRemainingInMinutes = forall a. Maybe a
Prelude.Nothing,
      $sel:forecastArn:DescribeForecastResponse' :: Maybe Text
forecastArn = forall a. Maybe a
Prelude.Nothing,
      $sel:forecastName:DescribeForecastResponse' :: Maybe Text
forecastName = forall a. Maybe a
Prelude.Nothing,
      $sel:forecastTypes:DescribeForecastResponse' :: Maybe (NonEmpty Text)
forecastTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModificationTime:DescribeForecastResponse' :: Maybe POSIX
lastModificationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:message:DescribeForecastResponse' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
      $sel:predictorArn:DescribeForecastResponse' :: Maybe Text
predictorArn = forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeForecastResponse' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
      $sel:timeSeriesSelector:DescribeForecastResponse' :: Maybe TimeSeriesSelector
timeSeriesSelector = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeForecastResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | When the forecast creation task was created.
describeForecastResponse_creationTime :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe Prelude.UTCTime)
describeForecastResponse_creationTime :: Lens' DescribeForecastResponse (Maybe UTCTime)
describeForecastResponse_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe POSIX
a -> DescribeForecastResponse
s {$sel:creationTime:DescribeForecastResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeForecastResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The ARN of the dataset group that provided the data used to train the
-- predictor.
describeForecastResponse_datasetGroupArn :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe Prelude.Text)
describeForecastResponse_datasetGroupArn :: Lens' DescribeForecastResponse (Maybe Text)
describeForecastResponse_datasetGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe Text
datasetGroupArn :: Maybe Text
$sel:datasetGroupArn:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
datasetGroupArn} -> Maybe Text
datasetGroupArn) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe Text
a -> DescribeForecastResponse
s {$sel:datasetGroupArn:DescribeForecastResponse' :: Maybe Text
datasetGroupArn = Maybe Text
a} :: DescribeForecastResponse)

-- | The estimated time remaining in minutes for the forecast job to
-- complete.
describeForecastResponse_estimatedTimeRemainingInMinutes :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe Prelude.Integer)
describeForecastResponse_estimatedTimeRemainingInMinutes :: Lens' DescribeForecastResponse (Maybe Integer)
describeForecastResponse_estimatedTimeRemainingInMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe Integer
estimatedTimeRemainingInMinutes :: Maybe Integer
$sel:estimatedTimeRemainingInMinutes:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Integer
estimatedTimeRemainingInMinutes} -> Maybe Integer
estimatedTimeRemainingInMinutes) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe Integer
a -> DescribeForecastResponse
s {$sel:estimatedTimeRemainingInMinutes:DescribeForecastResponse' :: Maybe Integer
estimatedTimeRemainingInMinutes = Maybe Integer
a} :: DescribeForecastResponse)

-- | The forecast ARN as specified in the request.
describeForecastResponse_forecastArn :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe Prelude.Text)
describeForecastResponse_forecastArn :: Lens' DescribeForecastResponse (Maybe Text)
describeForecastResponse_forecastArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe Text
forecastArn :: Maybe Text
$sel:forecastArn:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
forecastArn} -> Maybe Text
forecastArn) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe Text
a -> DescribeForecastResponse
s {$sel:forecastArn:DescribeForecastResponse' :: Maybe Text
forecastArn = Maybe Text
a} :: DescribeForecastResponse)

-- | The name of the forecast.
describeForecastResponse_forecastName :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe Prelude.Text)
describeForecastResponse_forecastName :: Lens' DescribeForecastResponse (Maybe Text)
describeForecastResponse_forecastName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe Text
forecastName :: Maybe Text
$sel:forecastName:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
forecastName} -> Maybe Text
forecastName) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe Text
a -> DescribeForecastResponse
s {$sel:forecastName:DescribeForecastResponse' :: Maybe Text
forecastName = Maybe Text
a} :: DescribeForecastResponse)

-- | The quantiles at which probabilistic forecasts were generated.
describeForecastResponse_forecastTypes :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
describeForecastResponse_forecastTypes :: Lens' DescribeForecastResponse (Maybe (NonEmpty Text))
describeForecastResponse_forecastTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe (NonEmpty Text)
forecastTypes :: Maybe (NonEmpty Text)
$sel:forecastTypes:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe (NonEmpty Text)
forecastTypes} -> Maybe (NonEmpty Text)
forecastTypes) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe (NonEmpty Text)
a -> DescribeForecastResponse
s {$sel:forecastTypes:DescribeForecastResponse' :: Maybe (NonEmpty Text)
forecastTypes = Maybe (NonEmpty Text)
a} :: DescribeForecastResponse) 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 last time the resource was modified. The timestamp depends on the
-- status of the job:
--
-- -   @CREATE_PENDING@ - The @CreationTime@.
--
-- -   @CREATE_IN_PROGRESS@ - The current timestamp.
--
-- -   @CREATE_STOPPING@ - The current timestamp.
--
-- -   @CREATE_STOPPED@ - When the job stopped.
--
-- -   @ACTIVE@ or @CREATE_FAILED@ - When the job finished or failed.
describeForecastResponse_lastModificationTime :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe Prelude.UTCTime)
describeForecastResponse_lastModificationTime :: Lens' DescribeForecastResponse (Maybe UTCTime)
describeForecastResponse_lastModificationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe POSIX
a -> DescribeForecastResponse
s {$sel:lastModificationTime:DescribeForecastResponse' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: DescribeForecastResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | If an error occurred, an informational message about the error.
describeForecastResponse_message :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe Prelude.Text)
describeForecastResponse_message :: Lens' DescribeForecastResponse (Maybe Text)
describeForecastResponse_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe Text
message :: Maybe Text
$sel:message:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
message} -> Maybe Text
message) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe Text
a -> DescribeForecastResponse
s {$sel:message:DescribeForecastResponse' :: Maybe Text
message = Maybe Text
a} :: DescribeForecastResponse)

-- | The ARN of the predictor used to generate the forecast.
describeForecastResponse_predictorArn :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe Prelude.Text)
describeForecastResponse_predictorArn :: Lens' DescribeForecastResponse (Maybe Text)
describeForecastResponse_predictorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe Text
predictorArn :: Maybe Text
$sel:predictorArn:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
predictorArn} -> Maybe Text
predictorArn) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe Text
a -> DescribeForecastResponse
s {$sel:predictorArn:DescribeForecastResponse' :: Maybe Text
predictorArn = Maybe Text
a} :: DescribeForecastResponse)

-- | The status of the forecast. States include:
--
-- -   @ACTIVE@
--
-- -   @CREATE_PENDING@, @CREATE_IN_PROGRESS@, @CREATE_FAILED@
--
-- -   @CREATE_STOPPING@, @CREATE_STOPPED@
--
-- -   @DELETE_PENDING@, @DELETE_IN_PROGRESS@, @DELETE_FAILED@
--
-- The @Status@ of the forecast must be @ACTIVE@ before you can query or
-- export the forecast.
describeForecastResponse_status :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe Prelude.Text)
describeForecastResponse_status :: Lens' DescribeForecastResponse (Maybe Text)
describeForecastResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe Text
status :: Maybe Text
$sel:status:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
status} -> Maybe Text
status) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe Text
a -> DescribeForecastResponse
s {$sel:status:DescribeForecastResponse' :: Maybe Text
status = Maybe Text
a} :: DescribeForecastResponse)

-- | The time series to include in the forecast.
describeForecastResponse_timeSeriesSelector :: Lens.Lens' DescribeForecastResponse (Prelude.Maybe TimeSeriesSelector)
describeForecastResponse_timeSeriesSelector :: Lens' DescribeForecastResponse (Maybe TimeSeriesSelector)
describeForecastResponse_timeSeriesSelector = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastResponse' {Maybe TimeSeriesSelector
timeSeriesSelector :: Maybe TimeSeriesSelector
$sel:timeSeriesSelector:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe TimeSeriesSelector
timeSeriesSelector} -> Maybe TimeSeriesSelector
timeSeriesSelector) (\s :: DescribeForecastResponse
s@DescribeForecastResponse' {} Maybe TimeSeriesSelector
a -> DescribeForecastResponse
s {$sel:timeSeriesSelector:DescribeForecastResponse' :: Maybe TimeSeriesSelector
timeSeriesSelector = Maybe TimeSeriesSelector
a} :: DescribeForecastResponse)

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

instance Prelude.NFData DescribeForecastResponse where
  rnf :: DescribeForecastResponse -> ()
rnf DescribeForecastResponse' {Int
Maybe Integer
Maybe (NonEmpty Text)
Maybe Text
Maybe POSIX
Maybe TimeSeriesSelector
httpStatus :: Int
timeSeriesSelector :: Maybe TimeSeriesSelector
status :: Maybe Text
predictorArn :: Maybe Text
message :: Maybe Text
lastModificationTime :: Maybe POSIX
forecastTypes :: Maybe (NonEmpty Text)
forecastName :: Maybe Text
forecastArn :: Maybe Text
estimatedTimeRemainingInMinutes :: Maybe Integer
datasetGroupArn :: Maybe Text
creationTime :: Maybe POSIX
$sel:httpStatus:DescribeForecastResponse' :: DescribeForecastResponse -> Int
$sel:timeSeriesSelector:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe TimeSeriesSelector
$sel:status:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
$sel:predictorArn:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
$sel:message:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
$sel:lastModificationTime:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe POSIX
$sel:forecastTypes:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe (NonEmpty Text)
$sel:forecastName:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
$sel:forecastArn:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
$sel:estimatedTimeRemainingInMinutes:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Integer
$sel:datasetGroupArn:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe Text
$sel:creationTime:DescribeForecastResponse' :: DescribeForecastResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
datasetGroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
estimatedTimeRemainingInMinutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
forecastArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
forecastName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
forecastTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModificationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
predictorArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TimeSeriesSelector
timeSeriesSelector
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus