{-# 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-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.MachineLearning.Types.Evaluation where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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'
  { -- | 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,
    -- | 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,
    -- | The time of the most recent edit to the @Evaluation@. The time is
    -- expressed in epoch time.
    Evaluation -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The time that the @Evaluation@ was created. The time is expressed in
    -- epoch time.
    Evaluation -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    Evaluation -> Maybe Integer
computeTime :: Prelude.Maybe Prelude.Integer,
    -- | 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 ID of the @MLModel@ that is the focus of the evaluation.
    Evaluation -> Maybe Text
mLModelId :: Prelude.Maybe Prelude.Text,
    Evaluation -> Maybe POSIX
startedAt :: Prelude.Maybe Core.POSIX,
    Evaluation -> Maybe POSIX
finishedAt :: Prelude.Maybe Core.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,
    -- | A user-supplied name or description of the @Evaluation@.
    Evaluation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The ID that is assigned to the @Evaluation@ at creation.
    Evaluation -> Maybe Text
evaluationId :: Prelude.Maybe Prelude.Text,
    -- | A description of the most recent details about evaluating the @MLModel@.
    Evaluation -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The ID of the @DataSource@ that is used to evaluate the @MLModel@.
    Evaluation -> Maybe Text
evaluationDataSourceId :: Prelude.Maybe Prelude.Text
  }
  deriving (Evaluation -> Evaluation -> Bool
(Evaluation -> Evaluation -> Bool)
-> (Evaluation -> Evaluation -> Bool) -> Eq Evaluation
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]
(Int -> ReadS Evaluation)
-> ReadS [Evaluation]
-> ReadPrec Evaluation
-> ReadPrec [Evaluation]
-> Read 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
(Int -> Evaluation -> ShowS)
-> (Evaluation -> String)
-> ([Evaluation] -> ShowS)
-> Show Evaluation
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. Evaluation -> Rep Evaluation x)
-> (forall x. Rep Evaluation x -> Evaluation) -> Generic Evaluation
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:
--
-- '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.
--
-- '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>.
--
-- 'lastUpdatedAt', 'evaluation_lastUpdatedAt' - The time of the most recent edit to the @Evaluation@. The time is
-- expressed in epoch time.
--
-- 'createdAt', 'evaluation_createdAt' - The time that the @Evaluation@ was created. The time is expressed in
-- epoch time.
--
-- 'computeTime', 'evaluation_computeTime' - 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.
--
-- 'mLModelId', 'evaluation_mLModelId' - The ID of the @MLModel@ that is the focus of the evaluation.
--
-- 'startedAt', 'evaluation_startedAt' - Undocumented member.
--
-- 'finishedAt', 'evaluation_finishedAt' - Undocumented member.
--
-- '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.
--
-- 'name', 'evaluation_name' - A user-supplied name or description of the @Evaluation@.
--
-- 'evaluationId', 'evaluation_evaluationId' - The ID that is assigned to the @Evaluation@ at creation.
--
-- 'message', 'evaluation_message' - A description of the most recent details about evaluating the @MLModel@.
--
-- 'evaluationDataSourceId', 'evaluation_evaluationDataSourceId' - The ID of the @DataSource@ that is used to evaluate the @MLModel@.
newEvaluation ::
  Evaluation
newEvaluation :: Evaluation
newEvaluation =
  Evaluation' :: Maybe EntityStatus
-> Maybe PerformanceMetrics
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Evaluation
Evaluation'
    { $sel:status:Evaluation' :: Maybe EntityStatus
status = Maybe EntityStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:performanceMetrics:Evaluation' :: Maybe PerformanceMetrics
performanceMetrics = Maybe PerformanceMetrics
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:Evaluation' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Evaluation' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:computeTime:Evaluation' :: Maybe Integer
computeTime = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataLocationS3:Evaluation' :: Maybe Text
inputDataLocationS3 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mLModelId:Evaluation' :: Maybe Text
mLModelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:Evaluation' :: Maybe POSIX
startedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:finishedAt:Evaluation' :: Maybe POSIX
finishedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdByIamUser:Evaluation' :: Maybe Text
createdByIamUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Evaluation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationId:Evaluation' :: Maybe Text
evaluationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:Evaluation' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationDataSourceId:Evaluation' :: Maybe Text
evaluationDataSourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: (Maybe EntityStatus -> f (Maybe EntityStatus))
-> Evaluation -> f Evaluation
evaluation_status = (Evaluation -> Maybe EntityStatus)
-> (Evaluation -> Maybe EntityStatus -> Evaluation)
-> Lens
     Evaluation Evaluation (Maybe EntityStatus) (Maybe EntityStatus)
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)

-- | 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 :: (Maybe PerformanceMetrics -> f (Maybe PerformanceMetrics))
-> Evaluation -> f Evaluation
evaluation_performanceMetrics = (Evaluation -> Maybe PerformanceMetrics)
-> (Evaluation -> Maybe PerformanceMetrics -> Evaluation)
-> Lens
     Evaluation
     Evaluation
     (Maybe PerformanceMetrics)
     (Maybe 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)

-- | 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 :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Evaluation -> f Evaluation
evaluation_lastUpdatedAt = (Evaluation -> Maybe POSIX)
-> (Evaluation -> Maybe POSIX -> Evaluation)
-> Lens Evaluation Evaluation (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX)) -> Evaluation -> f Evaluation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Evaluation
-> f Evaluation
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 time that the @Evaluation@ was created. The time is expressed in
-- epoch time.
evaluation_createdAt :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.UTCTime)
evaluation_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Evaluation -> f Evaluation
evaluation_createdAt = (Evaluation -> Maybe POSIX)
-> (Evaluation -> Maybe POSIX -> Evaluation)
-> Lens Evaluation Evaluation (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX)) -> Evaluation -> f Evaluation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Evaluation
-> f Evaluation
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

-- | Undocumented member.
evaluation_computeTime :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Integer)
evaluation_computeTime :: (Maybe Integer -> f (Maybe Integer)) -> Evaluation -> f Evaluation
evaluation_computeTime = (Evaluation -> Maybe Integer)
-> (Evaluation -> Maybe Integer -> Evaluation)
-> Lens Evaluation Evaluation (Maybe Integer) (Maybe Integer)
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 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 :: (Maybe Text -> f (Maybe Text)) -> Evaluation -> f Evaluation
evaluation_inputDataLocationS3 = (Evaluation -> Maybe Text)
-> (Evaluation -> Maybe Text -> Evaluation)
-> Lens Evaluation Evaluation (Maybe Text) (Maybe Text)
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 ID of the @MLModel@ that is the focus of the evaluation.
evaluation_mLModelId :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_mLModelId :: (Maybe Text -> f (Maybe Text)) -> Evaluation -> f Evaluation
evaluation_mLModelId = (Evaluation -> Maybe Text)
-> (Evaluation -> Maybe Text -> Evaluation)
-> Lens Evaluation Evaluation (Maybe Text) (Maybe Text)
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)

-- | Undocumented member.
evaluation_startedAt :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.UTCTime)
evaluation_startedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Evaluation -> f Evaluation
evaluation_startedAt = (Evaluation -> Maybe POSIX)
-> (Evaluation -> Maybe POSIX -> Evaluation)
-> Lens Evaluation Evaluation (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX)) -> Evaluation -> f Evaluation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Evaluation
-> f Evaluation
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

-- | Undocumented member.
evaluation_finishedAt :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.UTCTime)
evaluation_finishedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Evaluation -> f Evaluation
evaluation_finishedAt = (Evaluation -> Maybe POSIX)
-> (Evaluation -> Maybe POSIX -> Evaluation)
-> Lens Evaluation Evaluation (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX)) -> Evaluation -> f Evaluation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Evaluation
-> f Evaluation
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 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 :: (Maybe Text -> f (Maybe Text)) -> Evaluation -> f Evaluation
evaluation_createdByIamUser = (Evaluation -> Maybe Text)
-> (Evaluation -> Maybe Text -> Evaluation)
-> Lens Evaluation Evaluation (Maybe Text) (Maybe Text)
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)

-- | A user-supplied name or description of the @Evaluation@.
evaluation_name :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_name :: (Maybe Text -> f (Maybe Text)) -> Evaluation -> f Evaluation
evaluation_name = (Evaluation -> Maybe Text)
-> (Evaluation -> Maybe Text -> Evaluation)
-> Lens Evaluation Evaluation (Maybe Text) (Maybe Text)
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)

-- | The ID that is assigned to the @Evaluation@ at creation.
evaluation_evaluationId :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_evaluationId :: (Maybe Text -> f (Maybe Text)) -> Evaluation -> f Evaluation
evaluation_evaluationId = (Evaluation -> Maybe Text)
-> (Evaluation -> Maybe Text -> Evaluation)
-> Lens Evaluation Evaluation (Maybe Text) (Maybe Text)
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)

-- | A description of the most recent details about evaluating the @MLModel@.
evaluation_message :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_message :: (Maybe Text -> f (Maybe Text)) -> Evaluation -> f Evaluation
evaluation_message = (Evaluation -> Maybe Text)
-> (Evaluation -> Maybe Text -> Evaluation)
-> Lens Evaluation Evaluation (Maybe Text) (Maybe Text)
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)

-- | The ID of the @DataSource@ that is used to evaluate the @MLModel@.
evaluation_evaluationDataSourceId :: Lens.Lens' Evaluation (Prelude.Maybe Prelude.Text)
evaluation_evaluationDataSourceId :: (Maybe Text -> f (Maybe Text)) -> Evaluation -> f Evaluation
evaluation_evaluationDataSourceId = (Evaluation -> Maybe Text)
-> (Evaluation -> Maybe Text -> Evaluation)
-> Lens Evaluation Evaluation (Maybe Text) (Maybe Text)
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)

instance Core.FromJSON Evaluation where
  parseJSON :: Value -> Parser Evaluation
parseJSON =
    String
-> (Object -> Parser Evaluation) -> Value -> Parser Evaluation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Evaluation"
      ( \Object
x ->
          Maybe EntityStatus
-> Maybe PerformanceMetrics
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Evaluation
Evaluation'
            (Maybe EntityStatus
 -> Maybe PerformanceMetrics
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Evaluation)
-> Parser (Maybe EntityStatus)
-> Parser
     (Maybe PerformanceMetrics
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Evaluation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EntityStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe PerformanceMetrics
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Evaluation)
-> Parser (Maybe PerformanceMetrics)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Evaluation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PerformanceMetrics)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PerformanceMetrics")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Evaluation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Evaluation)
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
"LastUpdatedAt")
            Parser
  (Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Evaluation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Evaluation)
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
"CreatedAt")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Evaluation)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Evaluation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ComputeTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Evaluation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Evaluation)
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
"InputDataLocationS3")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Evaluation)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Evaluation)
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
"MLModelId")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Evaluation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Evaluation)
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
"StartedAt")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Evaluation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Evaluation)
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
"FinishedAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Evaluation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> Evaluation)
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
"CreatedByIamUser")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> Evaluation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Evaluation)
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
"Name")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> Evaluation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Evaluation)
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
"EvaluationId")
            Parser (Maybe Text -> Maybe Text -> Evaluation)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Evaluation)
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
"Message")
            Parser (Maybe Text -> Evaluation)
-> Parser (Maybe Text) -> Parser Evaluation
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
"EvaluationDataSourceId")
      )

instance Prelude.Hashable Evaluation

instance Prelude.NFData Evaluation