{-# 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.Personalize.Types.BatchInferenceJob
-- 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.Personalize.Types.BatchInferenceJob where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Personalize.Types.BatchInferenceJobConfig
import Amazonka.Personalize.Types.BatchInferenceJobInput
import Amazonka.Personalize.Types.BatchInferenceJobOutput
import qualified Amazonka.Prelude as Prelude

-- | Contains information on a batch inference job.
--
-- /See:/ 'newBatchInferenceJob' smart constructor.
data BatchInferenceJob = BatchInferenceJob'
  { -- | If the batch inference job failed, the reason for the failure.
    BatchInferenceJob -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The status of the batch inference job. The status is one of the
    -- following values:
    --
    -- -   PENDING
    --
    -- -   IN PROGRESS
    --
    -- -   ACTIVE
    --
    -- -   CREATE FAILED
    BatchInferenceJob -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 bucket that contains the output data generated by the
    -- batch inference job.
    BatchInferenceJob -> Maybe BatchInferenceJobOutput
jobOutput :: Prelude.Maybe BatchInferenceJobOutput,
    -- | The name of the batch inference job.
    BatchInferenceJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | The time at which the batch inference job was last updated.
    BatchInferenceJob -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
    -- | The number of recommendations generated by the batch inference job. This
    -- number includes the error messages generated for failed input records.
    BatchInferenceJob -> Maybe Int
numResults :: Prelude.Maybe Prelude.Int,
    -- | A string to string map of the configuration details of a batch inference
    -- job.
    BatchInferenceJob -> Maybe BatchInferenceJobConfig
batchInferenceJobConfig :: Prelude.Maybe BatchInferenceJobConfig,
    -- | The Amazon Resource Name (ARN) of the batch inference job.
    BatchInferenceJob -> Maybe Text
batchInferenceJobArn :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the filter used on the batch inference job.
    BatchInferenceJob -> Maybe Text
filterArn :: Prelude.Maybe Prelude.Text,
    -- | The time at which the batch inference job was created.
    BatchInferenceJob -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the solution version from which the
    -- batch inference job was created.
    BatchInferenceJob -> Maybe Text
solutionVersionArn :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the Amazon Identity and Access Management (IAM) role that
    -- requested the batch inference job.
    BatchInferenceJob -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 path that leads to the input data used to generate the
    -- batch inference job.
    BatchInferenceJob -> Maybe BatchInferenceJobInput
jobInput :: Prelude.Maybe BatchInferenceJobInput
  }
  deriving (BatchInferenceJob -> BatchInferenceJob -> Bool
(BatchInferenceJob -> BatchInferenceJob -> Bool)
-> (BatchInferenceJob -> BatchInferenceJob -> Bool)
-> Eq BatchInferenceJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchInferenceJob -> BatchInferenceJob -> Bool
$c/= :: BatchInferenceJob -> BatchInferenceJob -> Bool
== :: BatchInferenceJob -> BatchInferenceJob -> Bool
$c== :: BatchInferenceJob -> BatchInferenceJob -> Bool
Prelude.Eq, ReadPrec [BatchInferenceJob]
ReadPrec BatchInferenceJob
Int -> ReadS BatchInferenceJob
ReadS [BatchInferenceJob]
(Int -> ReadS BatchInferenceJob)
-> ReadS [BatchInferenceJob]
-> ReadPrec BatchInferenceJob
-> ReadPrec [BatchInferenceJob]
-> Read BatchInferenceJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchInferenceJob]
$creadListPrec :: ReadPrec [BatchInferenceJob]
readPrec :: ReadPrec BatchInferenceJob
$creadPrec :: ReadPrec BatchInferenceJob
readList :: ReadS [BatchInferenceJob]
$creadList :: ReadS [BatchInferenceJob]
readsPrec :: Int -> ReadS BatchInferenceJob
$creadsPrec :: Int -> ReadS BatchInferenceJob
Prelude.Read, Int -> BatchInferenceJob -> ShowS
[BatchInferenceJob] -> ShowS
BatchInferenceJob -> String
(Int -> BatchInferenceJob -> ShowS)
-> (BatchInferenceJob -> String)
-> ([BatchInferenceJob] -> ShowS)
-> Show BatchInferenceJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchInferenceJob] -> ShowS
$cshowList :: [BatchInferenceJob] -> ShowS
show :: BatchInferenceJob -> String
$cshow :: BatchInferenceJob -> String
showsPrec :: Int -> BatchInferenceJob -> ShowS
$cshowsPrec :: Int -> BatchInferenceJob -> ShowS
Prelude.Show, (forall x. BatchInferenceJob -> Rep BatchInferenceJob x)
-> (forall x. Rep BatchInferenceJob x -> BatchInferenceJob)
-> Generic BatchInferenceJob
forall x. Rep BatchInferenceJob x -> BatchInferenceJob
forall x. BatchInferenceJob -> Rep BatchInferenceJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchInferenceJob x -> BatchInferenceJob
$cfrom :: forall x. BatchInferenceJob -> Rep BatchInferenceJob x
Prelude.Generic)

-- |
-- Create a value of 'BatchInferenceJob' 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', 'batchInferenceJob_failureReason' - If the batch inference job failed, the reason for the failure.
--
-- 'status', 'batchInferenceJob_status' - The status of the batch inference job. The status is one of the
-- following values:
--
-- -   PENDING
--
-- -   IN PROGRESS
--
-- -   ACTIVE
--
-- -   CREATE FAILED
--
-- 'jobOutput', 'batchInferenceJob_jobOutput' - The Amazon S3 bucket that contains the output data generated by the
-- batch inference job.
--
-- 'jobName', 'batchInferenceJob_jobName' - The name of the batch inference job.
--
-- 'lastUpdatedDateTime', 'batchInferenceJob_lastUpdatedDateTime' - The time at which the batch inference job was last updated.
--
-- 'numResults', 'batchInferenceJob_numResults' - The number of recommendations generated by the batch inference job. This
-- number includes the error messages generated for failed input records.
--
-- 'batchInferenceJobConfig', 'batchInferenceJob_batchInferenceJobConfig' - A string to string map of the configuration details of a batch inference
-- job.
--
-- 'batchInferenceJobArn', 'batchInferenceJob_batchInferenceJobArn' - The Amazon Resource Name (ARN) of the batch inference job.
--
-- 'filterArn', 'batchInferenceJob_filterArn' - The ARN of the filter used on the batch inference job.
--
-- 'creationDateTime', 'batchInferenceJob_creationDateTime' - The time at which the batch inference job was created.
--
-- 'solutionVersionArn', 'batchInferenceJob_solutionVersionArn' - The Amazon Resource Name (ARN) of the solution version from which the
-- batch inference job was created.
--
-- 'roleArn', 'batchInferenceJob_roleArn' - The ARN of the Amazon Identity and Access Management (IAM) role that
-- requested the batch inference job.
--
-- 'jobInput', 'batchInferenceJob_jobInput' - The Amazon S3 path that leads to the input data used to generate the
-- batch inference job.
newBatchInferenceJob ::
  BatchInferenceJob
newBatchInferenceJob :: BatchInferenceJob
newBatchInferenceJob =
  BatchInferenceJob' :: Maybe Text
-> Maybe Text
-> Maybe BatchInferenceJobOutput
-> Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe BatchInferenceJobConfig
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe BatchInferenceJobInput
-> BatchInferenceJob
BatchInferenceJob'
    { $sel:failureReason:BatchInferenceJob' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:BatchInferenceJob' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobOutput:BatchInferenceJob' :: Maybe BatchInferenceJobOutput
jobOutput = Maybe BatchInferenceJobOutput
forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:BatchInferenceJob' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDateTime:BatchInferenceJob' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:numResults:BatchInferenceJob' :: Maybe Int
numResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:batchInferenceJobConfig:BatchInferenceJob' :: Maybe BatchInferenceJobConfig
batchInferenceJobConfig = Maybe BatchInferenceJobConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:batchInferenceJobArn:BatchInferenceJob' :: Maybe Text
batchInferenceJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:filterArn:BatchInferenceJob' :: Maybe Text
filterArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:BatchInferenceJob' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:solutionVersionArn:BatchInferenceJob' :: Maybe Text
solutionVersionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:BatchInferenceJob' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobInput:BatchInferenceJob' :: Maybe BatchInferenceJobInput
jobInput = Maybe BatchInferenceJobInput
forall a. Maybe a
Prelude.Nothing
    }

-- | If the batch inference job failed, the reason for the failure.
batchInferenceJob_failureReason :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.Text)
batchInferenceJob_failureReason :: (Maybe Text -> f (Maybe Text))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_failureReason = (BatchInferenceJob -> Maybe Text)
-> (BatchInferenceJob -> Maybe Text -> BatchInferenceJob)
-> Lens
     BatchInferenceJob BatchInferenceJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:BatchInferenceJob' :: BatchInferenceJob -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe Text
a -> BatchInferenceJob
s {$sel:failureReason:BatchInferenceJob' :: Maybe Text
failureReason = Maybe Text
a} :: BatchInferenceJob)

-- | The status of the batch inference job. The status is one of the
-- following values:
--
-- -   PENDING
--
-- -   IN PROGRESS
--
-- -   ACTIVE
--
-- -   CREATE FAILED
batchInferenceJob_status :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.Text)
batchInferenceJob_status :: (Maybe Text -> f (Maybe Text))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_status = (BatchInferenceJob -> Maybe Text)
-> (BatchInferenceJob -> Maybe Text -> BatchInferenceJob)
-> Lens
     BatchInferenceJob BatchInferenceJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe Text
status :: Maybe Text
$sel:status:BatchInferenceJob' :: BatchInferenceJob -> Maybe Text
status} -> Maybe Text
status) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe Text
a -> BatchInferenceJob
s {$sel:status:BatchInferenceJob' :: Maybe Text
status = Maybe Text
a} :: BatchInferenceJob)

-- | The Amazon S3 bucket that contains the output data generated by the
-- batch inference job.
batchInferenceJob_jobOutput :: Lens.Lens' BatchInferenceJob (Prelude.Maybe BatchInferenceJobOutput)
batchInferenceJob_jobOutput :: (Maybe BatchInferenceJobOutput
 -> f (Maybe BatchInferenceJobOutput))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_jobOutput = (BatchInferenceJob -> Maybe BatchInferenceJobOutput)
-> (BatchInferenceJob
    -> Maybe BatchInferenceJobOutput -> BatchInferenceJob)
-> Lens
     BatchInferenceJob
     BatchInferenceJob
     (Maybe BatchInferenceJobOutput)
     (Maybe BatchInferenceJobOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe BatchInferenceJobOutput
jobOutput :: Maybe BatchInferenceJobOutput
$sel:jobOutput:BatchInferenceJob' :: BatchInferenceJob -> Maybe BatchInferenceJobOutput
jobOutput} -> Maybe BatchInferenceJobOutput
jobOutput) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe BatchInferenceJobOutput
a -> BatchInferenceJob
s {$sel:jobOutput:BatchInferenceJob' :: Maybe BatchInferenceJobOutput
jobOutput = Maybe BatchInferenceJobOutput
a} :: BatchInferenceJob)

-- | The name of the batch inference job.
batchInferenceJob_jobName :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.Text)
batchInferenceJob_jobName :: (Maybe Text -> f (Maybe Text))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_jobName = (BatchInferenceJob -> Maybe Text)
-> (BatchInferenceJob -> Maybe Text -> BatchInferenceJob)
-> Lens
     BatchInferenceJob BatchInferenceJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:BatchInferenceJob' :: BatchInferenceJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe Text
a -> BatchInferenceJob
s {$sel:jobName:BatchInferenceJob' :: Maybe Text
jobName = Maybe Text
a} :: BatchInferenceJob)

-- | The time at which the batch inference job was last updated.
batchInferenceJob_lastUpdatedDateTime :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.UTCTime)
batchInferenceJob_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_lastUpdatedDateTime = (BatchInferenceJob -> Maybe POSIX)
-> (BatchInferenceJob -> Maybe POSIX -> BatchInferenceJob)
-> Lens
     BatchInferenceJob BatchInferenceJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:BatchInferenceJob' :: BatchInferenceJob -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe POSIX
a -> BatchInferenceJob
s {$sel:lastUpdatedDateTime:BatchInferenceJob' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: BatchInferenceJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> BatchInferenceJob -> f BatchInferenceJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BatchInferenceJob
-> f BatchInferenceJob
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 number of recommendations generated by the batch inference job. This
-- number includes the error messages generated for failed input records.
batchInferenceJob_numResults :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.Int)
batchInferenceJob_numResults :: (Maybe Int -> f (Maybe Int))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_numResults = (BatchInferenceJob -> Maybe Int)
-> (BatchInferenceJob -> Maybe Int -> BatchInferenceJob)
-> Lens BatchInferenceJob BatchInferenceJob (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe Int
numResults :: Maybe Int
$sel:numResults:BatchInferenceJob' :: BatchInferenceJob -> Maybe Int
numResults} -> Maybe Int
numResults) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe Int
a -> BatchInferenceJob
s {$sel:numResults:BatchInferenceJob' :: Maybe Int
numResults = Maybe Int
a} :: BatchInferenceJob)

-- | A string to string map of the configuration details of a batch inference
-- job.
batchInferenceJob_batchInferenceJobConfig :: Lens.Lens' BatchInferenceJob (Prelude.Maybe BatchInferenceJobConfig)
batchInferenceJob_batchInferenceJobConfig :: (Maybe BatchInferenceJobConfig
 -> f (Maybe BatchInferenceJobConfig))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_batchInferenceJobConfig = (BatchInferenceJob -> Maybe BatchInferenceJobConfig)
-> (BatchInferenceJob
    -> Maybe BatchInferenceJobConfig -> BatchInferenceJob)
-> Lens
     BatchInferenceJob
     BatchInferenceJob
     (Maybe BatchInferenceJobConfig)
     (Maybe BatchInferenceJobConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe BatchInferenceJobConfig
batchInferenceJobConfig :: Maybe BatchInferenceJobConfig
$sel:batchInferenceJobConfig:BatchInferenceJob' :: BatchInferenceJob -> Maybe BatchInferenceJobConfig
batchInferenceJobConfig} -> Maybe BatchInferenceJobConfig
batchInferenceJobConfig) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe BatchInferenceJobConfig
a -> BatchInferenceJob
s {$sel:batchInferenceJobConfig:BatchInferenceJob' :: Maybe BatchInferenceJobConfig
batchInferenceJobConfig = Maybe BatchInferenceJobConfig
a} :: BatchInferenceJob)

-- | The Amazon Resource Name (ARN) of the batch inference job.
batchInferenceJob_batchInferenceJobArn :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.Text)
batchInferenceJob_batchInferenceJobArn :: (Maybe Text -> f (Maybe Text))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_batchInferenceJobArn = (BatchInferenceJob -> Maybe Text)
-> (BatchInferenceJob -> Maybe Text -> BatchInferenceJob)
-> Lens
     BatchInferenceJob BatchInferenceJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe Text
batchInferenceJobArn :: Maybe Text
$sel:batchInferenceJobArn:BatchInferenceJob' :: BatchInferenceJob -> Maybe Text
batchInferenceJobArn} -> Maybe Text
batchInferenceJobArn) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe Text
a -> BatchInferenceJob
s {$sel:batchInferenceJobArn:BatchInferenceJob' :: Maybe Text
batchInferenceJobArn = Maybe Text
a} :: BatchInferenceJob)

-- | The ARN of the filter used on the batch inference job.
batchInferenceJob_filterArn :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.Text)
batchInferenceJob_filterArn :: (Maybe Text -> f (Maybe Text))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_filterArn = (BatchInferenceJob -> Maybe Text)
-> (BatchInferenceJob -> Maybe Text -> BatchInferenceJob)
-> Lens
     BatchInferenceJob BatchInferenceJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe Text
filterArn :: Maybe Text
$sel:filterArn:BatchInferenceJob' :: BatchInferenceJob -> Maybe Text
filterArn} -> Maybe Text
filterArn) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe Text
a -> BatchInferenceJob
s {$sel:filterArn:BatchInferenceJob' :: Maybe Text
filterArn = Maybe Text
a} :: BatchInferenceJob)

-- | The time at which the batch inference job was created.
batchInferenceJob_creationDateTime :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.UTCTime)
batchInferenceJob_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_creationDateTime = (BatchInferenceJob -> Maybe POSIX)
-> (BatchInferenceJob -> Maybe POSIX -> BatchInferenceJob)
-> Lens
     BatchInferenceJob BatchInferenceJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:BatchInferenceJob' :: BatchInferenceJob -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe POSIX
a -> BatchInferenceJob
s {$sel:creationDateTime:BatchInferenceJob' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: BatchInferenceJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> BatchInferenceJob -> f BatchInferenceJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BatchInferenceJob
-> f BatchInferenceJob
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 Amazon Resource Name (ARN) of the solution version from which the
-- batch inference job was created.
batchInferenceJob_solutionVersionArn :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.Text)
batchInferenceJob_solutionVersionArn :: (Maybe Text -> f (Maybe Text))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_solutionVersionArn = (BatchInferenceJob -> Maybe Text)
-> (BatchInferenceJob -> Maybe Text -> BatchInferenceJob)
-> Lens
     BatchInferenceJob BatchInferenceJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe Text
solutionVersionArn :: Maybe Text
$sel:solutionVersionArn:BatchInferenceJob' :: BatchInferenceJob -> Maybe Text
solutionVersionArn} -> Maybe Text
solutionVersionArn) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe Text
a -> BatchInferenceJob
s {$sel:solutionVersionArn:BatchInferenceJob' :: Maybe Text
solutionVersionArn = Maybe Text
a} :: BatchInferenceJob)

-- | The ARN of the Amazon Identity and Access Management (IAM) role that
-- requested the batch inference job.
batchInferenceJob_roleArn :: Lens.Lens' BatchInferenceJob (Prelude.Maybe Prelude.Text)
batchInferenceJob_roleArn :: (Maybe Text -> f (Maybe Text))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_roleArn = (BatchInferenceJob -> Maybe Text)
-> (BatchInferenceJob -> Maybe Text -> BatchInferenceJob)
-> Lens
     BatchInferenceJob BatchInferenceJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:BatchInferenceJob' :: BatchInferenceJob -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe Text
a -> BatchInferenceJob
s {$sel:roleArn:BatchInferenceJob' :: Maybe Text
roleArn = Maybe Text
a} :: BatchInferenceJob)

-- | The Amazon S3 path that leads to the input data used to generate the
-- batch inference job.
batchInferenceJob_jobInput :: Lens.Lens' BatchInferenceJob (Prelude.Maybe BatchInferenceJobInput)
batchInferenceJob_jobInput :: (Maybe BatchInferenceJobInput -> f (Maybe BatchInferenceJobInput))
-> BatchInferenceJob -> f BatchInferenceJob
batchInferenceJob_jobInput = (BatchInferenceJob -> Maybe BatchInferenceJobInput)
-> (BatchInferenceJob
    -> Maybe BatchInferenceJobInput -> BatchInferenceJob)
-> Lens
     BatchInferenceJob
     BatchInferenceJob
     (Maybe BatchInferenceJobInput)
     (Maybe BatchInferenceJobInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchInferenceJob' {Maybe BatchInferenceJobInput
jobInput :: Maybe BatchInferenceJobInput
$sel:jobInput:BatchInferenceJob' :: BatchInferenceJob -> Maybe BatchInferenceJobInput
jobInput} -> Maybe BatchInferenceJobInput
jobInput) (\s :: BatchInferenceJob
s@BatchInferenceJob' {} Maybe BatchInferenceJobInput
a -> BatchInferenceJob
s {$sel:jobInput:BatchInferenceJob' :: Maybe BatchInferenceJobInput
jobInput = Maybe BatchInferenceJobInput
a} :: BatchInferenceJob)

instance Core.FromJSON BatchInferenceJob where
  parseJSON :: Value -> Parser BatchInferenceJob
parseJSON =
    String
-> (Object -> Parser BatchInferenceJob)
-> Value
-> Parser BatchInferenceJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BatchInferenceJob"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe BatchInferenceJobOutput
-> Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe BatchInferenceJobConfig
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe BatchInferenceJobInput
-> BatchInferenceJob
BatchInferenceJob'
            (Maybe Text
 -> Maybe Text
 -> Maybe BatchInferenceJobOutput
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Int
 -> Maybe BatchInferenceJobConfig
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe BatchInferenceJobInput
 -> BatchInferenceJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe BatchInferenceJobOutput
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe BatchInferenceJobConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe BatchInferenceJobInput
      -> BatchInferenceJob)
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 BatchInferenceJobOutput
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe BatchInferenceJobConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe BatchInferenceJobInput
   -> BatchInferenceJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe BatchInferenceJobOutput
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe BatchInferenceJobConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe BatchInferenceJobInput
      -> BatchInferenceJob)
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
"status")
            Parser
  (Maybe BatchInferenceJobOutput
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe BatchInferenceJobConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe BatchInferenceJobInput
   -> BatchInferenceJob)
-> Parser (Maybe BatchInferenceJobOutput)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe BatchInferenceJobConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe BatchInferenceJobInput
      -> BatchInferenceJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BatchInferenceJobOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobOutput")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe BatchInferenceJobConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe BatchInferenceJobInput
   -> BatchInferenceJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Int
      -> Maybe BatchInferenceJobConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe BatchInferenceJobInput
      -> BatchInferenceJob)
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
"jobName")
            Parser
  (Maybe POSIX
   -> Maybe Int
   -> Maybe BatchInferenceJobConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe BatchInferenceJobInput
   -> BatchInferenceJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Int
      -> Maybe BatchInferenceJobConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe BatchInferenceJobInput
      -> BatchInferenceJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedDateTime")
            Parser
  (Maybe Int
   -> Maybe BatchInferenceJobConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe BatchInferenceJobInput
   -> BatchInferenceJob)
-> Parser (Maybe Int)
-> Parser
     (Maybe BatchInferenceJobConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe BatchInferenceJobInput
      -> BatchInferenceJob)
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
"numResults")
            Parser
  (Maybe BatchInferenceJobConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe BatchInferenceJobInput
   -> BatchInferenceJob)
-> Parser (Maybe BatchInferenceJobConfig)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe BatchInferenceJobInput
      -> BatchInferenceJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BatchInferenceJobConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"batchInferenceJobConfig")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe BatchInferenceJobInput
   -> BatchInferenceJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe BatchInferenceJobInput
      -> BatchInferenceJob)
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
"batchInferenceJobArn")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe BatchInferenceJobInput
   -> BatchInferenceJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe BatchInferenceJobInput
      -> BatchInferenceJob)
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
"filterArn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe BatchInferenceJobInput
   -> BatchInferenceJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe BatchInferenceJobInput -> BatchInferenceJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationDateTime")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe BatchInferenceJobInput -> BatchInferenceJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe BatchInferenceJobInput -> BatchInferenceJob)
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
"solutionVersionArn")
            Parser
  (Maybe Text -> Maybe BatchInferenceJobInput -> BatchInferenceJob)
-> Parser (Maybe Text)
-> Parser (Maybe BatchInferenceJobInput -> BatchInferenceJob)
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
"roleArn")
            Parser (Maybe BatchInferenceJobInput -> BatchInferenceJob)
-> Parser (Maybe BatchInferenceJobInput)
-> Parser BatchInferenceJob
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BatchInferenceJobInput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobInput")
      )

instance Prelude.Hashable BatchInferenceJob

instance Prelude.NFData BatchInferenceJob