{-# 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.DescribeForecastExportJob
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes a forecast export job created using the
-- CreateForecastExportJob operation.
--
-- In addition to listing the properties provided by the user in the
-- @CreateForecastExportJob@ request, this operation lists the following
-- properties:
--
-- -   @CreationTime@
--
-- -   @LastModificationTime@
--
-- -   @Status@
--
-- -   @Message@ - If an error occurred, information about the error.
module Amazonka.Forecast.DescribeForecastExportJob
  ( -- * Creating a Request
    DescribeForecastExportJob (..),
    newDescribeForecastExportJob,

    -- * Request Lenses
    describeForecastExportJob_forecastExportJobArn,

    -- * Destructuring the Response
    DescribeForecastExportJobResponse (..),
    newDescribeForecastExportJobResponse,

    -- * Response Lenses
    describeForecastExportJobResponse_creationTime,
    describeForecastExportJobResponse_status,
    describeForecastExportJobResponse_destination,
    describeForecastExportJobResponse_forecastExportJobArn,
    describeForecastExportJobResponse_forecastArn,
    describeForecastExportJobResponse_forecastExportJobName,
    describeForecastExportJobResponse_message,
    describeForecastExportJobResponse_lastModificationTime,
    describeForecastExportJobResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeForecastExportJob' smart constructor.
data DescribeForecastExportJob = DescribeForecastExportJob'
  { -- | The Amazon Resource Name (ARN) of the forecast export job.
    DescribeForecastExportJob -> Text
forecastExportJobArn :: Prelude.Text
  }
  deriving (DescribeForecastExportJob -> DescribeForecastExportJob -> Bool
(DescribeForecastExportJob -> DescribeForecastExportJob -> Bool)
-> (DescribeForecastExportJob -> DescribeForecastExportJob -> Bool)
-> Eq DescribeForecastExportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeForecastExportJob -> DescribeForecastExportJob -> Bool
$c/= :: DescribeForecastExportJob -> DescribeForecastExportJob -> Bool
== :: DescribeForecastExportJob -> DescribeForecastExportJob -> Bool
$c== :: DescribeForecastExportJob -> DescribeForecastExportJob -> Bool
Prelude.Eq, ReadPrec [DescribeForecastExportJob]
ReadPrec DescribeForecastExportJob
Int -> ReadS DescribeForecastExportJob
ReadS [DescribeForecastExportJob]
(Int -> ReadS DescribeForecastExportJob)
-> ReadS [DescribeForecastExportJob]
-> ReadPrec DescribeForecastExportJob
-> ReadPrec [DescribeForecastExportJob]
-> Read DescribeForecastExportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeForecastExportJob]
$creadListPrec :: ReadPrec [DescribeForecastExportJob]
readPrec :: ReadPrec DescribeForecastExportJob
$creadPrec :: ReadPrec DescribeForecastExportJob
readList :: ReadS [DescribeForecastExportJob]
$creadList :: ReadS [DescribeForecastExportJob]
readsPrec :: Int -> ReadS DescribeForecastExportJob
$creadsPrec :: Int -> ReadS DescribeForecastExportJob
Prelude.Read, Int -> DescribeForecastExportJob -> ShowS
[DescribeForecastExportJob] -> ShowS
DescribeForecastExportJob -> String
(Int -> DescribeForecastExportJob -> ShowS)
-> (DescribeForecastExportJob -> String)
-> ([DescribeForecastExportJob] -> ShowS)
-> Show DescribeForecastExportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeForecastExportJob] -> ShowS
$cshowList :: [DescribeForecastExportJob] -> ShowS
show :: DescribeForecastExportJob -> String
$cshow :: DescribeForecastExportJob -> String
showsPrec :: Int -> DescribeForecastExportJob -> ShowS
$cshowsPrec :: Int -> DescribeForecastExportJob -> ShowS
Prelude.Show, (forall x.
 DescribeForecastExportJob -> Rep DescribeForecastExportJob x)
-> (forall x.
    Rep DescribeForecastExportJob x -> DescribeForecastExportJob)
-> Generic DescribeForecastExportJob
forall x.
Rep DescribeForecastExportJob x -> DescribeForecastExportJob
forall x.
DescribeForecastExportJob -> Rep DescribeForecastExportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeForecastExportJob x -> DescribeForecastExportJob
$cfrom :: forall x.
DescribeForecastExportJob -> Rep DescribeForecastExportJob x
Prelude.Generic)

-- |
-- Create a value of 'DescribeForecastExportJob' 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:
--
-- 'forecastExportJobArn', 'describeForecastExportJob_forecastExportJobArn' - The Amazon Resource Name (ARN) of the forecast export job.
newDescribeForecastExportJob ::
  -- | 'forecastExportJobArn'
  Prelude.Text ->
  DescribeForecastExportJob
newDescribeForecastExportJob :: Text -> DescribeForecastExportJob
newDescribeForecastExportJob Text
pForecastExportJobArn_ =
  DescribeForecastExportJob' :: Text -> DescribeForecastExportJob
DescribeForecastExportJob'
    { $sel:forecastExportJobArn:DescribeForecastExportJob' :: Text
forecastExportJobArn =
        Text
pForecastExportJobArn_
    }

-- | The Amazon Resource Name (ARN) of the forecast export job.
describeForecastExportJob_forecastExportJobArn :: Lens.Lens' DescribeForecastExportJob Prelude.Text
describeForecastExportJob_forecastExportJobArn :: (Text -> f Text)
-> DescribeForecastExportJob -> f DescribeForecastExportJob
describeForecastExportJob_forecastExportJobArn = (DescribeForecastExportJob -> Text)
-> (DescribeForecastExportJob -> Text -> DescribeForecastExportJob)
-> Lens
     DescribeForecastExportJob DescribeForecastExportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastExportJob' {Text
forecastExportJobArn :: Text
$sel:forecastExportJobArn:DescribeForecastExportJob' :: DescribeForecastExportJob -> Text
forecastExportJobArn} -> Text
forecastExportJobArn) (\s :: DescribeForecastExportJob
s@DescribeForecastExportJob' {} Text
a -> DescribeForecastExportJob
s {$sel:forecastExportJobArn:DescribeForecastExportJob' :: Text
forecastExportJobArn = Text
a} :: DescribeForecastExportJob)

instance Core.AWSRequest DescribeForecastExportJob where
  type
    AWSResponse DescribeForecastExportJob =
      DescribeForecastExportJobResponse
  request :: DescribeForecastExportJob -> Request DescribeForecastExportJob
request = Service
-> DescribeForecastExportJob -> Request DescribeForecastExportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeForecastExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeForecastExportJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeForecastExportJob))
-> Logger
-> Service
-> Proxy DescribeForecastExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeForecastExportJob)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe DataDestination
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> DescribeForecastExportJobResponse
DescribeForecastExportJobResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe DataDestination
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Int
 -> DescribeForecastExportJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe DataDestination
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeForecastExportJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTime")
            Either
  String
  (Maybe Text
   -> Maybe DataDestination
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeForecastExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe DataDestination
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeForecastExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe DataDestination
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeForecastExportJobResponse)
-> Either String (Maybe DataDestination)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeForecastExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DataDestination)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Destination")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeForecastExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeForecastExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ForecastExportJobArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeForecastExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeForecastExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ForecastArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeForecastExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX -> Int -> DescribeForecastExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ForecastExportJobName")
            Either
  String
  (Maybe Text
   -> Maybe POSIX -> Int -> DescribeForecastExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe POSIX -> Int -> DescribeForecastExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Message")
            Either
  String (Maybe POSIX -> Int -> DescribeForecastExportJobResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> DescribeForecastExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModificationTime")
            Either String (Int -> DescribeForecastExportJobResponse)
-> Either String Int
-> Either String DescribeForecastExportJobResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeForecastExportJob

instance Prelude.NFData DescribeForecastExportJob

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

instance Core.ToJSON DescribeForecastExportJob where
  toJSON :: DescribeForecastExportJob -> Value
toJSON DescribeForecastExportJob' {Text
forecastExportJobArn :: Text
$sel:forecastExportJobArn:DescribeForecastExportJob' :: DescribeForecastExportJob -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ForecastExportJobArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
forecastExportJobArn
              )
          ]
      )

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

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

-- | /See:/ 'newDescribeForecastExportJobResponse' smart constructor.
data DescribeForecastExportJobResponse = DescribeForecastExportJobResponse'
  { -- | When the forecast export job was created.
    DescribeForecastExportJobResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the forecast export job. 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 export job must be @ACTIVE@ before you can
    -- access the forecast in your S3 bucket.
    DescribeForecastExportJobResponse -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The path to the Amazon Simple Storage Service (Amazon S3) bucket where
    -- the forecast is exported.
    DescribeForecastExportJobResponse -> Maybe DataDestination
destination :: Prelude.Maybe DataDestination,
    -- | The ARN of the forecast export job.
    DescribeForecastExportJobResponse -> Maybe Text
forecastExportJobArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the exported forecast.
    DescribeForecastExportJobResponse -> Maybe Text
forecastArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the forecast export job.
    DescribeForecastExportJobResponse -> Maybe Text
forecastExportJobName :: Prelude.Maybe Prelude.Text,
    -- | If an error occurred, an informational message about the error.
    DescribeForecastExportJobResponse -> Maybe Text
message :: Prelude.Maybe 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.
    DescribeForecastExportJobResponse -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    DescribeForecastExportJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeForecastExportJobResponse
-> DescribeForecastExportJobResponse -> Bool
(DescribeForecastExportJobResponse
 -> DescribeForecastExportJobResponse -> Bool)
-> (DescribeForecastExportJobResponse
    -> DescribeForecastExportJobResponse -> Bool)
-> Eq DescribeForecastExportJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeForecastExportJobResponse
-> DescribeForecastExportJobResponse -> Bool
$c/= :: DescribeForecastExportJobResponse
-> DescribeForecastExportJobResponse -> Bool
== :: DescribeForecastExportJobResponse
-> DescribeForecastExportJobResponse -> Bool
$c== :: DescribeForecastExportJobResponse
-> DescribeForecastExportJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribeForecastExportJobResponse]
ReadPrec DescribeForecastExportJobResponse
Int -> ReadS DescribeForecastExportJobResponse
ReadS [DescribeForecastExportJobResponse]
(Int -> ReadS DescribeForecastExportJobResponse)
-> ReadS [DescribeForecastExportJobResponse]
-> ReadPrec DescribeForecastExportJobResponse
-> ReadPrec [DescribeForecastExportJobResponse]
-> Read DescribeForecastExportJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeForecastExportJobResponse]
$creadListPrec :: ReadPrec [DescribeForecastExportJobResponse]
readPrec :: ReadPrec DescribeForecastExportJobResponse
$creadPrec :: ReadPrec DescribeForecastExportJobResponse
readList :: ReadS [DescribeForecastExportJobResponse]
$creadList :: ReadS [DescribeForecastExportJobResponse]
readsPrec :: Int -> ReadS DescribeForecastExportJobResponse
$creadsPrec :: Int -> ReadS DescribeForecastExportJobResponse
Prelude.Read, Int -> DescribeForecastExportJobResponse -> ShowS
[DescribeForecastExportJobResponse] -> ShowS
DescribeForecastExportJobResponse -> String
(Int -> DescribeForecastExportJobResponse -> ShowS)
-> (DescribeForecastExportJobResponse -> String)
-> ([DescribeForecastExportJobResponse] -> ShowS)
-> Show DescribeForecastExportJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeForecastExportJobResponse] -> ShowS
$cshowList :: [DescribeForecastExportJobResponse] -> ShowS
show :: DescribeForecastExportJobResponse -> String
$cshow :: DescribeForecastExportJobResponse -> String
showsPrec :: Int -> DescribeForecastExportJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeForecastExportJobResponse -> ShowS
Prelude.Show, (forall x.
 DescribeForecastExportJobResponse
 -> Rep DescribeForecastExportJobResponse x)
-> (forall x.
    Rep DescribeForecastExportJobResponse x
    -> DescribeForecastExportJobResponse)
-> Generic DescribeForecastExportJobResponse
forall x.
Rep DescribeForecastExportJobResponse x
-> DescribeForecastExportJobResponse
forall x.
DescribeForecastExportJobResponse
-> Rep DescribeForecastExportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeForecastExportJobResponse x
-> DescribeForecastExportJobResponse
$cfrom :: forall x.
DescribeForecastExportJobResponse
-> Rep DescribeForecastExportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeForecastExportJobResponse' 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', 'describeForecastExportJobResponse_creationTime' - When the forecast export job was created.
--
-- 'status', 'describeForecastExportJobResponse_status' - The status of the forecast export job. 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 export job must be @ACTIVE@ before you can
-- access the forecast in your S3 bucket.
--
-- 'destination', 'describeForecastExportJobResponse_destination' - The path to the Amazon Simple Storage Service (Amazon S3) bucket where
-- the forecast is exported.
--
-- 'forecastExportJobArn', 'describeForecastExportJobResponse_forecastExportJobArn' - The ARN of the forecast export job.
--
-- 'forecastArn', 'describeForecastExportJobResponse_forecastArn' - The Amazon Resource Name (ARN) of the exported forecast.
--
-- 'forecastExportJobName', 'describeForecastExportJobResponse_forecastExportJobName' - The name of the forecast export job.
--
-- 'message', 'describeForecastExportJobResponse_message' - If an error occurred, an informational message about the error.
--
-- 'lastModificationTime', 'describeForecastExportJobResponse_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.
--
-- 'httpStatus', 'describeForecastExportJobResponse_httpStatus' - The response's http status code.
newDescribeForecastExportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeForecastExportJobResponse
newDescribeForecastExportJobResponse :: Int -> DescribeForecastExportJobResponse
newDescribeForecastExportJobResponse Int
pHttpStatus_ =
  DescribeForecastExportJobResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe DataDestination
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> DescribeForecastExportJobResponse
DescribeForecastExportJobResponse'
    { $sel:creationTime:DescribeForecastExportJobResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeForecastExportJobResponse' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:destination:DescribeForecastExportJobResponse' :: Maybe DataDestination
destination = Maybe DataDestination
forall a. Maybe a
Prelude.Nothing,
      $sel:forecastExportJobArn:DescribeForecastExportJobResponse' :: Maybe Text
forecastExportJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:forecastArn:DescribeForecastExportJobResponse' :: Maybe Text
forecastArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:forecastExportJobName:DescribeForecastExportJobResponse' :: Maybe Text
forecastExportJobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:DescribeForecastExportJobResponse' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModificationTime:DescribeForecastExportJobResponse' :: Maybe POSIX
lastModificationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeForecastExportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | When the forecast export job was created.
describeForecastExportJobResponse_creationTime :: Lens.Lens' DescribeForecastExportJobResponse (Prelude.Maybe Prelude.UTCTime)
describeForecastExportJobResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeForecastExportJobResponse
-> f DescribeForecastExportJobResponse
describeForecastExportJobResponse_creationTime = (DescribeForecastExportJobResponse -> Maybe POSIX)
-> (DescribeForecastExportJobResponse
    -> Maybe POSIX -> DescribeForecastExportJobResponse)
-> Lens
     DescribeForecastExportJobResponse
     DescribeForecastExportJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastExportJobResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeForecastExportJobResponse' :: DescribeForecastExportJobResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeForecastExportJobResponse
s@DescribeForecastExportJobResponse' {} Maybe POSIX
a -> DescribeForecastExportJobResponse
s {$sel:creationTime:DescribeForecastExportJobResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeForecastExportJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeForecastExportJobResponse
 -> f DescribeForecastExportJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeForecastExportJobResponse
-> f DescribeForecastExportJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The status of the forecast export job. 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 export job must be @ACTIVE@ before you can
-- access the forecast in your S3 bucket.
describeForecastExportJobResponse_status :: Lens.Lens' DescribeForecastExportJobResponse (Prelude.Maybe Prelude.Text)
describeForecastExportJobResponse_status :: (Maybe Text -> f (Maybe Text))
-> DescribeForecastExportJobResponse
-> f DescribeForecastExportJobResponse
describeForecastExportJobResponse_status = (DescribeForecastExportJobResponse -> Maybe Text)
-> (DescribeForecastExportJobResponse
    -> Maybe Text -> DescribeForecastExportJobResponse)
-> Lens
     DescribeForecastExportJobResponse
     DescribeForecastExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastExportJobResponse' {Maybe Text
status :: Maybe Text
$sel:status:DescribeForecastExportJobResponse' :: DescribeForecastExportJobResponse -> Maybe Text
status} -> Maybe Text
status) (\s :: DescribeForecastExportJobResponse
s@DescribeForecastExportJobResponse' {} Maybe Text
a -> DescribeForecastExportJobResponse
s {$sel:status:DescribeForecastExportJobResponse' :: Maybe Text
status = Maybe Text
a} :: DescribeForecastExportJobResponse)

-- | The path to the Amazon Simple Storage Service (Amazon S3) bucket where
-- the forecast is exported.
describeForecastExportJobResponse_destination :: Lens.Lens' DescribeForecastExportJobResponse (Prelude.Maybe DataDestination)
describeForecastExportJobResponse_destination :: (Maybe DataDestination -> f (Maybe DataDestination))
-> DescribeForecastExportJobResponse
-> f DescribeForecastExportJobResponse
describeForecastExportJobResponse_destination = (DescribeForecastExportJobResponse -> Maybe DataDestination)
-> (DescribeForecastExportJobResponse
    -> Maybe DataDestination -> DescribeForecastExportJobResponse)
-> Lens
     DescribeForecastExportJobResponse
     DescribeForecastExportJobResponse
     (Maybe DataDestination)
     (Maybe DataDestination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastExportJobResponse' {Maybe DataDestination
destination :: Maybe DataDestination
$sel:destination:DescribeForecastExportJobResponse' :: DescribeForecastExportJobResponse -> Maybe DataDestination
destination} -> Maybe DataDestination
destination) (\s :: DescribeForecastExportJobResponse
s@DescribeForecastExportJobResponse' {} Maybe DataDestination
a -> DescribeForecastExportJobResponse
s {$sel:destination:DescribeForecastExportJobResponse' :: Maybe DataDestination
destination = Maybe DataDestination
a} :: DescribeForecastExportJobResponse)

-- | The ARN of the forecast export job.
describeForecastExportJobResponse_forecastExportJobArn :: Lens.Lens' DescribeForecastExportJobResponse (Prelude.Maybe Prelude.Text)
describeForecastExportJobResponse_forecastExportJobArn :: (Maybe Text -> f (Maybe Text))
-> DescribeForecastExportJobResponse
-> f DescribeForecastExportJobResponse
describeForecastExportJobResponse_forecastExportJobArn = (DescribeForecastExportJobResponse -> Maybe Text)
-> (DescribeForecastExportJobResponse
    -> Maybe Text -> DescribeForecastExportJobResponse)
-> Lens
     DescribeForecastExportJobResponse
     DescribeForecastExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastExportJobResponse' {Maybe Text
forecastExportJobArn :: Maybe Text
$sel:forecastExportJobArn:DescribeForecastExportJobResponse' :: DescribeForecastExportJobResponse -> Maybe Text
forecastExportJobArn} -> Maybe Text
forecastExportJobArn) (\s :: DescribeForecastExportJobResponse
s@DescribeForecastExportJobResponse' {} Maybe Text
a -> DescribeForecastExportJobResponse
s {$sel:forecastExportJobArn:DescribeForecastExportJobResponse' :: Maybe Text
forecastExportJobArn = Maybe Text
a} :: DescribeForecastExportJobResponse)

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

-- | The name of the forecast export job.
describeForecastExportJobResponse_forecastExportJobName :: Lens.Lens' DescribeForecastExportJobResponse (Prelude.Maybe Prelude.Text)
describeForecastExportJobResponse_forecastExportJobName :: (Maybe Text -> f (Maybe Text))
-> DescribeForecastExportJobResponse
-> f DescribeForecastExportJobResponse
describeForecastExportJobResponse_forecastExportJobName = (DescribeForecastExportJobResponse -> Maybe Text)
-> (DescribeForecastExportJobResponse
    -> Maybe Text -> DescribeForecastExportJobResponse)
-> Lens
     DescribeForecastExportJobResponse
     DescribeForecastExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastExportJobResponse' {Maybe Text
forecastExportJobName :: Maybe Text
$sel:forecastExportJobName:DescribeForecastExportJobResponse' :: DescribeForecastExportJobResponse -> Maybe Text
forecastExportJobName} -> Maybe Text
forecastExportJobName) (\s :: DescribeForecastExportJobResponse
s@DescribeForecastExportJobResponse' {} Maybe Text
a -> DescribeForecastExportJobResponse
s {$sel:forecastExportJobName:DescribeForecastExportJobResponse' :: Maybe Text
forecastExportJobName = Maybe Text
a} :: DescribeForecastExportJobResponse)

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

-- | 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.
describeForecastExportJobResponse_lastModificationTime :: Lens.Lens' DescribeForecastExportJobResponse (Prelude.Maybe Prelude.UTCTime)
describeForecastExportJobResponse_lastModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeForecastExportJobResponse
-> f DescribeForecastExportJobResponse
describeForecastExportJobResponse_lastModificationTime = (DescribeForecastExportJobResponse -> Maybe POSIX)
-> (DescribeForecastExportJobResponse
    -> Maybe POSIX -> DescribeForecastExportJobResponse)
-> Lens
     DescribeForecastExportJobResponse
     DescribeForecastExportJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeForecastExportJobResponse' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:DescribeForecastExportJobResponse' :: DescribeForecastExportJobResponse -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: DescribeForecastExportJobResponse
s@DescribeForecastExportJobResponse' {} Maybe POSIX
a -> DescribeForecastExportJobResponse
s {$sel:lastModificationTime:DescribeForecastExportJobResponse' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: DescribeForecastExportJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeForecastExportJobResponse
 -> f DescribeForecastExportJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeForecastExportJobResponse
-> f DescribeForecastExportJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

instance
  Prelude.NFData
    DescribeForecastExportJobResponse