{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.FraudDetector.Types.BatchPrediction
-- 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)
module Amazonka.FraudDetector.Types.BatchPrediction where

import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types.AsyncJobStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The batch prediction details.
--
-- /See:/ 'newBatchPrediction' smart constructor.
data BatchPrediction = BatchPrediction'
  { -- | The reason a batch prediction job failed.
    BatchPrediction -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the IAM role to use for this job request.
    BatchPrediction -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The batch prediction status.
    BatchPrediction -> Maybe AsyncJobStatus
status :: Prelude.Maybe AsyncJobStatus,
    -- | The number of records processed by the batch prediction job.
    BatchPrediction -> Maybe Int
processedRecordsCount :: Prelude.Maybe Prelude.Int,
    -- | The total number of records in the batch prediction job.
    BatchPrediction -> Maybe Int
totalRecordsCount :: Prelude.Maybe Prelude.Int,
    -- | Timestamp of most recent heartbeat indicating the batch prediction job
    -- was making progress.
    BatchPrediction -> Maybe Text
lastHeartbeatTime :: Prelude.Maybe Prelude.Text,
    -- | The job ID for the batch prediction.
    BatchPrediction -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of batch prediction job.
    BatchPrediction -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Timestamp of when the batch prediction job started.
    BatchPrediction -> Maybe Text
startTime :: Prelude.Maybe Prelude.Text,
    -- | The name of the event type.
    BatchPrediction -> Maybe Text
eventTypeName :: Prelude.Maybe Prelude.Text,
    -- | Timestamp of when the batch prediction job completed.
    BatchPrediction -> Maybe Text
completionTime :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 location of your output file.
    BatchPrediction -> Maybe Text
outputPath :: Prelude.Maybe Prelude.Text,
    -- | The name of the detector.
    BatchPrediction -> Maybe Text
detectorName :: Prelude.Maybe Prelude.Text,
    -- | The detector version.
    BatchPrediction -> Maybe Text
detectorVersion :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 location of your training file.
    BatchPrediction -> Maybe Text
inputPath :: Prelude.Maybe Prelude.Text
  }
  deriving (BatchPrediction -> BatchPrediction -> Bool
(BatchPrediction -> BatchPrediction -> Bool)
-> (BatchPrediction -> BatchPrediction -> Bool)
-> Eq BatchPrediction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchPrediction -> BatchPrediction -> Bool
$c/= :: BatchPrediction -> BatchPrediction -> Bool
== :: BatchPrediction -> BatchPrediction -> Bool
$c== :: BatchPrediction -> BatchPrediction -> Bool
Prelude.Eq, ReadPrec [BatchPrediction]
ReadPrec BatchPrediction
Int -> ReadS BatchPrediction
ReadS [BatchPrediction]
(Int -> ReadS BatchPrediction)
-> ReadS [BatchPrediction]
-> ReadPrec BatchPrediction
-> ReadPrec [BatchPrediction]
-> Read BatchPrediction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchPrediction]
$creadListPrec :: ReadPrec [BatchPrediction]
readPrec :: ReadPrec BatchPrediction
$creadPrec :: ReadPrec BatchPrediction
readList :: ReadS [BatchPrediction]
$creadList :: ReadS [BatchPrediction]
readsPrec :: Int -> ReadS BatchPrediction
$creadsPrec :: Int -> ReadS BatchPrediction
Prelude.Read, Int -> BatchPrediction -> ShowS
[BatchPrediction] -> ShowS
BatchPrediction -> String
(Int -> BatchPrediction -> ShowS)
-> (BatchPrediction -> String)
-> ([BatchPrediction] -> ShowS)
-> Show BatchPrediction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchPrediction] -> ShowS
$cshowList :: [BatchPrediction] -> ShowS
show :: BatchPrediction -> String
$cshow :: BatchPrediction -> String
showsPrec :: Int -> BatchPrediction -> ShowS
$cshowsPrec :: Int -> BatchPrediction -> ShowS
Prelude.Show, (forall x. BatchPrediction -> Rep BatchPrediction x)
-> (forall x. Rep BatchPrediction x -> BatchPrediction)
-> Generic BatchPrediction
forall x. Rep BatchPrediction x -> BatchPrediction
forall x. BatchPrediction -> Rep BatchPrediction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchPrediction x -> BatchPrediction
$cfrom :: forall x. BatchPrediction -> Rep BatchPrediction x
Prelude.Generic)

-- |
-- Create a value of 'BatchPrediction' 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:
--
-- 'failureReason', 'batchPrediction_failureReason' - The reason a batch prediction job failed.
--
-- 'iamRoleArn', 'batchPrediction_iamRoleArn' - The ARN of the IAM role to use for this job request.
--
-- 'status', 'batchPrediction_status' - The batch prediction status.
--
-- 'processedRecordsCount', 'batchPrediction_processedRecordsCount' - The number of records processed by the batch prediction job.
--
-- 'totalRecordsCount', 'batchPrediction_totalRecordsCount' - The total number of records in the batch prediction job.
--
-- 'lastHeartbeatTime', 'batchPrediction_lastHeartbeatTime' - Timestamp of most recent heartbeat indicating the batch prediction job
-- was making progress.
--
-- 'jobId', 'batchPrediction_jobId' - The job ID for the batch prediction.
--
-- 'arn', 'batchPrediction_arn' - The ARN of batch prediction job.
--
-- 'startTime', 'batchPrediction_startTime' - Timestamp of when the batch prediction job started.
--
-- 'eventTypeName', 'batchPrediction_eventTypeName' - The name of the event type.
--
-- 'completionTime', 'batchPrediction_completionTime' - Timestamp of when the batch prediction job completed.
--
-- 'outputPath', 'batchPrediction_outputPath' - The Amazon S3 location of your output file.
--
-- 'detectorName', 'batchPrediction_detectorName' - The name of the detector.
--
-- 'detectorVersion', 'batchPrediction_detectorVersion' - The detector version.
--
-- 'inputPath', 'batchPrediction_inputPath' - The Amazon S3 location of your training file.
newBatchPrediction ::
  BatchPrediction
newBatchPrediction :: BatchPrediction
newBatchPrediction =
  BatchPrediction' :: Maybe Text
-> Maybe Text
-> Maybe AsyncJobStatus
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BatchPrediction
BatchPrediction'
    { $sel:failureReason:BatchPrediction' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRoleArn:BatchPrediction' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:BatchPrediction' :: Maybe AsyncJobStatus
status = Maybe AsyncJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:processedRecordsCount:BatchPrediction' :: Maybe Int
processedRecordsCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:totalRecordsCount:BatchPrediction' :: Maybe Int
totalRecordsCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:lastHeartbeatTime:BatchPrediction' :: Maybe Text
lastHeartbeatTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:BatchPrediction' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:BatchPrediction' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:BatchPrediction' :: Maybe Text
startTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eventTypeName:BatchPrediction' :: Maybe Text
eventTypeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:completionTime:BatchPrediction' :: Maybe Text
completionTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputPath:BatchPrediction' :: Maybe Text
outputPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorName:BatchPrediction' :: Maybe Text
detectorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorVersion:BatchPrediction' :: Maybe Text
detectorVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputPath:BatchPrediction' :: Maybe Text
inputPath = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The reason a batch prediction job failed.
batchPrediction_failureReason :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_failureReason :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_failureReason = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:BatchPrediction' :: BatchPrediction -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:failureReason:BatchPrediction' :: Maybe Text
failureReason = Maybe Text
a} :: BatchPrediction)

-- | The ARN of the IAM role to use for this job request.
batchPrediction_iamRoleArn :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_iamRoleArn :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_iamRoleArn = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:BatchPrediction' :: BatchPrediction -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:iamRoleArn:BatchPrediction' :: Maybe Text
iamRoleArn = Maybe Text
a} :: BatchPrediction)

-- | The batch prediction status.
batchPrediction_status :: Lens.Lens' BatchPrediction (Prelude.Maybe AsyncJobStatus)
batchPrediction_status :: (Maybe AsyncJobStatus -> f (Maybe AsyncJobStatus))
-> BatchPrediction -> f BatchPrediction
batchPrediction_status = (BatchPrediction -> Maybe AsyncJobStatus)
-> (BatchPrediction -> Maybe AsyncJobStatus -> BatchPrediction)
-> Lens
     BatchPrediction
     BatchPrediction
     (Maybe AsyncJobStatus)
     (Maybe AsyncJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe AsyncJobStatus
status :: Maybe AsyncJobStatus
$sel:status:BatchPrediction' :: BatchPrediction -> Maybe AsyncJobStatus
status} -> Maybe AsyncJobStatus
status) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe AsyncJobStatus
a -> BatchPrediction
s {$sel:status:BatchPrediction' :: Maybe AsyncJobStatus
status = Maybe AsyncJobStatus
a} :: BatchPrediction)

-- | The number of records processed by the batch prediction job.
batchPrediction_processedRecordsCount :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Int)
batchPrediction_processedRecordsCount :: (Maybe Int -> f (Maybe Int))
-> BatchPrediction -> f BatchPrediction
batchPrediction_processedRecordsCount = (BatchPrediction -> Maybe Int)
-> (BatchPrediction -> Maybe Int -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Int
processedRecordsCount :: Maybe Int
$sel:processedRecordsCount:BatchPrediction' :: BatchPrediction -> Maybe Int
processedRecordsCount} -> Maybe Int
processedRecordsCount) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Int
a -> BatchPrediction
s {$sel:processedRecordsCount:BatchPrediction' :: Maybe Int
processedRecordsCount = Maybe Int
a} :: BatchPrediction)

-- | The total number of records in the batch prediction job.
batchPrediction_totalRecordsCount :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Int)
batchPrediction_totalRecordsCount :: (Maybe Int -> f (Maybe Int))
-> BatchPrediction -> f BatchPrediction
batchPrediction_totalRecordsCount = (BatchPrediction -> Maybe Int)
-> (BatchPrediction -> Maybe Int -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Int
totalRecordsCount :: Maybe Int
$sel:totalRecordsCount:BatchPrediction' :: BatchPrediction -> Maybe Int
totalRecordsCount} -> Maybe Int
totalRecordsCount) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Int
a -> BatchPrediction
s {$sel:totalRecordsCount:BatchPrediction' :: Maybe Int
totalRecordsCount = Maybe Int
a} :: BatchPrediction)

-- | Timestamp of most recent heartbeat indicating the batch prediction job
-- was making progress.
batchPrediction_lastHeartbeatTime :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_lastHeartbeatTime :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_lastHeartbeatTime = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
lastHeartbeatTime :: Maybe Text
$sel:lastHeartbeatTime:BatchPrediction' :: BatchPrediction -> Maybe Text
lastHeartbeatTime} -> Maybe Text
lastHeartbeatTime) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:lastHeartbeatTime:BatchPrediction' :: Maybe Text
lastHeartbeatTime = Maybe Text
a} :: BatchPrediction)

-- | The job ID for the batch prediction.
batchPrediction_jobId :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_jobId :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_jobId = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
jobId :: Maybe Text
$sel:jobId:BatchPrediction' :: BatchPrediction -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:jobId:BatchPrediction' :: Maybe Text
jobId = Maybe Text
a} :: BatchPrediction)

-- | The ARN of batch prediction job.
batchPrediction_arn :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_arn :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_arn = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
arn :: Maybe Text
$sel:arn:BatchPrediction' :: BatchPrediction -> Maybe Text
arn} -> Maybe Text
arn) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:arn:BatchPrediction' :: Maybe Text
arn = Maybe Text
a} :: BatchPrediction)

-- | Timestamp of when the batch prediction job started.
batchPrediction_startTime :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_startTime :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_startTime = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
startTime :: Maybe Text
$sel:startTime:BatchPrediction' :: BatchPrediction -> Maybe Text
startTime} -> Maybe Text
startTime) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:startTime:BatchPrediction' :: Maybe Text
startTime = Maybe Text
a} :: BatchPrediction)

-- | The name of the event type.
batchPrediction_eventTypeName :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_eventTypeName :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_eventTypeName = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
eventTypeName :: Maybe Text
$sel:eventTypeName:BatchPrediction' :: BatchPrediction -> Maybe Text
eventTypeName} -> Maybe Text
eventTypeName) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:eventTypeName:BatchPrediction' :: Maybe Text
eventTypeName = Maybe Text
a} :: BatchPrediction)

-- | Timestamp of when the batch prediction job completed.
batchPrediction_completionTime :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_completionTime :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_completionTime = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
completionTime :: Maybe Text
$sel:completionTime:BatchPrediction' :: BatchPrediction -> Maybe Text
completionTime} -> Maybe Text
completionTime) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:completionTime:BatchPrediction' :: Maybe Text
completionTime = Maybe Text
a} :: BatchPrediction)

-- | The Amazon S3 location of your output file.
batchPrediction_outputPath :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_outputPath :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_outputPath = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
outputPath :: Maybe Text
$sel:outputPath:BatchPrediction' :: BatchPrediction -> Maybe Text
outputPath} -> Maybe Text
outputPath) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:outputPath:BatchPrediction' :: Maybe Text
outputPath = Maybe Text
a} :: BatchPrediction)

-- | The name of the detector.
batchPrediction_detectorName :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_detectorName :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_detectorName = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
detectorName :: Maybe Text
$sel:detectorName:BatchPrediction' :: BatchPrediction -> Maybe Text
detectorName} -> Maybe Text
detectorName) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:detectorName:BatchPrediction' :: Maybe Text
detectorName = Maybe Text
a} :: BatchPrediction)

-- | The detector version.
batchPrediction_detectorVersion :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_detectorVersion :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_detectorVersion = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
detectorVersion :: Maybe Text
$sel:detectorVersion:BatchPrediction' :: BatchPrediction -> Maybe Text
detectorVersion} -> Maybe Text
detectorVersion) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:detectorVersion:BatchPrediction' :: Maybe Text
detectorVersion = Maybe Text
a} :: BatchPrediction)

-- | The Amazon S3 location of your training file.
batchPrediction_inputPath :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_inputPath :: (Maybe Text -> f (Maybe Text))
-> BatchPrediction -> f BatchPrediction
batchPrediction_inputPath = (BatchPrediction -> Maybe Text)
-> (BatchPrediction -> Maybe Text -> BatchPrediction)
-> Lens BatchPrediction BatchPrediction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
inputPath :: Maybe Text
$sel:inputPath:BatchPrediction' :: BatchPrediction -> Maybe Text
inputPath} -> Maybe Text
inputPath) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:inputPath:BatchPrediction' :: Maybe Text
inputPath = Maybe Text
a} :: BatchPrediction)

instance Core.FromJSON BatchPrediction where
  parseJSON :: Value -> Parser BatchPrediction
parseJSON =
    String
-> (Object -> Parser BatchPrediction)
-> Value
-> Parser BatchPrediction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BatchPrediction"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe AsyncJobStatus
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BatchPrediction
BatchPrediction'
            (Maybe Text
 -> Maybe Text
 -> Maybe AsyncJobStatus
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AsyncJobStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"failureReason")
            Parser
  (Maybe Text
   -> Maybe AsyncJobStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser
     (Maybe AsyncJobStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"iamRoleArn")
            Parser
  (Maybe AsyncJobStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe AsyncJobStatus)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AsyncJobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"processedRecordsCount")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"totalRecordsCount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastHeartbeatTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"startTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"eventTypeName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"completionTime")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputPath")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> BatchPrediction)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"detectorName")
            Parser (Maybe Text -> Maybe Text -> BatchPrediction)
-> Parser (Maybe Text) -> Parser (Maybe Text -> BatchPrediction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"detectorVersion")
            Parser (Maybe Text -> BatchPrediction)
-> Parser (Maybe Text) -> Parser BatchPrediction
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"inputPath")
      )

instance Prelude.Hashable BatchPrediction

instance Prelude.NFData BatchPrediction