{-# 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.DescribePredictorBacktestExportJob
-- 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 predictor backtest export job created using the
-- CreatePredictorBacktestExportJob operation.
--
-- In addition to listing the properties provided by the user in the
-- @CreatePredictorBacktestExportJob@ request, this operation lists the
-- following properties:
--
-- -   @CreationTime@
--
-- -   @LastModificationTime@
--
-- -   @Status@
--
-- -   @Message@ (if an error occurred)
module Amazonka.Forecast.DescribePredictorBacktestExportJob
  ( -- * Creating a Request
    DescribePredictorBacktestExportJob (..),
    newDescribePredictorBacktestExportJob,

    -- * Request Lenses
    describePredictorBacktestExportJob_predictorBacktestExportJobArn,

    -- * Destructuring the Response
    DescribePredictorBacktestExportJobResponse (..),
    newDescribePredictorBacktestExportJobResponse,

    -- * Response Lenses
    describePredictorBacktestExportJobResponse_creationTime,
    describePredictorBacktestExportJobResponse_status,
    describePredictorBacktestExportJobResponse_destination,
    describePredictorBacktestExportJobResponse_predictorArn,
    describePredictorBacktestExportJobResponse_predictorBacktestExportJobArn,
    describePredictorBacktestExportJobResponse_message,
    describePredictorBacktestExportJobResponse_predictorBacktestExportJobName,
    describePredictorBacktestExportJobResponse_lastModificationTime,
    describePredictorBacktestExportJobResponse_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:/ 'newDescribePredictorBacktestExportJob' smart constructor.
data DescribePredictorBacktestExportJob = DescribePredictorBacktestExportJob'
  { -- | The Amazon Resource Name (ARN) of the predictor backtest export job.
    DescribePredictorBacktestExportJob -> Text
predictorBacktestExportJobArn :: Prelude.Text
  }
  deriving (DescribePredictorBacktestExportJob
-> DescribePredictorBacktestExportJob -> Bool
(DescribePredictorBacktestExportJob
 -> DescribePredictorBacktestExportJob -> Bool)
-> (DescribePredictorBacktestExportJob
    -> DescribePredictorBacktestExportJob -> Bool)
-> Eq DescribePredictorBacktestExportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePredictorBacktestExportJob
-> DescribePredictorBacktestExportJob -> Bool
$c/= :: DescribePredictorBacktestExportJob
-> DescribePredictorBacktestExportJob -> Bool
== :: DescribePredictorBacktestExportJob
-> DescribePredictorBacktestExportJob -> Bool
$c== :: DescribePredictorBacktestExportJob
-> DescribePredictorBacktestExportJob -> Bool
Prelude.Eq, ReadPrec [DescribePredictorBacktestExportJob]
ReadPrec DescribePredictorBacktestExportJob
Int -> ReadS DescribePredictorBacktestExportJob
ReadS [DescribePredictorBacktestExportJob]
(Int -> ReadS DescribePredictorBacktestExportJob)
-> ReadS [DescribePredictorBacktestExportJob]
-> ReadPrec DescribePredictorBacktestExportJob
-> ReadPrec [DescribePredictorBacktestExportJob]
-> Read DescribePredictorBacktestExportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePredictorBacktestExportJob]
$creadListPrec :: ReadPrec [DescribePredictorBacktestExportJob]
readPrec :: ReadPrec DescribePredictorBacktestExportJob
$creadPrec :: ReadPrec DescribePredictorBacktestExportJob
readList :: ReadS [DescribePredictorBacktestExportJob]
$creadList :: ReadS [DescribePredictorBacktestExportJob]
readsPrec :: Int -> ReadS DescribePredictorBacktestExportJob
$creadsPrec :: Int -> ReadS DescribePredictorBacktestExportJob
Prelude.Read, Int -> DescribePredictorBacktestExportJob -> ShowS
[DescribePredictorBacktestExportJob] -> ShowS
DescribePredictorBacktestExportJob -> String
(Int -> DescribePredictorBacktestExportJob -> ShowS)
-> (DescribePredictorBacktestExportJob -> String)
-> ([DescribePredictorBacktestExportJob] -> ShowS)
-> Show DescribePredictorBacktestExportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePredictorBacktestExportJob] -> ShowS
$cshowList :: [DescribePredictorBacktestExportJob] -> ShowS
show :: DescribePredictorBacktestExportJob -> String
$cshow :: DescribePredictorBacktestExportJob -> String
showsPrec :: Int -> DescribePredictorBacktestExportJob -> ShowS
$cshowsPrec :: Int -> DescribePredictorBacktestExportJob -> ShowS
Prelude.Show, (forall x.
 DescribePredictorBacktestExportJob
 -> Rep DescribePredictorBacktestExportJob x)
-> (forall x.
    Rep DescribePredictorBacktestExportJob x
    -> DescribePredictorBacktestExportJob)
-> Generic DescribePredictorBacktestExportJob
forall x.
Rep DescribePredictorBacktestExportJob x
-> DescribePredictorBacktestExportJob
forall x.
DescribePredictorBacktestExportJob
-> Rep DescribePredictorBacktestExportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePredictorBacktestExportJob x
-> DescribePredictorBacktestExportJob
$cfrom :: forall x.
DescribePredictorBacktestExportJob
-> Rep DescribePredictorBacktestExportJob x
Prelude.Generic)

-- |
-- Create a value of 'DescribePredictorBacktestExportJob' 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:
--
-- 'predictorBacktestExportJobArn', 'describePredictorBacktestExportJob_predictorBacktestExportJobArn' - The Amazon Resource Name (ARN) of the predictor backtest export job.
newDescribePredictorBacktestExportJob ::
  -- | 'predictorBacktestExportJobArn'
  Prelude.Text ->
  DescribePredictorBacktestExportJob
newDescribePredictorBacktestExportJob :: Text -> DescribePredictorBacktestExportJob
newDescribePredictorBacktestExportJob
  Text
pPredictorBacktestExportJobArn_ =
    DescribePredictorBacktestExportJob' :: Text -> DescribePredictorBacktestExportJob
DescribePredictorBacktestExportJob'
      { $sel:predictorBacktestExportJobArn:DescribePredictorBacktestExportJob' :: Text
predictorBacktestExportJobArn =
          Text
pPredictorBacktestExportJobArn_
      }

-- | The Amazon Resource Name (ARN) of the predictor backtest export job.
describePredictorBacktestExportJob_predictorBacktestExportJobArn :: Lens.Lens' DescribePredictorBacktestExportJob Prelude.Text
describePredictorBacktestExportJob_predictorBacktestExportJobArn :: (Text -> f Text)
-> DescribePredictorBacktestExportJob
-> f DescribePredictorBacktestExportJob
describePredictorBacktestExportJob_predictorBacktestExportJobArn = (DescribePredictorBacktestExportJob -> Text)
-> (DescribePredictorBacktestExportJob
    -> Text -> DescribePredictorBacktestExportJob)
-> Lens
     DescribePredictorBacktestExportJob
     DescribePredictorBacktestExportJob
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJob' {Text
predictorBacktestExportJobArn :: Text
$sel:predictorBacktestExportJobArn:DescribePredictorBacktestExportJob' :: DescribePredictorBacktestExportJob -> Text
predictorBacktestExportJobArn} -> Text
predictorBacktestExportJobArn) (\s :: DescribePredictorBacktestExportJob
s@DescribePredictorBacktestExportJob' {} Text
a -> DescribePredictorBacktestExportJob
s {$sel:predictorBacktestExportJobArn:DescribePredictorBacktestExportJob' :: Text
predictorBacktestExportJobArn = Text
a} :: DescribePredictorBacktestExportJob)

instance
  Core.AWSRequest
    DescribePredictorBacktestExportJob
  where
  type
    AWSResponse DescribePredictorBacktestExportJob =
      DescribePredictorBacktestExportJobResponse
  request :: DescribePredictorBacktestExportJob
-> Request DescribePredictorBacktestExportJob
request = Service
-> DescribePredictorBacktestExportJob
-> Request DescribePredictorBacktestExportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribePredictorBacktestExportJob
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribePredictorBacktestExportJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribePredictorBacktestExportJob))
-> Logger
-> Service
-> Proxy DescribePredictorBacktestExportJob
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribePredictorBacktestExportJob)))
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
-> DescribePredictorBacktestExportJobResponse
DescribePredictorBacktestExportJobResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe DataDestination
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Int
 -> DescribePredictorBacktestExportJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe DataDestination
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribePredictorBacktestExportJobResponse)
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
   -> DescribePredictorBacktestExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe DataDestination
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribePredictorBacktestExportJobResponse)
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
   -> DescribePredictorBacktestExportJobResponse)
-> Either String (Maybe DataDestination)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribePredictorBacktestExportJobResponse)
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
   -> DescribePredictorBacktestExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribePredictorBacktestExportJobResponse)
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
"PredictorArn")
              Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribePredictorBacktestExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribePredictorBacktestExportJobResponse)
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
"PredictorBacktestExportJobArn")
              Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribePredictorBacktestExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribePredictorBacktestExportJobResponse)
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 Text
   -> Maybe POSIX
   -> Int
   -> DescribePredictorBacktestExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX -> Int -> DescribePredictorBacktestExportJobResponse)
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
"PredictorBacktestExportJobName")
              Either
  String
  (Maybe POSIX -> Int -> DescribePredictorBacktestExportJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Int -> DescribePredictorBacktestExportJobResponse)
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 -> DescribePredictorBacktestExportJobResponse)
-> Either String Int
-> Either String DescribePredictorBacktestExportJobResponse
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
    DescribePredictorBacktestExportJob

instance
  Prelude.NFData
    DescribePredictorBacktestExportJob

instance
  Core.ToHeaders
    DescribePredictorBacktestExportJob
  where
  toHeaders :: DescribePredictorBacktestExportJob -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribePredictorBacktestExportJob -> 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.DescribePredictorBacktestExportJob" ::
                          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
    DescribePredictorBacktestExportJob
  where
  toJSON :: DescribePredictorBacktestExportJob -> Value
toJSON DescribePredictorBacktestExportJob' {Text
predictorBacktestExportJobArn :: Text
$sel:predictorBacktestExportJobArn:DescribePredictorBacktestExportJob' :: DescribePredictorBacktestExportJob -> 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
"PredictorBacktestExportJobArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
predictorBacktestExportJobArn
              )
          ]
      )

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

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

-- | /See:/ 'newDescribePredictorBacktestExportJobResponse' smart constructor.
data DescribePredictorBacktestExportJobResponse = DescribePredictorBacktestExportJobResponse'
  { -- | When the predictor backtest export job was created.
    DescribePredictorBacktestExportJobResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the predictor backtest export job. States include:
    --
    -- -   @ACTIVE@
    --
    -- -   @CREATE_PENDING@, @CREATE_IN_PROGRESS@, @CREATE_FAILED@
    --
    -- -   @CREATE_STOPPING@, @CREATE_STOPPED@
    --
    -- -   @DELETE_PENDING@, @DELETE_IN_PROGRESS@, @DELETE_FAILED@
    DescribePredictorBacktestExportJobResponse -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    DescribePredictorBacktestExportJobResponse -> Maybe DataDestination
destination :: Prelude.Maybe DataDestination,
    -- | The Amazon Resource Name (ARN) of the predictor.
    DescribePredictorBacktestExportJobResponse -> Maybe Text
predictorArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the predictor backtest export job.
    DescribePredictorBacktestExportJobResponse -> Maybe Text
predictorBacktestExportJobArn :: Prelude.Maybe Prelude.Text,
    -- | Information about any errors that may have occurred during the backtest
    -- export.
    DescribePredictorBacktestExportJobResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The name of the predictor backtest export job.
    DescribePredictorBacktestExportJobResponse -> Maybe Text
predictorBacktestExportJobName :: 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.
    DescribePredictorBacktestExportJobResponse -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    DescribePredictorBacktestExportJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribePredictorBacktestExportJobResponse
-> DescribePredictorBacktestExportJobResponse -> Bool
(DescribePredictorBacktestExportJobResponse
 -> DescribePredictorBacktestExportJobResponse -> Bool)
-> (DescribePredictorBacktestExportJobResponse
    -> DescribePredictorBacktestExportJobResponse -> Bool)
-> Eq DescribePredictorBacktestExportJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePredictorBacktestExportJobResponse
-> DescribePredictorBacktestExportJobResponse -> Bool
$c/= :: DescribePredictorBacktestExportJobResponse
-> DescribePredictorBacktestExportJobResponse -> Bool
== :: DescribePredictorBacktestExportJobResponse
-> DescribePredictorBacktestExportJobResponse -> Bool
$c== :: DescribePredictorBacktestExportJobResponse
-> DescribePredictorBacktestExportJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribePredictorBacktestExportJobResponse]
ReadPrec DescribePredictorBacktestExportJobResponse
Int -> ReadS DescribePredictorBacktestExportJobResponse
ReadS [DescribePredictorBacktestExportJobResponse]
(Int -> ReadS DescribePredictorBacktestExportJobResponse)
-> ReadS [DescribePredictorBacktestExportJobResponse]
-> ReadPrec DescribePredictorBacktestExportJobResponse
-> ReadPrec [DescribePredictorBacktestExportJobResponse]
-> Read DescribePredictorBacktestExportJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePredictorBacktestExportJobResponse]
$creadListPrec :: ReadPrec [DescribePredictorBacktestExportJobResponse]
readPrec :: ReadPrec DescribePredictorBacktestExportJobResponse
$creadPrec :: ReadPrec DescribePredictorBacktestExportJobResponse
readList :: ReadS [DescribePredictorBacktestExportJobResponse]
$creadList :: ReadS [DescribePredictorBacktestExportJobResponse]
readsPrec :: Int -> ReadS DescribePredictorBacktestExportJobResponse
$creadsPrec :: Int -> ReadS DescribePredictorBacktestExportJobResponse
Prelude.Read, Int -> DescribePredictorBacktestExportJobResponse -> ShowS
[DescribePredictorBacktestExportJobResponse] -> ShowS
DescribePredictorBacktestExportJobResponse -> String
(Int -> DescribePredictorBacktestExportJobResponse -> ShowS)
-> (DescribePredictorBacktestExportJobResponse -> String)
-> ([DescribePredictorBacktestExportJobResponse] -> ShowS)
-> Show DescribePredictorBacktestExportJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePredictorBacktestExportJobResponse] -> ShowS
$cshowList :: [DescribePredictorBacktestExportJobResponse] -> ShowS
show :: DescribePredictorBacktestExportJobResponse -> String
$cshow :: DescribePredictorBacktestExportJobResponse -> String
showsPrec :: Int -> DescribePredictorBacktestExportJobResponse -> ShowS
$cshowsPrec :: Int -> DescribePredictorBacktestExportJobResponse -> ShowS
Prelude.Show, (forall x.
 DescribePredictorBacktestExportJobResponse
 -> Rep DescribePredictorBacktestExportJobResponse x)
-> (forall x.
    Rep DescribePredictorBacktestExportJobResponse x
    -> DescribePredictorBacktestExportJobResponse)
-> Generic DescribePredictorBacktestExportJobResponse
forall x.
Rep DescribePredictorBacktestExportJobResponse x
-> DescribePredictorBacktestExportJobResponse
forall x.
DescribePredictorBacktestExportJobResponse
-> Rep DescribePredictorBacktestExportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePredictorBacktestExportJobResponse x
-> DescribePredictorBacktestExportJobResponse
$cfrom :: forall x.
DescribePredictorBacktestExportJobResponse
-> Rep DescribePredictorBacktestExportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribePredictorBacktestExportJobResponse' 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', 'describePredictorBacktestExportJobResponse_creationTime' - When the predictor backtest export job was created.
--
-- 'status', 'describePredictorBacktestExportJobResponse_status' - The status of the predictor backtest export job. States include:
--
-- -   @ACTIVE@
--
-- -   @CREATE_PENDING@, @CREATE_IN_PROGRESS@, @CREATE_FAILED@
--
-- -   @CREATE_STOPPING@, @CREATE_STOPPED@
--
-- -   @DELETE_PENDING@, @DELETE_IN_PROGRESS@, @DELETE_FAILED@
--
-- 'destination', 'describePredictorBacktestExportJobResponse_destination' - Undocumented member.
--
-- 'predictorArn', 'describePredictorBacktestExportJobResponse_predictorArn' - The Amazon Resource Name (ARN) of the predictor.
--
-- 'predictorBacktestExportJobArn', 'describePredictorBacktestExportJobResponse_predictorBacktestExportJobArn' - The Amazon Resource Name (ARN) of the predictor backtest export job.
--
-- 'message', 'describePredictorBacktestExportJobResponse_message' - Information about any errors that may have occurred during the backtest
-- export.
--
-- 'predictorBacktestExportJobName', 'describePredictorBacktestExportJobResponse_predictorBacktestExportJobName' - The name of the predictor backtest export job.
--
-- 'lastModificationTime', 'describePredictorBacktestExportJobResponse_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', 'describePredictorBacktestExportJobResponse_httpStatus' - The response's http status code.
newDescribePredictorBacktestExportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribePredictorBacktestExportJobResponse
newDescribePredictorBacktestExportJobResponse :: Int -> DescribePredictorBacktestExportJobResponse
newDescribePredictorBacktestExportJobResponse
  Int
pHttpStatus_ =
    DescribePredictorBacktestExportJobResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe DataDestination
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> DescribePredictorBacktestExportJobResponse
DescribePredictorBacktestExportJobResponse'
      { $sel:creationTime:DescribePredictorBacktestExportJobResponse' :: Maybe POSIX
creationTime =
          Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:status:DescribePredictorBacktestExportJobResponse' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:destination:DescribePredictorBacktestExportJobResponse' :: Maybe DataDestination
destination = Maybe DataDestination
forall a. Maybe a
Prelude.Nothing,
        $sel:predictorArn:DescribePredictorBacktestExportJobResponse' :: Maybe Text
predictorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:predictorBacktestExportJobArn:DescribePredictorBacktestExportJobResponse' :: Maybe Text
predictorBacktestExportJobArn =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:message:DescribePredictorBacktestExportJobResponse' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:predictorBacktestExportJobName:DescribePredictorBacktestExportJobResponse' :: Maybe Text
predictorBacktestExportJobName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:lastModificationTime:DescribePredictorBacktestExportJobResponse' :: Maybe POSIX
lastModificationTime =
          Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribePredictorBacktestExportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | When the predictor backtest export job was created.
describePredictorBacktestExportJobResponse_creationTime :: Lens.Lens' DescribePredictorBacktestExportJobResponse (Prelude.Maybe Prelude.UTCTime)
describePredictorBacktestExportJobResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
describePredictorBacktestExportJobResponse_creationTime = (DescribePredictorBacktestExportJobResponse -> Maybe POSIX)
-> (DescribePredictorBacktestExportJobResponse
    -> Maybe POSIX -> DescribePredictorBacktestExportJobResponse)
-> Lens
     DescribePredictorBacktestExportJobResponse
     DescribePredictorBacktestExportJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJobResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribePredictorBacktestExportJobResponse' :: DescribePredictorBacktestExportJobResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribePredictorBacktestExportJobResponse
s@DescribePredictorBacktestExportJobResponse' {} Maybe POSIX
a -> DescribePredictorBacktestExportJobResponse
s {$sel:creationTime:DescribePredictorBacktestExportJobResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribePredictorBacktestExportJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribePredictorBacktestExportJobResponse
 -> f DescribePredictorBacktestExportJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
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 predictor backtest export job. States include:
--
-- -   @ACTIVE@
--
-- -   @CREATE_PENDING@, @CREATE_IN_PROGRESS@, @CREATE_FAILED@
--
-- -   @CREATE_STOPPING@, @CREATE_STOPPED@
--
-- -   @DELETE_PENDING@, @DELETE_IN_PROGRESS@, @DELETE_FAILED@
describePredictorBacktestExportJobResponse_status :: Lens.Lens' DescribePredictorBacktestExportJobResponse (Prelude.Maybe Prelude.Text)
describePredictorBacktestExportJobResponse_status :: (Maybe Text -> f (Maybe Text))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
describePredictorBacktestExportJobResponse_status = (DescribePredictorBacktestExportJobResponse -> Maybe Text)
-> (DescribePredictorBacktestExportJobResponse
    -> Maybe Text -> DescribePredictorBacktestExportJobResponse)
-> Lens
     DescribePredictorBacktestExportJobResponse
     DescribePredictorBacktestExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJobResponse' {Maybe Text
status :: Maybe Text
$sel:status:DescribePredictorBacktestExportJobResponse' :: DescribePredictorBacktestExportJobResponse -> Maybe Text
status} -> Maybe Text
status) (\s :: DescribePredictorBacktestExportJobResponse
s@DescribePredictorBacktestExportJobResponse' {} Maybe Text
a -> DescribePredictorBacktestExportJobResponse
s {$sel:status:DescribePredictorBacktestExportJobResponse' :: Maybe Text
status = Maybe Text
a} :: DescribePredictorBacktestExportJobResponse)

-- | Undocumented member.
describePredictorBacktestExportJobResponse_destination :: Lens.Lens' DescribePredictorBacktestExportJobResponse (Prelude.Maybe DataDestination)
describePredictorBacktestExportJobResponse_destination :: (Maybe DataDestination -> f (Maybe DataDestination))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
describePredictorBacktestExportJobResponse_destination = (DescribePredictorBacktestExportJobResponse
 -> Maybe DataDestination)
-> (DescribePredictorBacktestExportJobResponse
    -> Maybe DataDestination
    -> DescribePredictorBacktestExportJobResponse)
-> Lens
     DescribePredictorBacktestExportJobResponse
     DescribePredictorBacktestExportJobResponse
     (Maybe DataDestination)
     (Maybe DataDestination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJobResponse' {Maybe DataDestination
destination :: Maybe DataDestination
$sel:destination:DescribePredictorBacktestExportJobResponse' :: DescribePredictorBacktestExportJobResponse -> Maybe DataDestination
destination} -> Maybe DataDestination
destination) (\s :: DescribePredictorBacktestExportJobResponse
s@DescribePredictorBacktestExportJobResponse' {} Maybe DataDestination
a -> DescribePredictorBacktestExportJobResponse
s {$sel:destination:DescribePredictorBacktestExportJobResponse' :: Maybe DataDestination
destination = Maybe DataDestination
a} :: DescribePredictorBacktestExportJobResponse)

-- | The Amazon Resource Name (ARN) of the predictor.
describePredictorBacktestExportJobResponse_predictorArn :: Lens.Lens' DescribePredictorBacktestExportJobResponse (Prelude.Maybe Prelude.Text)
describePredictorBacktestExportJobResponse_predictorArn :: (Maybe Text -> f (Maybe Text))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
describePredictorBacktestExportJobResponse_predictorArn = (DescribePredictorBacktestExportJobResponse -> Maybe Text)
-> (DescribePredictorBacktestExportJobResponse
    -> Maybe Text -> DescribePredictorBacktestExportJobResponse)
-> Lens
     DescribePredictorBacktestExportJobResponse
     DescribePredictorBacktestExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJobResponse' {Maybe Text
predictorArn :: Maybe Text
$sel:predictorArn:DescribePredictorBacktestExportJobResponse' :: DescribePredictorBacktestExportJobResponse -> Maybe Text
predictorArn} -> Maybe Text
predictorArn) (\s :: DescribePredictorBacktestExportJobResponse
s@DescribePredictorBacktestExportJobResponse' {} Maybe Text
a -> DescribePredictorBacktestExportJobResponse
s {$sel:predictorArn:DescribePredictorBacktestExportJobResponse' :: Maybe Text
predictorArn = Maybe Text
a} :: DescribePredictorBacktestExportJobResponse)

-- | The Amazon Resource Name (ARN) of the predictor backtest export job.
describePredictorBacktestExportJobResponse_predictorBacktestExportJobArn :: Lens.Lens' DescribePredictorBacktestExportJobResponse (Prelude.Maybe Prelude.Text)
describePredictorBacktestExportJobResponse_predictorBacktestExportJobArn :: (Maybe Text -> f (Maybe Text))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
describePredictorBacktestExportJobResponse_predictorBacktestExportJobArn = (DescribePredictorBacktestExportJobResponse -> Maybe Text)
-> (DescribePredictorBacktestExportJobResponse
    -> Maybe Text -> DescribePredictorBacktestExportJobResponse)
-> Lens
     DescribePredictorBacktestExportJobResponse
     DescribePredictorBacktestExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJobResponse' {Maybe Text
predictorBacktestExportJobArn :: Maybe Text
$sel:predictorBacktestExportJobArn:DescribePredictorBacktestExportJobResponse' :: DescribePredictorBacktestExportJobResponse -> Maybe Text
predictorBacktestExportJobArn} -> Maybe Text
predictorBacktestExportJobArn) (\s :: DescribePredictorBacktestExportJobResponse
s@DescribePredictorBacktestExportJobResponse' {} Maybe Text
a -> DescribePredictorBacktestExportJobResponse
s {$sel:predictorBacktestExportJobArn:DescribePredictorBacktestExportJobResponse' :: Maybe Text
predictorBacktestExportJobArn = Maybe Text
a} :: DescribePredictorBacktestExportJobResponse)

-- | Information about any errors that may have occurred during the backtest
-- export.
describePredictorBacktestExportJobResponse_message :: Lens.Lens' DescribePredictorBacktestExportJobResponse (Prelude.Maybe Prelude.Text)
describePredictorBacktestExportJobResponse_message :: (Maybe Text -> f (Maybe Text))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
describePredictorBacktestExportJobResponse_message = (DescribePredictorBacktestExportJobResponse -> Maybe Text)
-> (DescribePredictorBacktestExportJobResponse
    -> Maybe Text -> DescribePredictorBacktestExportJobResponse)
-> Lens
     DescribePredictorBacktestExportJobResponse
     DescribePredictorBacktestExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJobResponse' {Maybe Text
message :: Maybe Text
$sel:message:DescribePredictorBacktestExportJobResponse' :: DescribePredictorBacktestExportJobResponse -> Maybe Text
message} -> Maybe Text
message) (\s :: DescribePredictorBacktestExportJobResponse
s@DescribePredictorBacktestExportJobResponse' {} Maybe Text
a -> DescribePredictorBacktestExportJobResponse
s {$sel:message:DescribePredictorBacktestExportJobResponse' :: Maybe Text
message = Maybe Text
a} :: DescribePredictorBacktestExportJobResponse)

-- | The name of the predictor backtest export job.
describePredictorBacktestExportJobResponse_predictorBacktestExportJobName :: Lens.Lens' DescribePredictorBacktestExportJobResponse (Prelude.Maybe Prelude.Text)
describePredictorBacktestExportJobResponse_predictorBacktestExportJobName :: (Maybe Text -> f (Maybe Text))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
describePredictorBacktestExportJobResponse_predictorBacktestExportJobName = (DescribePredictorBacktestExportJobResponse -> Maybe Text)
-> (DescribePredictorBacktestExportJobResponse
    -> Maybe Text -> DescribePredictorBacktestExportJobResponse)
-> Lens
     DescribePredictorBacktestExportJobResponse
     DescribePredictorBacktestExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJobResponse' {Maybe Text
predictorBacktestExportJobName :: Maybe Text
$sel:predictorBacktestExportJobName:DescribePredictorBacktestExportJobResponse' :: DescribePredictorBacktestExportJobResponse -> Maybe Text
predictorBacktestExportJobName} -> Maybe Text
predictorBacktestExportJobName) (\s :: DescribePredictorBacktestExportJobResponse
s@DescribePredictorBacktestExportJobResponse' {} Maybe Text
a -> DescribePredictorBacktestExportJobResponse
s {$sel:predictorBacktestExportJobName:DescribePredictorBacktestExportJobResponse' :: Maybe Text
predictorBacktestExportJobName = Maybe Text
a} :: DescribePredictorBacktestExportJobResponse)

-- | 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.
describePredictorBacktestExportJobResponse_lastModificationTime :: Lens.Lens' DescribePredictorBacktestExportJobResponse (Prelude.Maybe Prelude.UTCTime)
describePredictorBacktestExportJobResponse_lastModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
describePredictorBacktestExportJobResponse_lastModificationTime = (DescribePredictorBacktestExportJobResponse -> Maybe POSIX)
-> (DescribePredictorBacktestExportJobResponse
    -> Maybe POSIX -> DescribePredictorBacktestExportJobResponse)
-> Lens
     DescribePredictorBacktestExportJobResponse
     DescribePredictorBacktestExportJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJobResponse' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:DescribePredictorBacktestExportJobResponse' :: DescribePredictorBacktestExportJobResponse -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: DescribePredictorBacktestExportJobResponse
s@DescribePredictorBacktestExportJobResponse' {} Maybe POSIX
a -> DescribePredictorBacktestExportJobResponse
s {$sel:lastModificationTime:DescribePredictorBacktestExportJobResponse' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: DescribePredictorBacktestExportJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribePredictorBacktestExportJobResponse
 -> f DescribePredictorBacktestExportJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
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.
describePredictorBacktestExportJobResponse_httpStatus :: Lens.Lens' DescribePredictorBacktestExportJobResponse Prelude.Int
describePredictorBacktestExportJobResponse_httpStatus :: (Int -> f Int)
-> DescribePredictorBacktestExportJobResponse
-> f DescribePredictorBacktestExportJobResponse
describePredictorBacktestExportJobResponse_httpStatus = (DescribePredictorBacktestExportJobResponse -> Int)
-> (DescribePredictorBacktestExportJobResponse
    -> Int -> DescribePredictorBacktestExportJobResponse)
-> Lens
     DescribePredictorBacktestExportJobResponse
     DescribePredictorBacktestExportJobResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePredictorBacktestExportJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribePredictorBacktestExportJobResponse' :: DescribePredictorBacktestExportJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribePredictorBacktestExportJobResponse
s@DescribePredictorBacktestExportJobResponse' {} Int
a -> DescribePredictorBacktestExportJobResponse
s {$sel:httpStatus:DescribePredictorBacktestExportJobResponse' :: Int
httpStatus = Int
a} :: DescribePredictorBacktestExportJobResponse)

instance
  Prelude.NFData
    DescribePredictorBacktestExportJobResponse