{-# 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-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)
--
-- Exports backtest forecasts and accuracy metrics generated by the
-- CreatePredictor operation. Two folders containing CSV 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_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 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:/ 'newCreatePredictorBacktestExportJob' smart constructor.
data CreatePredictorBacktestExportJob = 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 -> 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
(CreatePredictorBacktestExportJob
 -> CreatePredictorBacktestExportJob -> Bool)
-> (CreatePredictorBacktestExportJob
    -> CreatePredictorBacktestExportJob -> Bool)
-> Eq CreatePredictorBacktestExportJob
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
(Int -> CreatePredictorBacktestExportJob -> ShowS)
-> (CreatePredictorBacktestExportJob -> String)
-> ([CreatePredictorBacktestExportJob] -> ShowS)
-> Show CreatePredictorBacktestExportJob
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.
 CreatePredictorBacktestExportJob
 -> Rep CreatePredictorBacktestExportJob x)
-> (forall x.
    Rep CreatePredictorBacktestExportJob x
    -> CreatePredictorBacktestExportJob)
-> Generic CreatePredictorBacktestExportJob
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:
--
-- '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' :: Maybe [Tag]
-> Text
-> Text
-> DataDestination
-> CreatePredictorBacktestExportJob
CreatePredictorBacktestExportJob'
      { $sel:tags:CreatePredictorBacktestExportJob' :: Maybe [Tag]
tags =
          Maybe [Tag]
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_
      }

-- | 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 :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePredictorBacktestExportJob
-> f CreatePredictorBacktestExportJob
createPredictorBacktestExportJob_tags = (CreatePredictorBacktestExportJob -> Maybe [Tag])
-> (CreatePredictorBacktestExportJob
    -> Maybe [Tag] -> CreatePredictorBacktestExportJob)
-> Lens
     CreatePredictorBacktestExportJob
     CreatePredictorBacktestExportJob
     (Maybe [Tag])
     (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreatePredictorBacktestExportJob
 -> f CreatePredictorBacktestExportJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePredictorBacktestExportJob
-> f CreatePredictorBacktestExportJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
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 :: (Text -> f Text)
-> CreatePredictorBacktestExportJob
-> f CreatePredictorBacktestExportJob
createPredictorBacktestExportJob_predictorBacktestExportJobName = (CreatePredictorBacktestExportJob -> Text)
-> (CreatePredictorBacktestExportJob
    -> Text -> CreatePredictorBacktestExportJob)
-> Lens
     CreatePredictorBacktestExportJob
     CreatePredictorBacktestExportJob
     Text
     Text
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 :: (Text -> f Text)
-> CreatePredictorBacktestExportJob
-> f CreatePredictorBacktestExportJob
createPredictorBacktestExportJob_predictorArn = (CreatePredictorBacktestExportJob -> Text)
-> (CreatePredictorBacktestExportJob
    -> Text -> CreatePredictorBacktestExportJob)
-> Lens
     CreatePredictorBacktestExportJob
     CreatePredictorBacktestExportJob
     Text
     Text
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 :: (DataDestination -> f DataDestination)
-> CreatePredictorBacktestExportJob
-> f CreatePredictorBacktestExportJob
createPredictorBacktestExportJob_destination = (CreatePredictorBacktestExportJob -> DataDestination)
-> (CreatePredictorBacktestExportJob
    -> DataDestination -> CreatePredictorBacktestExportJob)
-> Lens
     CreatePredictorBacktestExportJob
     CreatePredictorBacktestExportJob
     DataDestination
     DataDestination
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 :: CreatePredictorBacktestExportJob
-> Request CreatePredictorBacktestExportJob
request = Service
-> CreatePredictorBacktestExportJob
-> Request CreatePredictorBacktestExportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreatePredictorBacktestExportJob
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse CreatePredictorBacktestExportJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreatePredictorBacktestExportJob))
-> Logger
-> Service
-> Proxy CreatePredictorBacktestExportJob
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse CreatePredictorBacktestExportJob)))
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 Text -> Int -> CreatePredictorBacktestExportJobResponse
CreatePredictorBacktestExportJobResponse'
            (Maybe Text -> Int -> CreatePredictorBacktestExportJobResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreatePredictorBacktestExportJobResponse)
forall (f :: * -> *) a b. Functor 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 (Int -> CreatePredictorBacktestExportJobResponse)
-> Either String Int
-> Either String CreatePredictorBacktestExportJobResponse
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
    CreatePredictorBacktestExportJob

instance
  Prelude.NFData
    CreatePredictorBacktestExportJob

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

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

instance
  Core.ToQuery
    CreatePredictorBacktestExportJob
  where
  toQuery :: CreatePredictorBacktestExportJob -> QueryString
toQuery = QueryString -> CreatePredictorBacktestExportJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(CreatePredictorBacktestExportJobResponse
 -> CreatePredictorBacktestExportJobResponse -> Bool)
-> (CreatePredictorBacktestExportJobResponse
    -> CreatePredictorBacktestExportJobResponse -> Bool)
-> Eq CreatePredictorBacktestExportJobResponse
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]
(Int -> ReadS CreatePredictorBacktestExportJobResponse)
-> ReadS [CreatePredictorBacktestExportJobResponse]
-> ReadPrec CreatePredictorBacktestExportJobResponse
-> ReadPrec [CreatePredictorBacktestExportJobResponse]
-> Read 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
(Int -> CreatePredictorBacktestExportJobResponse -> ShowS)
-> (CreatePredictorBacktestExportJobResponse -> String)
-> ([CreatePredictorBacktestExportJobResponse] -> ShowS)
-> Show CreatePredictorBacktestExportJobResponse
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.
 CreatePredictorBacktestExportJobResponse
 -> Rep CreatePredictorBacktestExportJobResponse x)
-> (forall x.
    Rep CreatePredictorBacktestExportJobResponse x
    -> CreatePredictorBacktestExportJobResponse)
-> Generic CreatePredictorBacktestExportJobResponse
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' :: Maybe Text -> Int -> CreatePredictorBacktestExportJobResponse
CreatePredictorBacktestExportJobResponse'
      { $sel:predictorBacktestExportJobArn:CreatePredictorBacktestExportJobResponse' :: Maybe Text
predictorBacktestExportJobArn =
          Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> CreatePredictorBacktestExportJobResponse
-> f CreatePredictorBacktestExportJobResponse
createPredictorBacktestExportJobResponse_predictorBacktestExportJobArn = (CreatePredictorBacktestExportJobResponse -> Maybe Text)
-> (CreatePredictorBacktestExportJobResponse
    -> Maybe Text -> CreatePredictorBacktestExportJobResponse)
-> Lens
     CreatePredictorBacktestExportJobResponse
     CreatePredictorBacktestExportJobResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Int -> f Int)
-> CreatePredictorBacktestExportJobResponse
-> f CreatePredictorBacktestExportJobResponse
createPredictorBacktestExportJobResponse_httpStatus = (CreatePredictorBacktestExportJobResponse -> Int)
-> (CreatePredictorBacktestExportJobResponse
    -> Int -> CreatePredictorBacktestExportJobResponse)
-> Lens
     CreatePredictorBacktestExportJobResponse
     CreatePredictorBacktestExportJobResponse
     Int
     Int
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