{-# 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.MachineLearning.Types.BatchPrediction
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MachineLearning.Types.BatchPrediction where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MachineLearning.Types.EntityStatus
import qualified Amazonka.Prelude as Prelude

-- | Represents the output of a @GetBatchPrediction@ operation.
--
-- The content consists of the detailed metadata, the status, and the data
-- file information of a @Batch Prediction@.
--
-- /See:/ 'newBatchPrediction' smart constructor.
data BatchPrediction = BatchPrediction'
  { -- | The ID of the @DataSource@ that points to the group of observations to
    -- predict.
    BatchPrediction -> Maybe Text
batchPredictionDataSourceId :: Prelude.Maybe Prelude.Text,
    -- | The ID assigned to the @BatchPrediction@ at creation. This value should
    -- be identical to the value of the @BatchPredictionID@ in the request.
    BatchPrediction -> Maybe Text
batchPredictionId :: Prelude.Maybe Prelude.Text,
    BatchPrediction -> Maybe Integer
computeTime :: Prelude.Maybe Prelude.Integer,
    -- | The time that the @BatchPrediction@ was created. The time is expressed
    -- in epoch time.
    BatchPrediction -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | The AWS user account that invoked the @BatchPrediction@. The account
    -- type can be either an AWS root account or an AWS Identity and Access
    -- Management (IAM) user account.
    BatchPrediction -> Maybe Text
createdByIamUser :: Prelude.Maybe Prelude.Text,
    BatchPrediction -> Maybe POSIX
finishedAt :: Prelude.Maybe Data.POSIX,
    -- | The location of the data file or directory in Amazon Simple Storage
    -- Service (Amazon S3).
    BatchPrediction -> Maybe Text
inputDataLocationS3 :: Prelude.Maybe Prelude.Text,
    BatchPrediction -> Maybe Integer
invalidRecordCount :: Prelude.Maybe Prelude.Integer,
    -- | The time of the most recent edit to the @BatchPrediction@. The time is
    -- expressed in epoch time.
    BatchPrediction -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Data.POSIX,
    -- | The ID of the @MLModel@ that generated predictions for the
    -- @BatchPrediction@ request.
    BatchPrediction -> Maybe Text
mLModelId :: Prelude.Maybe Prelude.Text,
    -- | A description of the most recent details about processing the batch
    -- prediction request.
    BatchPrediction -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | A user-supplied name or description of the @BatchPrediction@.
    BatchPrediction -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The location of an Amazon S3 bucket or directory to receive the
    -- operation results. The following substrings are not allowed in the
    -- @s3 key@ portion of the @outputURI@ field: \':\', \'\/\/\', \'\/.\/\',
    -- \'\/..\/\'.
    BatchPrediction -> Maybe Text
outputUri :: Prelude.Maybe Prelude.Text,
    BatchPrediction -> Maybe POSIX
startedAt :: Prelude.Maybe Data.POSIX,
    -- | The status of the @BatchPrediction@. This element can have one of the
    -- following values:
    --
    -- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
    --     to generate predictions for a batch of observations.
    --
    -- -   @INPROGRESS@ - The process is underway.
    --
    -- -   @FAILED@ - The request to perform a batch prediction did not run to
    --     completion. It is not usable.
    --
    -- -   @COMPLETED@ - The batch prediction process completed successfully.
    --
    -- -   @DELETED@ - The @BatchPrediction@ is marked as deleted. It is not
    --     usable.
    BatchPrediction -> Maybe EntityStatus
status :: Prelude.Maybe EntityStatus,
    BatchPrediction -> Maybe Integer
totalRecordCount :: Prelude.Maybe Prelude.Integer
  }
  deriving (BatchPrediction -> BatchPrediction -> Bool
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]
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
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. 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:
--
-- 'batchPredictionDataSourceId', 'batchPrediction_batchPredictionDataSourceId' - The ID of the @DataSource@ that points to the group of observations to
-- predict.
--
-- 'batchPredictionId', 'batchPrediction_batchPredictionId' - The ID assigned to the @BatchPrediction@ at creation. This value should
-- be identical to the value of the @BatchPredictionID@ in the request.
--
-- 'computeTime', 'batchPrediction_computeTime' - Undocumented member.
--
-- 'createdAt', 'batchPrediction_createdAt' - The time that the @BatchPrediction@ was created. The time is expressed
-- in epoch time.
--
-- 'createdByIamUser', 'batchPrediction_createdByIamUser' - The AWS user account that invoked the @BatchPrediction@. The account
-- type can be either an AWS root account or an AWS Identity and Access
-- Management (IAM) user account.
--
-- 'finishedAt', 'batchPrediction_finishedAt' - Undocumented member.
--
-- 'inputDataLocationS3', 'batchPrediction_inputDataLocationS3' - The location of the data file or directory in Amazon Simple Storage
-- Service (Amazon S3).
--
-- 'invalidRecordCount', 'batchPrediction_invalidRecordCount' - Undocumented member.
--
-- 'lastUpdatedAt', 'batchPrediction_lastUpdatedAt' - The time of the most recent edit to the @BatchPrediction@. The time is
-- expressed in epoch time.
--
-- 'mLModelId', 'batchPrediction_mLModelId' - The ID of the @MLModel@ that generated predictions for the
-- @BatchPrediction@ request.
--
-- 'message', 'batchPrediction_message' - A description of the most recent details about processing the batch
-- prediction request.
--
-- 'name', 'batchPrediction_name' - A user-supplied name or description of the @BatchPrediction@.
--
-- 'outputUri', 'batchPrediction_outputUri' - The location of an Amazon S3 bucket or directory to receive the
-- operation results. The following substrings are not allowed in the
-- @s3 key@ portion of the @outputURI@ field: \':\', \'\/\/\', \'\/.\/\',
-- \'\/..\/\'.
--
-- 'startedAt', 'batchPrediction_startedAt' - Undocumented member.
--
-- 'status', 'batchPrediction_status' - The status of the @BatchPrediction@. This element can have one of the
-- following values:
--
-- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
--     to generate predictions for a batch of observations.
--
-- -   @INPROGRESS@ - The process is underway.
--
-- -   @FAILED@ - The request to perform a batch prediction did not run to
--     completion. It is not usable.
--
-- -   @COMPLETED@ - The batch prediction process completed successfully.
--
-- -   @DELETED@ - The @BatchPrediction@ is marked as deleted. It is not
--     usable.
--
-- 'totalRecordCount', 'batchPrediction_totalRecordCount' - Undocumented member.
newBatchPrediction ::
  BatchPrediction
newBatchPrediction :: BatchPrediction
newBatchPrediction =
  BatchPrediction'
    { $sel:batchPredictionDataSourceId:BatchPrediction' :: Maybe Text
batchPredictionDataSourceId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:batchPredictionId:BatchPrediction' :: Maybe Text
batchPredictionId = forall a. Maybe a
Prelude.Nothing,
      $sel:computeTime:BatchPrediction' :: Maybe Integer
computeTime = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:BatchPrediction' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:createdByIamUser:BatchPrediction' :: Maybe Text
createdByIamUser = forall a. Maybe a
Prelude.Nothing,
      $sel:finishedAt:BatchPrediction' :: Maybe POSIX
finishedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataLocationS3:BatchPrediction' :: Maybe Text
inputDataLocationS3 = forall a. Maybe a
Prelude.Nothing,
      $sel:invalidRecordCount:BatchPrediction' :: Maybe Integer
invalidRecordCount = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:BatchPrediction' :: Maybe POSIX
lastUpdatedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:mLModelId:BatchPrediction' :: Maybe Text
mLModelId = forall a. Maybe a
Prelude.Nothing,
      $sel:message:BatchPrediction' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
      $sel:name:BatchPrediction' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:outputUri:BatchPrediction' :: Maybe Text
outputUri = forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:BatchPrediction' :: Maybe POSIX
startedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:status:BatchPrediction' :: Maybe EntityStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:totalRecordCount:BatchPrediction' :: Maybe Integer
totalRecordCount = forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the @DataSource@ that points to the group of observations to
-- predict.
batchPrediction_batchPredictionDataSourceId :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_batchPredictionDataSourceId :: Lens' BatchPrediction (Maybe Text)
batchPrediction_batchPredictionDataSourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
batchPredictionDataSourceId :: Maybe Text
$sel:batchPredictionDataSourceId:BatchPrediction' :: BatchPrediction -> Maybe Text
batchPredictionDataSourceId} -> Maybe Text
batchPredictionDataSourceId) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:batchPredictionDataSourceId:BatchPrediction' :: Maybe Text
batchPredictionDataSourceId = Maybe Text
a} :: BatchPrediction)

-- | The ID assigned to the @BatchPrediction@ at creation. This value should
-- be identical to the value of the @BatchPredictionID@ in the request.
batchPrediction_batchPredictionId :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_batchPredictionId :: Lens' BatchPrediction (Maybe Text)
batchPrediction_batchPredictionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
batchPredictionId :: Maybe Text
$sel:batchPredictionId:BatchPrediction' :: BatchPrediction -> Maybe Text
batchPredictionId} -> Maybe Text
batchPredictionId) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:batchPredictionId:BatchPrediction' :: Maybe Text
batchPredictionId = Maybe Text
a} :: BatchPrediction)

-- | Undocumented member.
batchPrediction_computeTime :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Integer)
batchPrediction_computeTime :: Lens' BatchPrediction (Maybe Integer)
batchPrediction_computeTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Integer
computeTime :: Maybe Integer
$sel:computeTime:BatchPrediction' :: BatchPrediction -> Maybe Integer
computeTime} -> Maybe Integer
computeTime) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Integer
a -> BatchPrediction
s {$sel:computeTime:BatchPrediction' :: Maybe Integer
computeTime = Maybe Integer
a} :: BatchPrediction)

-- | The time that the @BatchPrediction@ was created. The time is expressed
-- in epoch time.
batchPrediction_createdAt :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.UTCTime)
batchPrediction_createdAt :: Lens' BatchPrediction (Maybe UTCTime)
batchPrediction_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe POSIX
a -> BatchPrediction
s {$sel:createdAt:BatchPrediction' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: BatchPrediction) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The AWS user account that invoked the @BatchPrediction@. The account
-- type can be either an AWS root account or an AWS Identity and Access
-- Management (IAM) user account.
batchPrediction_createdByIamUser :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_createdByIamUser :: Lens' BatchPrediction (Maybe Text)
batchPrediction_createdByIamUser = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
createdByIamUser :: Maybe Text
$sel:createdByIamUser:BatchPrediction' :: BatchPrediction -> Maybe Text
createdByIamUser} -> Maybe Text
createdByIamUser) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:createdByIamUser:BatchPrediction' :: Maybe Text
createdByIamUser = Maybe Text
a} :: BatchPrediction)

-- | Undocumented member.
batchPrediction_finishedAt :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.UTCTime)
batchPrediction_finishedAt :: Lens' BatchPrediction (Maybe UTCTime)
batchPrediction_finishedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe POSIX
finishedAt :: Maybe POSIX
$sel:finishedAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
finishedAt} -> Maybe POSIX
finishedAt) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe POSIX
a -> BatchPrediction
s {$sel:finishedAt:BatchPrediction' :: Maybe POSIX
finishedAt = Maybe POSIX
a} :: BatchPrediction) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The location of the data file or directory in Amazon Simple Storage
-- Service (Amazon S3).
batchPrediction_inputDataLocationS3 :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_inputDataLocationS3 :: Lens' BatchPrediction (Maybe Text)
batchPrediction_inputDataLocationS3 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
inputDataLocationS3 :: Maybe Text
$sel:inputDataLocationS3:BatchPrediction' :: BatchPrediction -> Maybe Text
inputDataLocationS3} -> Maybe Text
inputDataLocationS3) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:inputDataLocationS3:BatchPrediction' :: Maybe Text
inputDataLocationS3 = Maybe Text
a} :: BatchPrediction)

-- | Undocumented member.
batchPrediction_invalidRecordCount :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Integer)
batchPrediction_invalidRecordCount :: Lens' BatchPrediction (Maybe Integer)
batchPrediction_invalidRecordCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Integer
invalidRecordCount :: Maybe Integer
$sel:invalidRecordCount:BatchPrediction' :: BatchPrediction -> Maybe Integer
invalidRecordCount} -> Maybe Integer
invalidRecordCount) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Integer
a -> BatchPrediction
s {$sel:invalidRecordCount:BatchPrediction' :: Maybe Integer
invalidRecordCount = Maybe Integer
a} :: BatchPrediction)

-- | The time of the most recent edit to the @BatchPrediction@. The time is
-- expressed in epoch time.
batchPrediction_lastUpdatedAt :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.UTCTime)
batchPrediction_lastUpdatedAt :: Lens' BatchPrediction (Maybe UTCTime)
batchPrediction_lastUpdatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe POSIX
a -> BatchPrediction
s {$sel:lastUpdatedAt:BatchPrediction' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: BatchPrediction) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The ID of the @MLModel@ that generated predictions for the
-- @BatchPrediction@ request.
batchPrediction_mLModelId :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_mLModelId :: Lens' BatchPrediction (Maybe Text)
batchPrediction_mLModelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
mLModelId :: Maybe Text
$sel:mLModelId:BatchPrediction' :: BatchPrediction -> Maybe Text
mLModelId} -> Maybe Text
mLModelId) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:mLModelId:BatchPrediction' :: Maybe Text
mLModelId = Maybe Text
a} :: BatchPrediction)

-- | A description of the most recent details about processing the batch
-- prediction request.
batchPrediction_message :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_message :: Lens' BatchPrediction (Maybe Text)
batchPrediction_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
message :: Maybe Text
$sel:message:BatchPrediction' :: BatchPrediction -> Maybe Text
message} -> Maybe Text
message) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:message:BatchPrediction' :: Maybe Text
message = Maybe Text
a} :: BatchPrediction)

-- | A user-supplied name or description of the @BatchPrediction@.
batchPrediction_name :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_name :: Lens' BatchPrediction (Maybe Text)
batchPrediction_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
name :: Maybe Text
$sel:name:BatchPrediction' :: BatchPrediction -> Maybe Text
name} -> Maybe Text
name) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:name:BatchPrediction' :: Maybe Text
name = Maybe Text
a} :: BatchPrediction)

-- | The location of an Amazon S3 bucket or directory to receive the
-- operation results. The following substrings are not allowed in the
-- @s3 key@ portion of the @outputURI@ field: \':\', \'\/\/\', \'\/.\/\',
-- \'\/..\/\'.
batchPrediction_outputUri :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Text)
batchPrediction_outputUri :: Lens' BatchPrediction (Maybe Text)
batchPrediction_outputUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Text
outputUri :: Maybe Text
$sel:outputUri:BatchPrediction' :: BatchPrediction -> Maybe Text
outputUri} -> Maybe Text
outputUri) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Text
a -> BatchPrediction
s {$sel:outputUri:BatchPrediction' :: Maybe Text
outputUri = Maybe Text
a} :: BatchPrediction)

-- | Undocumented member.
batchPrediction_startedAt :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.UTCTime)
batchPrediction_startedAt :: Lens' BatchPrediction (Maybe UTCTime)
batchPrediction_startedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe POSIX
startedAt :: Maybe POSIX
$sel:startedAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
startedAt} -> Maybe POSIX
startedAt) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe POSIX
a -> BatchPrediction
s {$sel:startedAt:BatchPrediction' :: Maybe POSIX
startedAt = Maybe POSIX
a} :: BatchPrediction) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The status of the @BatchPrediction@. This element can have one of the
-- following values:
--
-- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
--     to generate predictions for a batch of observations.
--
-- -   @INPROGRESS@ - The process is underway.
--
-- -   @FAILED@ - The request to perform a batch prediction did not run to
--     completion. It is not usable.
--
-- -   @COMPLETED@ - The batch prediction process completed successfully.
--
-- -   @DELETED@ - The @BatchPrediction@ is marked as deleted. It is not
--     usable.
batchPrediction_status :: Lens.Lens' BatchPrediction (Prelude.Maybe EntityStatus)
batchPrediction_status :: Lens' BatchPrediction (Maybe EntityStatus)
batchPrediction_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe EntityStatus
status :: Maybe EntityStatus
$sel:status:BatchPrediction' :: BatchPrediction -> Maybe EntityStatus
status} -> Maybe EntityStatus
status) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe EntityStatus
a -> BatchPrediction
s {$sel:status:BatchPrediction' :: Maybe EntityStatus
status = Maybe EntityStatus
a} :: BatchPrediction)

-- | Undocumented member.
batchPrediction_totalRecordCount :: Lens.Lens' BatchPrediction (Prelude.Maybe Prelude.Integer)
batchPrediction_totalRecordCount :: Lens' BatchPrediction (Maybe Integer)
batchPrediction_totalRecordCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPrediction' {Maybe Integer
totalRecordCount :: Maybe Integer
$sel:totalRecordCount:BatchPrediction' :: BatchPrediction -> Maybe Integer
totalRecordCount} -> Maybe Integer
totalRecordCount) (\s :: BatchPrediction
s@BatchPrediction' {} Maybe Integer
a -> BatchPrediction
s {$sel:totalRecordCount:BatchPrediction' :: Maybe Integer
totalRecordCount = Maybe Integer
a} :: BatchPrediction)

instance Data.FromJSON BatchPrediction where
  parseJSON :: Value -> Parser BatchPrediction
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BatchPrediction"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe EntityStatus
-> Maybe Integer
-> BatchPrediction
BatchPrediction'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BatchPredictionDataSourceId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BatchPredictionId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ComputeTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreatedByIamUser")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FinishedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InputDataLocationS3")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InvalidRecordCount")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastUpdatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MLModelId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Message")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OutputUri")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StartedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TotalRecordCount")
      )

instance Prelude.Hashable BatchPrediction where
  hashWithSalt :: Int -> BatchPrediction -> Int
hashWithSalt Int
_salt BatchPrediction' {Maybe Integer
Maybe Text
Maybe POSIX
Maybe EntityStatus
totalRecordCount :: Maybe Integer
status :: Maybe EntityStatus
startedAt :: Maybe POSIX
outputUri :: Maybe Text
name :: Maybe Text
message :: Maybe Text
mLModelId :: Maybe Text
lastUpdatedAt :: Maybe POSIX
invalidRecordCount :: Maybe Integer
inputDataLocationS3 :: Maybe Text
finishedAt :: Maybe POSIX
createdByIamUser :: Maybe Text
createdAt :: Maybe POSIX
computeTime :: Maybe Integer
batchPredictionId :: Maybe Text
batchPredictionDataSourceId :: Maybe Text
$sel:totalRecordCount:BatchPrediction' :: BatchPrediction -> Maybe Integer
$sel:status:BatchPrediction' :: BatchPrediction -> Maybe EntityStatus
$sel:startedAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
$sel:outputUri:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:name:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:message:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:mLModelId:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:lastUpdatedAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
$sel:invalidRecordCount:BatchPrediction' :: BatchPrediction -> Maybe Integer
$sel:inputDataLocationS3:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:finishedAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
$sel:createdByIamUser:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:createdAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
$sel:computeTime:BatchPrediction' :: BatchPrediction -> Maybe Integer
$sel:batchPredictionId:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:batchPredictionDataSourceId:BatchPrediction' :: BatchPrediction -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
batchPredictionDataSourceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
batchPredictionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
computeTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createdByIamUser
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
finishedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
inputDataLocationS3
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
invalidRecordCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
mLModelId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputUri
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EntityStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
totalRecordCount

instance Prelude.NFData BatchPrediction where
  rnf :: BatchPrediction -> ()
rnf BatchPrediction' {Maybe Integer
Maybe Text
Maybe POSIX
Maybe EntityStatus
totalRecordCount :: Maybe Integer
status :: Maybe EntityStatus
startedAt :: Maybe POSIX
outputUri :: Maybe Text
name :: Maybe Text
message :: Maybe Text
mLModelId :: Maybe Text
lastUpdatedAt :: Maybe POSIX
invalidRecordCount :: Maybe Integer
inputDataLocationS3 :: Maybe Text
finishedAt :: Maybe POSIX
createdByIamUser :: Maybe Text
createdAt :: Maybe POSIX
computeTime :: Maybe Integer
batchPredictionId :: Maybe Text
batchPredictionDataSourceId :: Maybe Text
$sel:totalRecordCount:BatchPrediction' :: BatchPrediction -> Maybe Integer
$sel:status:BatchPrediction' :: BatchPrediction -> Maybe EntityStatus
$sel:startedAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
$sel:outputUri:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:name:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:message:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:mLModelId:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:lastUpdatedAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
$sel:invalidRecordCount:BatchPrediction' :: BatchPrediction -> Maybe Integer
$sel:inputDataLocationS3:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:finishedAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
$sel:createdByIamUser:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:createdAt:BatchPrediction' :: BatchPrediction -> Maybe POSIX
$sel:computeTime:BatchPrediction' :: BatchPrediction -> Maybe Integer
$sel:batchPredictionId:BatchPrediction' :: BatchPrediction -> Maybe Text
$sel:batchPredictionDataSourceId:BatchPrediction' :: BatchPrediction -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
batchPredictionDataSourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
batchPredictionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
computeTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdByIamUser
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
finishedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
inputDataLocationS3
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
invalidRecordCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mLModelId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EntityStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
totalRecordCount