{-# 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.Evaluation
-- 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.Evaluation 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 Amazonka.MachineLearning.Types.PerformanceMetrics
import qualified Amazonka.Prelude as Prelude

-- | Represents the output of @GetEvaluation@ operation.
--
-- The content consists of the detailed metadata and data file information
-- and the current status of the @Evaluation@.
--
-- /See:/ 'newEvaluation' smart constructor.
data Evaluation = Evaluation'
  { Evaluation -> Maybe Integer
computeTime :: Prelude.Maybe Prelude.Integer,
    -- | The time that the @Evaluation@ was created. The time is expressed in
    -- epoch time.
    Evaluation -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | The AWS user account that invoked the evaluation. The account type can
    -- be either an AWS root account or an AWS Identity and Access Management
    -- (IAM) user account.
    Evaluation -> Maybe Text
createdByIamUser :: Prelude.Maybe Prelude.Text,
    -- | The ID of the @DataSource@ that is used to evaluate the @MLModel@.
    Evaluation -> Maybe Text
evaluationDataSourceId :: Prelude.Maybe Prelude.Text,
    -- | The ID that is assigned to the @Evaluation@ at creation.
    Evaluation -> Maybe Text
evaluationId :: Prelude.Maybe Prelude.Text,
    Evaluation -> Maybe POSIX
finishedAt :: Prelude.Maybe Data.POSIX,
    -- | The location and name of the data in Amazon Simple Storage Server
    -- (Amazon S3) that is used in the evaluation.
    Evaluation -> Maybe Text
inputDataLocationS3 :: Prelude.Maybe Prelude.Text,
    -- | The time of the most recent edit to the @Evaluation@. The time is
    -- expressed in epoch time.
    Evaluation -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Data.POSIX,
    -- | The ID of the @MLModel@ that is the focus of the evaluation.
    Evaluation -> Maybe Text
mLModelId :: Prelude.Maybe Prelude.Text,
    -- | A description of the most recent details about evaluating the @MLModel@.
    Evaluation -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | A user-supplied name or description of the @Evaluation@.
    Evaluation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Measurements of how well the @MLModel@ performed, using observations
    -- referenced by the @DataSource@. One of the following metrics is
    -- returned, based on the type of the @MLModel@:
    --
    -- -   BinaryAUC: A binary @MLModel@ uses the Area Under the Curve (AUC)
    --     technique to measure performance.
    --
    -- -   RegressionRMSE: A regression @MLModel@ uses the Root Mean Square
    --     Error (RMSE) technique to measure performance. RMSE measures the
    --     difference between predicted and actual values for a single
    --     variable.
    --
    -- -   MulticlassAvgFScore: A multiclass @MLModel@ uses the F1 score
    --     technique to measure performance.
    --
    -- For more information about performance metrics, please see the
    -- <https://docs.aws.amazon.com/machine-learning/latest/dg Amazon Machine Learning Developer Guide>.
    Evaluation -> Maybe PerformanceMetrics
performanceMetrics :: Prelude.Maybe PerformanceMetrics,
    Evaluation -> Maybe POSIX
startedAt :: Prelude.Maybe Data.POSIX,
    -- | The status of the evaluation. This element can have one of the following
    -- values:
    --
    -- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
    --     to evaluate an @MLModel@.
    --
    -- -   @INPROGRESS@ - The evaluation is underway.
    --
    -- -   @FAILED@ - The request to evaluate an @MLModel@ did not run to
    --     completion. It is not usable.
    --
    -- -   @COMPLETED@ - The evaluation process completed successfully.
    --
    -- -   @DELETED@ - The @Evaluation@ is marked as deleted. It is not usable.
    Evaluation -> Maybe EntityStatus
status :: Prelude.Maybe EntityStatus
  }
  deriving (Evaluation -> Evaluation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Evaluation -> Evaluation -> Bool
$c/= :: Evaluation -> Evaluation -> Bool
== :: Evaluation -> Evaluation -> Bool
$c== :: Evaluation -> Evaluation -> Bool
Prelude.Eq, ReadPrec [Evaluation]
ReadPrec Evaluation
Int -> ReadS Evaluation
ReadS [Evaluation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Evaluation]
$creadListPrec :: ReadPrec [Evaluation]
readPrec :: ReadPrec Evaluation
$creadPrec :: ReadPrec Evaluation
readList :: ReadS [Evaluation]
$creadList :: ReadS [Evaluation]
readsPrec :: Int -> ReadS Evaluation
$creadsPrec :: Int -> ReadS Evaluation
Prelude.Read, Int -> Evaluation -> ShowS
[Evaluation] -> ShowS
Evaluation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Evaluation] -> ShowS
$cshowList :: [Evaluation] -> ShowS
show :: Evaluation -> String
$cshow :: Evaluation -> String
showsPrec :: Int -> Evaluation -> ShowS
$cshowsPrec :: Int -> Evaluation -> ShowS
Prelude.Show, forall x. Rep Evaluation x -> Evaluation
forall x. Evaluation -> Rep Evaluation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Evaluation x -> Evaluation
$cfrom :: forall x. Evaluation -> Rep Evaluation x
Prelude.Generic)

-- |
-- Create a value of 'Evaluation' 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:
--
-- 'computeTime', 'evaluation_computeTime' - Undocumented member.
--
-- 'createdAt', 'evaluation_createdAt' - The time that the @Evaluation@ was created. The time is expressed in
-- epoch time.
--
-- 'createdByIamUser', 'evaluation_createdByIamUser' - The AWS user account that invoked the evaluation. The account type can
-- be either an AWS root account or an AWS Identity and Access Management
-- (IAM) user account.
--
-- 'evaluationDataSourceId', 'evaluation_evaluationDataSourceId' - The ID of the @DataSource@ that is used to evaluate the @MLModel@.
--
-- 'evaluationId', 'evaluation_evaluationId' - The ID that is assigned to the @Evaluation@ at creation.
--
-- 'finishedAt', 'evaluation_finishedAt' - Undocumented member.
--
-- 'inputDataLocationS3', 'evaluation_inputDataLocationS3' - The location and name of the data in Amazon Simple Storage Server
-- (Amazon S3) that is used in the evaluation.
--
-- 'lastUpdatedAt', 'evaluation_lastUpdatedAt' - The time of the most recent edit to the @Evaluation@. The time is
-- expressed in epoch time.
--
-- 'mLModelId', 'evaluation_mLModelId' - The ID of the @MLModel@ that is the focus of the evaluation.
--
-- 'message', 'evaluation_message' - A description of the most recent details about evaluating the @MLModel@.
--
-- 'name', 'evaluation_name' - A user-supplied name or description of the @Evaluation@.
--
-- 'performanceMetrics', 'evaluation_performanceMetrics' - Measurements of how well the @MLModel@ performed, using observations
-- referenced by the @DataSource@. One of the following metrics is
-- returned, based on the type of the @MLModel@:
--
-- -   BinaryAUC: A binary @MLModel@ uses the Area Under the Curve (AUC)
--     technique to measure performance.
--
-- -   RegressionRMSE: A regression @MLModel@ uses the Root Mean Square
--     Error (RMSE) technique to measure performance. RMSE measures the
--     difference between predicted and actual values for a single
--     variable.
--
-- -   MulticlassAvgFScore: A multiclass @MLModel@ uses the F1 score
--     technique to measure performance.
--
-- For more information about performance metrics, please see the
-- <https://docs.aws.amazon.com/machine-learning/latest/dg Amazon Machine Learning Developer Guide>.
--
-- 'startedAt', 'evaluation_startedAt' - Undocumented member.
--
-- 'status', 'evaluation_status' - The status of the evaluation. This element can have one of the following
-- values:
--
-- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
--     to evaluate an @MLModel@.
--
-- -   @INPROGRESS@ - The evaluation is underway.
--
-- -   @FAILED@ - The request to evaluate an @MLModel@ did not run to
--     completion. It is not usable.
--
-- -   @COMPLETED@ - The evaluation process completed successfully.
--
-- -   @DELETED@ - The @Evaluation@ is marked as deleted. It is not usable.
newEvaluation ::
  Evaluation
newEvaluation :: Evaluation
newEvaluation =
  Evaluation'
    { $sel:computeTime:Evaluation' :: Maybe Integer
computeTime = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Evaluation' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:createdByIamUser:Evaluation' :: Maybe Text
createdByIamUser = forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationDataSourceId:Evaluation' :: Maybe Text
evaluationDataSourceId = forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationId:Evaluation' :: Maybe Text
evaluationId = forall a. Maybe a
Prelude.Nothing,
      $sel:finishedAt:Evaluation' :: Maybe POSIX
finishedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataLocationS3:Evaluation' :: Maybe Text
inputDataLocationS3 = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:Evaluation' :: Maybe POSIX
lastUpdatedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:mLModelId:Evaluation' :: Maybe Text
mLModelId = forall a. Maybe a
Prelude.Nothing,
      $sel:message:Evaluation' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
      $sel:name:Evaluation' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:performanceMetrics:Evaluation' :: Maybe PerformanceMetrics
performanceMetrics = forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:Evaluation' :: Maybe POSIX
startedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:status:Evaluation' :: Maybe EntityStatus
status = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The time that the @Evaluation@ was created. The time is expressed in
-- epoch time.
evaluation_createdAt :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.UTCTime)
evaluation_createdAt :: Lens' Evaluation (Maybe UTCTime)
evaluation_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Evaluation' :: Evaluation -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Evaluation
s@Evaluation' {} Maybe POSIX
a -> Evaluation
s {$sel:createdAt:Evaluation' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Evaluation) 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 evaluation. The account type can
-- be either an AWS root account or an AWS Identity and Access Management
-- (IAM) user account.
evaluation_createdByIamUser :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_createdByIamUser :: Lens' Evaluation (Maybe Text)
evaluation_createdByIamUser = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe Text
createdByIamUser :: Maybe Text
$sel:createdByIamUser:Evaluation' :: Evaluation -> Maybe Text
createdByIamUser} -> Maybe Text
createdByIamUser) (\s :: Evaluation
s@Evaluation' {} Maybe Text
a -> Evaluation
s {$sel:createdByIamUser:Evaluation' :: Maybe Text
createdByIamUser = Maybe Text
a} :: Evaluation)

-- | The ID of the @DataSource@ that is used to evaluate the @MLModel@.
evaluation_evaluationDataSourceId :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_evaluationDataSourceId :: Lens' Evaluation (Maybe Text)
evaluation_evaluationDataSourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe Text
evaluationDataSourceId :: Maybe Text
$sel:evaluationDataSourceId:Evaluation' :: Evaluation -> Maybe Text
evaluationDataSourceId} -> Maybe Text
evaluationDataSourceId) (\s :: Evaluation
s@Evaluation' {} Maybe Text
a -> Evaluation
s {$sel:evaluationDataSourceId:Evaluation' :: Maybe Text
evaluationDataSourceId = Maybe Text
a} :: Evaluation)

-- | The ID that is assigned to the @Evaluation@ at creation.
evaluation_evaluationId :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_evaluationId :: Lens' Evaluation (Maybe Text)
evaluation_evaluationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe Text
evaluationId :: Maybe Text
$sel:evaluationId:Evaluation' :: Evaluation -> Maybe Text
evaluationId} -> Maybe Text
evaluationId) (\s :: Evaluation
s@Evaluation' {} Maybe Text
a -> Evaluation
s {$sel:evaluationId:Evaluation' :: Maybe Text
evaluationId = Maybe Text
a} :: Evaluation)

-- | Undocumented member.
evaluation_finishedAt :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.UTCTime)
evaluation_finishedAt :: Lens' Evaluation (Maybe UTCTime)
evaluation_finishedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe POSIX
finishedAt :: Maybe POSIX
$sel:finishedAt:Evaluation' :: Evaluation -> Maybe POSIX
finishedAt} -> Maybe POSIX
finishedAt) (\s :: Evaluation
s@Evaluation' {} Maybe POSIX
a -> Evaluation
s {$sel:finishedAt:Evaluation' :: Maybe POSIX
finishedAt = Maybe POSIX
a} :: Evaluation) 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 and name of the data in Amazon Simple Storage Server
-- (Amazon S3) that is used in the evaluation.
evaluation_inputDataLocationS3 :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_inputDataLocationS3 :: Lens' Evaluation (Maybe Text)
evaluation_inputDataLocationS3 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe Text
inputDataLocationS3 :: Maybe Text
$sel:inputDataLocationS3:Evaluation' :: Evaluation -> Maybe Text
inputDataLocationS3} -> Maybe Text
inputDataLocationS3) (\s :: Evaluation
s@Evaluation' {} Maybe Text
a -> Evaluation
s {$sel:inputDataLocationS3:Evaluation' :: Maybe Text
inputDataLocationS3 = Maybe Text
a} :: Evaluation)

-- | The time of the most recent edit to the @Evaluation@. The time is
-- expressed in epoch time.
evaluation_lastUpdatedAt :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.UTCTime)
evaluation_lastUpdatedAt :: Lens' Evaluation (Maybe UTCTime)
evaluation_lastUpdatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:Evaluation' :: Evaluation -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: Evaluation
s@Evaluation' {} Maybe POSIX
a -> Evaluation
s {$sel:lastUpdatedAt:Evaluation' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: Evaluation) 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 is the focus of the evaluation.
evaluation_mLModelId :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_mLModelId :: Lens' Evaluation (Maybe Text)
evaluation_mLModelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe Text
mLModelId :: Maybe Text
$sel:mLModelId:Evaluation' :: Evaluation -> Maybe Text
mLModelId} -> Maybe Text
mLModelId) (\s :: Evaluation
s@Evaluation' {} Maybe Text
a -> Evaluation
s {$sel:mLModelId:Evaluation' :: Maybe Text
mLModelId = Maybe Text
a} :: Evaluation)

-- | A description of the most recent details about evaluating the @MLModel@.
evaluation_message :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_message :: Lens' Evaluation (Maybe Text)
evaluation_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe Text
message :: Maybe Text
$sel:message:Evaluation' :: Evaluation -> Maybe Text
message} -> Maybe Text
message) (\s :: Evaluation
s@Evaluation' {} Maybe Text
a -> Evaluation
s {$sel:message:Evaluation' :: Maybe Text
message = Maybe Text
a} :: Evaluation)

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

-- | Measurements of how well the @MLModel@ performed, using observations
-- referenced by the @DataSource@. One of the following metrics is
-- returned, based on the type of the @MLModel@:
--
-- -   BinaryAUC: A binary @MLModel@ uses the Area Under the Curve (AUC)
--     technique to measure performance.
--
-- -   RegressionRMSE: A regression @MLModel@ uses the Root Mean Square
--     Error (RMSE) technique to measure performance. RMSE measures the
--     difference between predicted and actual values for a single
--     variable.
--
-- -   MulticlassAvgFScore: A multiclass @MLModel@ uses the F1 score
--     technique to measure performance.
--
-- For more information about performance metrics, please see the
-- <https://docs.aws.amazon.com/machine-learning/latest/dg Amazon Machine Learning Developer Guide>.
evaluation_performanceMetrics :: Lens.Lens' Evaluation (Prelude.Maybe PerformanceMetrics)
evaluation_performanceMetrics :: Lens' Evaluation (Maybe PerformanceMetrics)
evaluation_performanceMetrics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe PerformanceMetrics
performanceMetrics :: Maybe PerformanceMetrics
$sel:performanceMetrics:Evaluation' :: Evaluation -> Maybe PerformanceMetrics
performanceMetrics} -> Maybe PerformanceMetrics
performanceMetrics) (\s :: Evaluation
s@Evaluation' {} Maybe PerformanceMetrics
a -> Evaluation
s {$sel:performanceMetrics:Evaluation' :: Maybe PerformanceMetrics
performanceMetrics = Maybe PerformanceMetrics
a} :: Evaluation)

-- | Undocumented member.
evaluation_startedAt :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.UTCTime)
evaluation_startedAt :: Lens' Evaluation (Maybe UTCTime)
evaluation_startedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe POSIX
startedAt :: Maybe POSIX
$sel:startedAt:Evaluation' :: Evaluation -> Maybe POSIX
startedAt} -> Maybe POSIX
startedAt) (\s :: Evaluation
s@Evaluation' {} Maybe POSIX
a -> Evaluation
s {$sel:startedAt:Evaluation' :: Maybe POSIX
startedAt = Maybe POSIX
a} :: Evaluation) 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 evaluation. This element can have one of the following
-- values:
--
-- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
--     to evaluate an @MLModel@.
--
-- -   @INPROGRESS@ - The evaluation is underway.
--
-- -   @FAILED@ - The request to evaluate an @MLModel@ did not run to
--     completion. It is not usable.
--
-- -   @COMPLETED@ - The evaluation process completed successfully.
--
-- -   @DELETED@ - The @Evaluation@ is marked as deleted. It is not usable.
evaluation_status :: Lens.Lens' Evaluation (Prelude.Maybe EntityStatus)
evaluation_status :: Lens' Evaluation (Maybe EntityStatus)
evaluation_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evaluation' {Maybe EntityStatus
status :: Maybe EntityStatus
$sel:status:Evaluation' :: Evaluation -> Maybe EntityStatus
status} -> Maybe EntityStatus
status) (\s :: Evaluation
s@Evaluation' {} Maybe EntityStatus
a -> Evaluation
s {$sel:status:Evaluation' :: Maybe EntityStatus
status = Maybe EntityStatus
a} :: Evaluation)

instance Data.FromJSON Evaluation where
  parseJSON :: Value -> Parser Evaluation
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Evaluation"
      ( \Object
x ->
          Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PerformanceMetrics
-> Maybe POSIX
-> Maybe EntityStatus
-> Evaluation
Evaluation'
            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
"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
"EvaluationDataSourceId")
            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
"EvaluationId")
            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
"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
"PerformanceMetrics")
            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")
      )

instance Prelude.Hashable Evaluation where
  hashWithSalt :: Int -> Evaluation -> Int
hashWithSalt Int
_salt Evaluation' {Maybe Integer
Maybe Text
Maybe POSIX
Maybe EntityStatus
Maybe PerformanceMetrics
status :: Maybe EntityStatus
startedAt :: Maybe POSIX
performanceMetrics :: Maybe PerformanceMetrics
name :: Maybe Text
message :: Maybe Text
mLModelId :: Maybe Text
lastUpdatedAt :: Maybe POSIX
inputDataLocationS3 :: Maybe Text
finishedAt :: Maybe POSIX
evaluationId :: Maybe Text
evaluationDataSourceId :: Maybe Text
createdByIamUser :: Maybe Text
createdAt :: Maybe POSIX
computeTime :: Maybe Integer
$sel:status:Evaluation' :: Evaluation -> Maybe EntityStatus
$sel:startedAt:Evaluation' :: Evaluation -> Maybe POSIX
$sel:performanceMetrics:Evaluation' :: Evaluation -> Maybe PerformanceMetrics
$sel:name:Evaluation' :: Evaluation -> Maybe Text
$sel:message:Evaluation' :: Evaluation -> Maybe Text
$sel:mLModelId:Evaluation' :: Evaluation -> Maybe Text
$sel:lastUpdatedAt:Evaluation' :: Evaluation -> Maybe POSIX
$sel:inputDataLocationS3:Evaluation' :: Evaluation -> Maybe Text
$sel:finishedAt:Evaluation' :: Evaluation -> Maybe POSIX
$sel:evaluationId:Evaluation' :: Evaluation -> Maybe Text
$sel:evaluationDataSourceId:Evaluation' :: Evaluation -> Maybe Text
$sel:createdByIamUser:Evaluation' :: Evaluation -> Maybe Text
$sel:createdAt:Evaluation' :: Evaluation -> Maybe POSIX
$sel:computeTime:Evaluation' :: Evaluation -> Maybe Integer
..} =
    Int
_salt
      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 Text
evaluationDataSourceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
evaluationId
      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 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 PerformanceMetrics
performanceMetrics
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EntityStatus
status

instance Prelude.NFData Evaluation where
  rnf :: Evaluation -> ()
rnf Evaluation' {Maybe Integer
Maybe Text
Maybe POSIX
Maybe EntityStatus
Maybe PerformanceMetrics
status :: Maybe EntityStatus
startedAt :: Maybe POSIX
performanceMetrics :: Maybe PerformanceMetrics
name :: Maybe Text
message :: Maybe Text
mLModelId :: Maybe Text
lastUpdatedAt :: Maybe POSIX
inputDataLocationS3 :: Maybe Text
finishedAt :: Maybe POSIX
evaluationId :: Maybe Text
evaluationDataSourceId :: Maybe Text
createdByIamUser :: Maybe Text
createdAt :: Maybe POSIX
computeTime :: Maybe Integer
$sel:status:Evaluation' :: Evaluation -> Maybe EntityStatus
$sel:startedAt:Evaluation' :: Evaluation -> Maybe POSIX
$sel:performanceMetrics:Evaluation' :: Evaluation -> Maybe PerformanceMetrics
$sel:name:Evaluation' :: Evaluation -> Maybe Text
$sel:message:Evaluation' :: Evaluation -> Maybe Text
$sel:mLModelId:Evaluation' :: Evaluation -> Maybe Text
$sel:lastUpdatedAt:Evaluation' :: Evaluation -> Maybe POSIX
$sel:inputDataLocationS3:Evaluation' :: Evaluation -> Maybe Text
$sel:finishedAt:Evaluation' :: Evaluation -> Maybe POSIX
$sel:evaluationId:Evaluation' :: Evaluation -> Maybe Text
$sel:evaluationDataSourceId:Evaluation' :: Evaluation -> Maybe Text
$sel:createdByIamUser:Evaluation' :: Evaluation -> Maybe Text
$sel:createdAt:Evaluation' :: Evaluation -> Maybe POSIX
$sel:computeTime:Evaluation' :: Evaluation -> Maybe Integer
..} =
    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 Text
evaluationDataSourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
evaluationId
      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 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 PerformanceMetrics
performanceMetrics
      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