{-# 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.CreatePredictorBacktestExportJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Exports backtest forecasts and accuracy metrics generated by the
-- CreateAutoPredictor or CreatePredictor operations. Two folders
-- containing CSV or Parquet files are exported to your specified S3
-- bucket.
--
-- The export file names will match the following conventions:
--
-- @\<ExportJobName>_\<ExportTimestamp>_\<PartNumber>.csv@
--
-- The \<ExportTimestamp> component is in Java SimpleDate format
-- (yyyy-MM-ddTHH-mm-ssZ).
--
-- You must specify a DataDestination object that includes an Amazon S3
-- bucket and an AWS Identity and Access Management (IAM) role that Amazon
-- Forecast can assume to access the Amazon S3 bucket. For more
-- information, see aws-forecast-iam-roles.
--
-- The @Status@ of the export job must be @ACTIVE@ before you can access
-- the export in your Amazon S3 bucket. To get the status, use the
-- DescribePredictorBacktestExportJob operation.
module Amazonka.Forecast.CreatePredictorBacktestExportJob
  ( -- * Creating a Request
    CreatePredictorBacktestExportJob (..),
    newCreatePredictorBacktestExportJob,

    -- * Request Lenses
    createPredictorBacktestExportJob_format,
    createPredictorBacktestExportJob_tags,
    createPredictorBacktestExportJob_predictorBacktestExportJobName,
    createPredictorBacktestExportJob_predictorArn,
    createPredictorBacktestExportJob_destination,

    -- * Destructuring the Response
    CreatePredictorBacktestExportJobResponse (..),
    newCreatePredictorBacktestExportJobResponse,

    -- * Response Lenses
    createPredictorBacktestExportJobResponse_predictorBacktestExportJobArn,
    createPredictorBacktestExportJobResponse_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:/ 'newCreatePredictorBacktestExportJob' smart constructor.
data CreatePredictorBacktestExportJob = CreatePredictorBacktestExportJob'
  { -- | The format of the exported data, CSV or PARQUET. The default value is
    -- CSV.
    CreatePredictorBacktestExportJob -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
    -- | Optional metadata to help you categorize and organize your backtests.
    -- Each tag consists of a key and an optional value, both of which you
    -- define. Tag keys and values are case sensitive.
    --
    -- The following restrictions apply to tags:
    --
    -- -   For each resource, each tag key must be unique and each tag key must
    --     have one value.
    --
    -- -   Maximum number of tags per resource: 50.
    --
    -- -   Maximum key length: 128 Unicode characters in UTF-8.
    --
    -- -   Maximum value length: 256 Unicode characters in UTF-8.
    --
    -- -   Accepted characters: all letters and numbers, spaces representable
    --     in UTF-8, and + - = . _ : \/ \@. If your tagging schema is used
    --     across other services and resources, the character restrictions of
    --     those services also apply.
    --
    -- -   Key prefixes cannot include any upper or lowercase combination of
    --     @aws:@ or @AWS:@. Values can have this prefix. If a tag value has
    --     @aws@ as its prefix but the key does not, Forecast considers it to
    --     be a user tag and will count against the limit of 50 tags. Tags with
    --     only the key prefix of @aws@ do not count against your tags per
    --     resource limit. You cannot edit or delete tag keys with this prefix.
    CreatePredictorBacktestExportJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name for the backtest export job.
    CreatePredictorBacktestExportJob -> Text
predictorBacktestExportJobName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the predictor that you want to export.
    CreatePredictorBacktestExportJob -> Text
predictorArn :: Prelude.Text,
    CreatePredictorBacktestExportJob -> DataDestination
destination :: DataDestination
  }
  deriving (CreatePredictorBacktestExportJob
-> CreatePredictorBacktestExportJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePredictorBacktestExportJob
-> CreatePredictorBacktestExportJob -> Bool
$c/= :: CreatePredictorBacktestExportJob
-> CreatePredictorBacktestExportJob -> Bool
== :: CreatePredictorBacktestExportJob
-> CreatePredictorBacktestExportJob -> Bool
$c== :: CreatePredictorBacktestExportJob
-> CreatePredictorBacktestExportJob -> Bool
Prelude.Eq, Int -> CreatePredictorBacktestExportJob -> ShowS
[CreatePredictorBacktestExportJob] -> ShowS
CreatePredictorBacktestExportJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePredictorBacktestExportJob] -> ShowS
$cshowList :: [CreatePredictorBacktestExportJob] -> ShowS
show :: CreatePredictorBacktestExportJob -> String
$cshow :: CreatePredictorBacktestExportJob -> String
showsPrec :: Int -> CreatePredictorBacktestExportJob -> ShowS
$cshowsPrec :: Int -> CreatePredictorBacktestExportJob -> ShowS
Prelude.Show, forall x.
Rep CreatePredictorBacktestExportJob x
-> CreatePredictorBacktestExportJob
forall x.
CreatePredictorBacktestExportJob
-> Rep CreatePredictorBacktestExportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreatePredictorBacktestExportJob x
-> CreatePredictorBacktestExportJob
$cfrom :: forall x.
CreatePredictorBacktestExportJob
-> Rep CreatePredictorBacktestExportJob x
Prelude.Generic)

-- |
-- Create a value of 'CreatePredictorBacktestExportJob' 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:
--
-- 'format', 'createPredictorBacktestExportJob_format' - The format of the exported data, CSV or PARQUET. The default value is
-- CSV.
--
-- 'tags', 'createPredictorBacktestExportJob_tags' - Optional metadata to help you categorize and organize your backtests.
-- Each tag consists of a key and an optional value, both of which you
-- define. Tag keys and values are case sensitive.
--
-- The following restrictions apply to tags:
--
-- -   For each resource, each tag key must be unique and each tag key must
--     have one value.
--
-- -   Maximum number of tags per resource: 50.
--
-- -   Maximum key length: 128 Unicode characters in UTF-8.
--
-- -   Maximum value length: 256 Unicode characters in UTF-8.
--
-- -   Accepted characters: all letters and numbers, spaces representable
--     in UTF-8, and + - = . _ : \/ \@. If your tagging schema is used
--     across other services and resources, the character restrictions of
--     those services also apply.
--
-- -   Key prefixes cannot include any upper or lowercase combination of
--     @aws:@ or @AWS:@. Values can have this prefix. If a tag value has
--     @aws@ as its prefix but the key does not, Forecast considers it to
--     be a user tag and will count against the limit of 50 tags. Tags with
--     only the key prefix of @aws@ do not count against your tags per
--     resource limit. You cannot edit or delete tag keys with this prefix.
--
-- 'predictorBacktestExportJobName', 'createPredictorBacktestExportJob_predictorBacktestExportJobName' - The name for the backtest export job.
--
-- 'predictorArn', 'createPredictorBacktestExportJob_predictorArn' - The Amazon Resource Name (ARN) of the predictor that you want to export.
--
-- 'destination', 'createPredictorBacktestExportJob_destination' - Undocumented member.
newCreatePredictorBacktestExportJob ::
  -- | 'predictorBacktestExportJobName'
  Prelude.Text ->
  -- | 'predictorArn'
  Prelude.Text ->
  -- | 'destination'
  DataDestination ->
  CreatePredictorBacktestExportJob
newCreatePredictorBacktestExportJob :: Text -> Text -> DataDestination -> CreatePredictorBacktestExportJob
newCreatePredictorBacktestExportJob
  Text
pPredictorBacktestExportJobName_
  Text
pPredictorArn_
  DataDestination
pDestination_ =
    CreatePredictorBacktestExportJob'
      { $sel:format:CreatePredictorBacktestExportJob' :: Maybe Text
format =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreatePredictorBacktestExportJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:predictorBacktestExportJobName:CreatePredictorBacktestExportJob' :: Text
predictorBacktestExportJobName =
          Text
pPredictorBacktestExportJobName_,
        $sel:predictorArn:CreatePredictorBacktestExportJob' :: Text
predictorArn = Text
pPredictorArn_,
        $sel:destination:CreatePredictorBacktestExportJob' :: DataDestination
destination = DataDestination
pDestination_
      }

-- | The format of the exported data, CSV or PARQUET. The default value is
-- CSV.
createPredictorBacktestExportJob_format :: Lens.Lens' CreatePredictorBacktestExportJob (Prelude.Maybe Prelude.Text)
createPredictorBacktestExportJob_format :: Lens' CreatePredictorBacktestExportJob (Maybe Text)
createPredictorBacktestExportJob_format = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictorBacktestExportJob' {Maybe Text
format :: Maybe Text
$sel:format:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Maybe Text
format} -> Maybe Text
format) (\s :: CreatePredictorBacktestExportJob
s@CreatePredictorBacktestExportJob' {} Maybe Text
a -> CreatePredictorBacktestExportJob
s {$sel:format:CreatePredictorBacktestExportJob' :: Maybe Text
format = Maybe Text
a} :: CreatePredictorBacktestExportJob)

-- | Optional metadata to help you categorize and organize your backtests.
-- Each tag consists of a key and an optional value, both of which you
-- define. Tag keys and values are case sensitive.
--
-- The following restrictions apply to tags:
--
-- -   For each resource, each tag key must be unique and each tag key must
--     have one value.
--
-- -   Maximum number of tags per resource: 50.
--
-- -   Maximum key length: 128 Unicode characters in UTF-8.
--
-- -   Maximum value length: 256 Unicode characters in UTF-8.
--
-- -   Accepted characters: all letters and numbers, spaces representable
--     in UTF-8, and + - = . _ : \/ \@. If your tagging schema is used
--     across other services and resources, the character restrictions of
--     those services also apply.
--
-- -   Key prefixes cannot include any upper or lowercase combination of
--     @aws:@ or @AWS:@. Values can have this prefix. If a tag value has
--     @aws@ as its prefix but the key does not, Forecast considers it to
--     be a user tag and will count against the limit of 50 tags. Tags with
--     only the key prefix of @aws@ do not count against your tags per
--     resource limit. You cannot edit or delete tag keys with this prefix.
createPredictorBacktestExportJob_tags :: Lens.Lens' CreatePredictorBacktestExportJob (Prelude.Maybe [Tag])
createPredictorBacktestExportJob_tags :: Lens' CreatePredictorBacktestExportJob (Maybe [Tag])
createPredictorBacktestExportJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictorBacktestExportJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreatePredictorBacktestExportJob
s@CreatePredictorBacktestExportJob' {} Maybe [Tag]
a -> CreatePredictorBacktestExportJob
s {$sel:tags:CreatePredictorBacktestExportJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreatePredictorBacktestExportJob) 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 name for the backtest export job.
createPredictorBacktestExportJob_predictorBacktestExportJobName :: Lens.Lens' CreatePredictorBacktestExportJob Prelude.Text
createPredictorBacktestExportJob_predictorBacktestExportJobName :: Lens' CreatePredictorBacktestExportJob Text
createPredictorBacktestExportJob_predictorBacktestExportJobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictorBacktestExportJob' {Text
predictorBacktestExportJobName :: Text
$sel:predictorBacktestExportJobName:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Text
predictorBacktestExportJobName} -> Text
predictorBacktestExportJobName) (\s :: CreatePredictorBacktestExportJob
s@CreatePredictorBacktestExportJob' {} Text
a -> CreatePredictorBacktestExportJob
s {$sel:predictorBacktestExportJobName:CreatePredictorBacktestExportJob' :: Text
predictorBacktestExportJobName = Text
a} :: CreatePredictorBacktestExportJob)

-- | The Amazon Resource Name (ARN) of the predictor that you want to export.
createPredictorBacktestExportJob_predictorArn :: Lens.Lens' CreatePredictorBacktestExportJob Prelude.Text
createPredictorBacktestExportJob_predictorArn :: Lens' CreatePredictorBacktestExportJob Text
createPredictorBacktestExportJob_predictorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictorBacktestExportJob' {Text
predictorArn :: Text
$sel:predictorArn:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Text
predictorArn} -> Text
predictorArn) (\s :: CreatePredictorBacktestExportJob
s@CreatePredictorBacktestExportJob' {} Text
a -> CreatePredictorBacktestExportJob
s {$sel:predictorArn:CreatePredictorBacktestExportJob' :: Text
predictorArn = Text
a} :: CreatePredictorBacktestExportJob)

-- | Undocumented member.
createPredictorBacktestExportJob_destination :: Lens.Lens' CreatePredictorBacktestExportJob DataDestination
createPredictorBacktestExportJob_destination :: Lens' CreatePredictorBacktestExportJob DataDestination
createPredictorBacktestExportJob_destination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictorBacktestExportJob' {DataDestination
destination :: DataDestination
$sel:destination:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> DataDestination
destination} -> DataDestination
destination) (\s :: CreatePredictorBacktestExportJob
s@CreatePredictorBacktestExportJob' {} DataDestination
a -> CreatePredictorBacktestExportJob
s {$sel:destination:CreatePredictorBacktestExportJob' :: DataDestination
destination = DataDestination
a} :: CreatePredictorBacktestExportJob)

instance
  Core.AWSRequest
    CreatePredictorBacktestExportJob
  where
  type
    AWSResponse CreatePredictorBacktestExportJob =
      CreatePredictorBacktestExportJobResponse
  request :: (Service -> Service)
-> CreatePredictorBacktestExportJob
-> Request CreatePredictorBacktestExportJob
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 CreatePredictorBacktestExportJob
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse CreatePredictorBacktestExportJob)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreatePredictorBacktestExportJobResponse
CreatePredictorBacktestExportJobResponse'
            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
"PredictorBacktestExportJobArn")
            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
    CreatePredictorBacktestExportJob
  where
  hashWithSalt :: Int -> CreatePredictorBacktestExportJob -> Int
hashWithSalt
    Int
_salt
    CreatePredictorBacktestExportJob' {Maybe [Tag]
Maybe Text
Text
DataDestination
destination :: DataDestination
predictorArn :: Text
predictorBacktestExportJobName :: Text
tags :: Maybe [Tag]
format :: Maybe Text
$sel:destination:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> DataDestination
$sel:predictorArn:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Text
$sel:predictorBacktestExportJobName:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Text
$sel:tags:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Maybe [Tag]
$sel:format:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
format
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
predictorBacktestExportJobName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
predictorArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DataDestination
destination

instance
  Prelude.NFData
    CreatePredictorBacktestExportJob
  where
  rnf :: CreatePredictorBacktestExportJob -> ()
rnf CreatePredictorBacktestExportJob' {Maybe [Tag]
Maybe Text
Text
DataDestination
destination :: DataDestination
predictorArn :: Text
predictorBacktestExportJobName :: Text
tags :: Maybe [Tag]
format :: Maybe Text
$sel:destination:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> DataDestination
$sel:predictorArn:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Text
$sel:predictorBacktestExportJobName:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Text
$sel:tags:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Maybe [Tag]
$sel:format:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
format
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
predictorBacktestExportJobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
predictorArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DataDestination
destination

instance
  Data.ToHeaders
    CreatePredictorBacktestExportJob
  where
  toHeaders :: CreatePredictorBacktestExportJob -> 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.CreatePredictorBacktestExportJob" ::
                          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 CreatePredictorBacktestExportJob where
  toJSON :: CreatePredictorBacktestExportJob -> Value
toJSON CreatePredictorBacktestExportJob' {Maybe [Tag]
Maybe Text
Text
DataDestination
destination :: DataDestination
predictorArn :: Text
predictorBacktestExportJobName :: Text
tags :: Maybe [Tag]
format :: Maybe Text
$sel:destination:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> DataDestination
$sel:predictorArn:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Text
$sel:predictorBacktestExportJobName:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Text
$sel:tags:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Maybe [Tag]
$sel:format:CreatePredictorBacktestExportJob' :: CreatePredictorBacktestExportJob -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Format" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
format,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"PredictorBacktestExportJobName"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
predictorBacktestExportJobName
              ),
            forall a. a -> Maybe a
Prelude.Just (Key
"PredictorArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
predictorArn),
            forall a. a -> Maybe a
Prelude.Just (Key
"Destination" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DataDestination
destination)
          ]
      )

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

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

-- | /See:/ 'newCreatePredictorBacktestExportJobResponse' smart constructor.
data CreatePredictorBacktestExportJobResponse = CreatePredictorBacktestExportJobResponse'
  { -- | The Amazon Resource Name (ARN) of the predictor backtest export job that
    -- you want to export.
    CreatePredictorBacktestExportJobResponse -> Maybe Text
predictorBacktestExportJobArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreatePredictorBacktestExportJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreatePredictorBacktestExportJobResponse
-> CreatePredictorBacktestExportJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePredictorBacktestExportJobResponse
-> CreatePredictorBacktestExportJobResponse -> Bool
$c/= :: CreatePredictorBacktestExportJobResponse
-> CreatePredictorBacktestExportJobResponse -> Bool
== :: CreatePredictorBacktestExportJobResponse
-> CreatePredictorBacktestExportJobResponse -> Bool
$c== :: CreatePredictorBacktestExportJobResponse
-> CreatePredictorBacktestExportJobResponse -> Bool
Prelude.Eq, ReadPrec [CreatePredictorBacktestExportJobResponse]
ReadPrec CreatePredictorBacktestExportJobResponse
Int -> ReadS CreatePredictorBacktestExportJobResponse
ReadS [CreatePredictorBacktestExportJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePredictorBacktestExportJobResponse]
$creadListPrec :: ReadPrec [CreatePredictorBacktestExportJobResponse]
readPrec :: ReadPrec CreatePredictorBacktestExportJobResponse
$creadPrec :: ReadPrec CreatePredictorBacktestExportJobResponse
readList :: ReadS [CreatePredictorBacktestExportJobResponse]
$creadList :: ReadS [CreatePredictorBacktestExportJobResponse]
readsPrec :: Int -> ReadS CreatePredictorBacktestExportJobResponse
$creadsPrec :: Int -> ReadS CreatePredictorBacktestExportJobResponse
Prelude.Read, Int -> CreatePredictorBacktestExportJobResponse -> ShowS
[CreatePredictorBacktestExportJobResponse] -> ShowS
CreatePredictorBacktestExportJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePredictorBacktestExportJobResponse] -> ShowS
$cshowList :: [CreatePredictorBacktestExportJobResponse] -> ShowS
show :: CreatePredictorBacktestExportJobResponse -> String
$cshow :: CreatePredictorBacktestExportJobResponse -> String
showsPrec :: Int -> CreatePredictorBacktestExportJobResponse -> ShowS
$cshowsPrec :: Int -> CreatePredictorBacktestExportJobResponse -> ShowS
Prelude.Show, forall x.
Rep CreatePredictorBacktestExportJobResponse x
-> CreatePredictorBacktestExportJobResponse
forall x.
CreatePredictorBacktestExportJobResponse
-> Rep CreatePredictorBacktestExportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreatePredictorBacktestExportJobResponse x
-> CreatePredictorBacktestExportJobResponse
$cfrom :: forall x.
CreatePredictorBacktestExportJobResponse
-> Rep CreatePredictorBacktestExportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreatePredictorBacktestExportJobResponse' 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', 'createPredictorBacktestExportJobResponse_predictorBacktestExportJobArn' - The Amazon Resource Name (ARN) of the predictor backtest export job that
-- you want to export.
--
-- 'httpStatus', 'createPredictorBacktestExportJobResponse_httpStatus' - The response's http status code.
newCreatePredictorBacktestExportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreatePredictorBacktestExportJobResponse
newCreatePredictorBacktestExportJobResponse :: Int -> CreatePredictorBacktestExportJobResponse
newCreatePredictorBacktestExportJobResponse
  Int
pHttpStatus_ =
    CreatePredictorBacktestExportJobResponse'
      { $sel:predictorBacktestExportJobArn:CreatePredictorBacktestExportJobResponse' :: Maybe Text
predictorBacktestExportJobArn =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:CreatePredictorBacktestExportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

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

instance
  Prelude.NFData
    CreatePredictorBacktestExportJobResponse
  where
  rnf :: CreatePredictorBacktestExportJobResponse -> ()
rnf CreatePredictorBacktestExportJobResponse' {Int
Maybe Text
httpStatus :: Int
predictorBacktestExportJobArn :: Maybe Text
$sel:httpStatus:CreatePredictorBacktestExportJobResponse' :: CreatePredictorBacktestExportJobResponse -> Int
$sel:predictorBacktestExportJobArn:CreatePredictorBacktestExportJobResponse' :: CreatePredictorBacktestExportJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
predictorBacktestExportJobArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus