{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.GetEvaluation
-- 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)
--
-- Returns an @Evaluation@ that includes metadata as well as the current
-- status of the @Evaluation@.
module Amazonka.MachineLearning.GetEvaluation
  ( -- * Creating a Request
    GetEvaluation (..),
    newGetEvaluation,

    -- * Request Lenses
    getEvaluation_evaluationId,

    -- * Destructuring the Response
    GetEvaluationResponse (..),
    newGetEvaluationResponse,

    -- * Response Lenses
    getEvaluationResponse_status,
    getEvaluationResponse_performanceMetrics,
    getEvaluationResponse_lastUpdatedAt,
    getEvaluationResponse_createdAt,
    getEvaluationResponse_computeTime,
    getEvaluationResponse_inputDataLocationS3,
    getEvaluationResponse_mLModelId,
    getEvaluationResponse_startedAt,
    getEvaluationResponse_finishedAt,
    getEvaluationResponse_createdByIamUser,
    getEvaluationResponse_name,
    getEvaluationResponse_logUri,
    getEvaluationResponse_evaluationId,
    getEvaluationResponse_message,
    getEvaluationResponse_evaluationDataSourceId,
    getEvaluationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MachineLearning.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetEvaluation' smart constructor.
data GetEvaluation = GetEvaluation'
  { -- | The ID of the @Evaluation@ to retrieve. The evaluation of each @MLModel@
    -- is recorded and cataloged. The ID provides the means to access the
    -- information.
    GetEvaluation -> Text
evaluationId :: Prelude.Text
  }
  deriving (GetEvaluation -> GetEvaluation -> Bool
(GetEvaluation -> GetEvaluation -> Bool)
-> (GetEvaluation -> GetEvaluation -> Bool) -> Eq GetEvaluation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEvaluation -> GetEvaluation -> Bool
$c/= :: GetEvaluation -> GetEvaluation -> Bool
== :: GetEvaluation -> GetEvaluation -> Bool
$c== :: GetEvaluation -> GetEvaluation -> Bool
Prelude.Eq, ReadPrec [GetEvaluation]
ReadPrec GetEvaluation
Int -> ReadS GetEvaluation
ReadS [GetEvaluation]
(Int -> ReadS GetEvaluation)
-> ReadS [GetEvaluation]
-> ReadPrec GetEvaluation
-> ReadPrec [GetEvaluation]
-> Read GetEvaluation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEvaluation]
$creadListPrec :: ReadPrec [GetEvaluation]
readPrec :: ReadPrec GetEvaluation
$creadPrec :: ReadPrec GetEvaluation
readList :: ReadS [GetEvaluation]
$creadList :: ReadS [GetEvaluation]
readsPrec :: Int -> ReadS GetEvaluation
$creadsPrec :: Int -> ReadS GetEvaluation
Prelude.Read, Int -> GetEvaluation -> ShowS
[GetEvaluation] -> ShowS
GetEvaluation -> String
(Int -> GetEvaluation -> ShowS)
-> (GetEvaluation -> String)
-> ([GetEvaluation] -> ShowS)
-> Show GetEvaluation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEvaluation] -> ShowS
$cshowList :: [GetEvaluation] -> ShowS
show :: GetEvaluation -> String
$cshow :: GetEvaluation -> String
showsPrec :: Int -> GetEvaluation -> ShowS
$cshowsPrec :: Int -> GetEvaluation -> ShowS
Prelude.Show, (forall x. GetEvaluation -> Rep GetEvaluation x)
-> (forall x. Rep GetEvaluation x -> GetEvaluation)
-> Generic GetEvaluation
forall x. Rep GetEvaluation x -> GetEvaluation
forall x. GetEvaluation -> Rep GetEvaluation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetEvaluation x -> GetEvaluation
$cfrom :: forall x. GetEvaluation -> Rep GetEvaluation x
Prelude.Generic)

-- |
-- Create a value of 'GetEvaluation' 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:
--
-- 'evaluationId', 'getEvaluation_evaluationId' - The ID of the @Evaluation@ to retrieve. The evaluation of each @MLModel@
-- is recorded and cataloged. The ID provides the means to access the
-- information.
newGetEvaluation ::
  -- | 'evaluationId'
  Prelude.Text ->
  GetEvaluation
newGetEvaluation :: Text -> GetEvaluation
newGetEvaluation Text
pEvaluationId_ =
  GetEvaluation' :: Text -> GetEvaluation
GetEvaluation' {$sel:evaluationId:GetEvaluation' :: Text
evaluationId = Text
pEvaluationId_}

-- | The ID of the @Evaluation@ to retrieve. The evaluation of each @MLModel@
-- is recorded and cataloged. The ID provides the means to access the
-- information.
getEvaluation_evaluationId :: Lens.Lens' GetEvaluation Prelude.Text
getEvaluation_evaluationId :: (Text -> f Text) -> GetEvaluation -> f GetEvaluation
getEvaluation_evaluationId = (GetEvaluation -> Text)
-> (GetEvaluation -> Text -> GetEvaluation)
-> Lens GetEvaluation GetEvaluation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluation' {Text
evaluationId :: Text
$sel:evaluationId:GetEvaluation' :: GetEvaluation -> Text
evaluationId} -> Text
evaluationId) (\s :: GetEvaluation
s@GetEvaluation' {} Text
a -> GetEvaluation
s {$sel:evaluationId:GetEvaluation' :: Text
evaluationId = Text
a} :: GetEvaluation)

instance Core.AWSRequest GetEvaluation where
  type
    AWSResponse GetEvaluation =
      GetEvaluationResponse
  request :: GetEvaluation -> Request GetEvaluation
request = Service -> GetEvaluation -> Request GetEvaluation
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetEvaluation
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetEvaluation)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetEvaluation))
-> Logger
-> Service
-> Proxy GetEvaluation
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetEvaluation)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h 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
-> Maybe Text
-> Int
-> GetEvaluationResponse
GetEvaluationResponse'
            (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
 -> Maybe Text
 -> Int
 -> GetEvaluationResponse)
-> Either String (Maybe EntityStatus)
-> Either
     String
     (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
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe EntityStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (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
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe PerformanceMetrics)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe PerformanceMetrics)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PerformanceMetrics")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastUpdatedAt")
            Either
  String
  (Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedAt")
            Either
  String
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ComputeTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"InputDataLocationS3")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MLModelId")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StartedAt")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FinishedAt")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedByIamUser")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetEvaluationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LogUri")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Int -> GetEvaluationResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EvaluationId")
            Either
  String (Maybe Text -> Maybe Text -> Int -> GetEvaluationResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Message")
            Either String (Maybe Text -> Int -> GetEvaluationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetEvaluationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EvaluationDataSourceId")
            Either String (Int -> GetEvaluationResponse)
-> Either String Int -> Either String GetEvaluationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetEvaluation

instance Prelude.NFData GetEvaluation

instance Core.ToHeaders GetEvaluation where
  toHeaders :: GetEvaluation -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetEvaluation -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonML_20141212.GetEvaluation" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetEvaluation where
  toJSON :: GetEvaluation -> Value
toJSON GetEvaluation' {Text
evaluationId :: Text
$sel:evaluationId:GetEvaluation' :: GetEvaluation -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EvaluationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
evaluationId)]
      )

instance Core.ToPath GetEvaluation where
  toPath :: GetEvaluation -> ByteString
toPath = ByteString -> GetEvaluation -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetEvaluation where
  toQuery :: GetEvaluation -> QueryString
toQuery = QueryString -> GetEvaluation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Represents the output of a @GetEvaluation@ operation and describes an
-- @Evaluation@.
--
-- /See:/ 'newGetEvaluationResponse' smart constructor.
data GetEvaluationResponse = GetEvaluationResponse'
  { -- | The status of the evaluation. This element can have one of the following
    -- values:
    --
    -- -   @PENDING@ - Amazon Machine Language (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.
    GetEvaluationResponse -> Maybe EntityStatus
status :: Prelude.Maybe EntityStatus,
    -- | Measurements of how well the @MLModel@ performed using observations
    -- referenced by the @DataSource@. One of the following metric 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>.
    GetEvaluationResponse -> Maybe PerformanceMetrics
performanceMetrics :: Prelude.Maybe PerformanceMetrics,
    -- | The time of the most recent edit to the @Evaluation@. The time is
    -- expressed in epoch time.
    GetEvaluationResponse -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The time that the @Evaluation@ was created. The time is expressed in
    -- epoch time.
    GetEvaluationResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The approximate CPU time in milliseconds that Amazon Machine Learning
    -- spent processing the @Evaluation@, normalized and scaled on computation
    -- resources. @ComputeTime@ is only available if the @Evaluation@ is in the
    -- @COMPLETED@ state.
    GetEvaluationResponse -> Maybe Integer
computeTime :: Prelude.Maybe Prelude.Integer,
    -- | The location of the data file or directory in Amazon Simple Storage
    -- Service (Amazon S3).
    GetEvaluationResponse -> Maybe Text
inputDataLocationS3 :: Prelude.Maybe Prelude.Text,
    -- | The ID of the @MLModel@ that was the focus of the evaluation.
    GetEvaluationResponse -> Maybe Text
mLModelId :: Prelude.Maybe Prelude.Text,
    -- | The epoch time when Amazon Machine Learning marked the @Evaluation@ as
    -- @INPROGRESS@. @StartedAt@ isn\'t available if the @Evaluation@ is in the
    -- @PENDING@ state.
    GetEvaluationResponse -> Maybe POSIX
startedAt :: Prelude.Maybe Core.POSIX,
    -- | The epoch time when Amazon Machine Learning marked the @Evaluation@ as
    -- @COMPLETED@ or @FAILED@. @FinishedAt@ is only available when the
    -- @Evaluation@ is in the @COMPLETED@ or @FAILED@ state.
    GetEvaluationResponse -> 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.
    GetEvaluationResponse -> Maybe Text
createdByIamUser :: Prelude.Maybe Prelude.Text,
    -- | A user-supplied name or description of the @Evaluation@.
    GetEvaluationResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A link to the file that contains logs of the @CreateEvaluation@
    -- operation.
    GetEvaluationResponse -> Maybe Text
logUri :: Prelude.Maybe Prelude.Text,
    -- | The evaluation ID which is same as the @EvaluationId@ in the request.
    GetEvaluationResponse -> Maybe Text
evaluationId :: Prelude.Maybe Prelude.Text,
    -- | A description of the most recent details about evaluating the @MLModel@.
    GetEvaluationResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The @DataSource@ used for this evaluation.
    GetEvaluationResponse -> Maybe Text
evaluationDataSourceId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetEvaluationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetEvaluationResponse -> GetEvaluationResponse -> Bool
(GetEvaluationResponse -> GetEvaluationResponse -> Bool)
-> (GetEvaluationResponse -> GetEvaluationResponse -> Bool)
-> Eq GetEvaluationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEvaluationResponse -> GetEvaluationResponse -> Bool
$c/= :: GetEvaluationResponse -> GetEvaluationResponse -> Bool
== :: GetEvaluationResponse -> GetEvaluationResponse -> Bool
$c== :: GetEvaluationResponse -> GetEvaluationResponse -> Bool
Prelude.Eq, ReadPrec [GetEvaluationResponse]
ReadPrec GetEvaluationResponse
Int -> ReadS GetEvaluationResponse
ReadS [GetEvaluationResponse]
(Int -> ReadS GetEvaluationResponse)
-> ReadS [GetEvaluationResponse]
-> ReadPrec GetEvaluationResponse
-> ReadPrec [GetEvaluationResponse]
-> Read GetEvaluationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEvaluationResponse]
$creadListPrec :: ReadPrec [GetEvaluationResponse]
readPrec :: ReadPrec GetEvaluationResponse
$creadPrec :: ReadPrec GetEvaluationResponse
readList :: ReadS [GetEvaluationResponse]
$creadList :: ReadS [GetEvaluationResponse]
readsPrec :: Int -> ReadS GetEvaluationResponse
$creadsPrec :: Int -> ReadS GetEvaluationResponse
Prelude.Read, Int -> GetEvaluationResponse -> ShowS
[GetEvaluationResponse] -> ShowS
GetEvaluationResponse -> String
(Int -> GetEvaluationResponse -> ShowS)
-> (GetEvaluationResponse -> String)
-> ([GetEvaluationResponse] -> ShowS)
-> Show GetEvaluationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEvaluationResponse] -> ShowS
$cshowList :: [GetEvaluationResponse] -> ShowS
show :: GetEvaluationResponse -> String
$cshow :: GetEvaluationResponse -> String
showsPrec :: Int -> GetEvaluationResponse -> ShowS
$cshowsPrec :: Int -> GetEvaluationResponse -> ShowS
Prelude.Show, (forall x. GetEvaluationResponse -> Rep GetEvaluationResponse x)
-> (forall x. Rep GetEvaluationResponse x -> GetEvaluationResponse)
-> Generic GetEvaluationResponse
forall x. Rep GetEvaluationResponse x -> GetEvaluationResponse
forall x. GetEvaluationResponse -> Rep GetEvaluationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetEvaluationResponse x -> GetEvaluationResponse
$cfrom :: forall x. GetEvaluationResponse -> Rep GetEvaluationResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetEvaluationResponse' 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', 'getEvaluationResponse_status' - The status of the evaluation. This element can have one of the following
-- values:
--
-- -   @PENDING@ - Amazon Machine Language (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', 'getEvaluationResponse_performanceMetrics' - Measurements of how well the @MLModel@ performed using observations
-- referenced by the @DataSource@. One of the following metric 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', 'getEvaluationResponse_lastUpdatedAt' - The time of the most recent edit to the @Evaluation@. The time is
-- expressed in epoch time.
--
-- 'createdAt', 'getEvaluationResponse_createdAt' - The time that the @Evaluation@ was created. The time is expressed in
-- epoch time.
--
-- 'computeTime', 'getEvaluationResponse_computeTime' - The approximate CPU time in milliseconds that Amazon Machine Learning
-- spent processing the @Evaluation@, normalized and scaled on computation
-- resources. @ComputeTime@ is only available if the @Evaluation@ is in the
-- @COMPLETED@ state.
--
-- 'inputDataLocationS3', 'getEvaluationResponse_inputDataLocationS3' - The location of the data file or directory in Amazon Simple Storage
-- Service (Amazon S3).
--
-- 'mLModelId', 'getEvaluationResponse_mLModelId' - The ID of the @MLModel@ that was the focus of the evaluation.
--
-- 'startedAt', 'getEvaluationResponse_startedAt' - The epoch time when Amazon Machine Learning marked the @Evaluation@ as
-- @INPROGRESS@. @StartedAt@ isn\'t available if the @Evaluation@ is in the
-- @PENDING@ state.
--
-- 'finishedAt', 'getEvaluationResponse_finishedAt' - The epoch time when Amazon Machine Learning marked the @Evaluation@ as
-- @COMPLETED@ or @FAILED@. @FinishedAt@ is only available when the
-- @Evaluation@ is in the @COMPLETED@ or @FAILED@ state.
--
-- 'createdByIamUser', 'getEvaluationResponse_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', 'getEvaluationResponse_name' - A user-supplied name or description of the @Evaluation@.
--
-- 'logUri', 'getEvaluationResponse_logUri' - A link to the file that contains logs of the @CreateEvaluation@
-- operation.
--
-- 'evaluationId', 'getEvaluationResponse_evaluationId' - The evaluation ID which is same as the @EvaluationId@ in the request.
--
-- 'message', 'getEvaluationResponse_message' - A description of the most recent details about evaluating the @MLModel@.
--
-- 'evaluationDataSourceId', 'getEvaluationResponse_evaluationDataSourceId' - The @DataSource@ used for this evaluation.
--
-- 'httpStatus', 'getEvaluationResponse_httpStatus' - The response's http status code.
newGetEvaluationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetEvaluationResponse
newGetEvaluationResponse :: Int -> GetEvaluationResponse
newGetEvaluationResponse Int
pHttpStatus_ =
  GetEvaluationResponse' :: 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
-> Maybe Text
-> Int
-> GetEvaluationResponse
GetEvaluationResponse'
    { $sel:status:GetEvaluationResponse' :: Maybe EntityStatus
status = Maybe EntityStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:performanceMetrics:GetEvaluationResponse' :: Maybe PerformanceMetrics
performanceMetrics = Maybe PerformanceMetrics
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:GetEvaluationResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:GetEvaluationResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:computeTime:GetEvaluationResponse' :: Maybe Integer
computeTime = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataLocationS3:GetEvaluationResponse' :: Maybe Text
inputDataLocationS3 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mLModelId:GetEvaluationResponse' :: Maybe Text
mLModelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:GetEvaluationResponse' :: Maybe POSIX
startedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:finishedAt:GetEvaluationResponse' :: Maybe POSIX
finishedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdByIamUser:GetEvaluationResponse' :: Maybe Text
createdByIamUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetEvaluationResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logUri:GetEvaluationResponse' :: Maybe Text
logUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationId:GetEvaluationResponse' :: Maybe Text
evaluationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:GetEvaluationResponse' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationDataSourceId:GetEvaluationResponse' :: Maybe Text
evaluationDataSourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetEvaluationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status of the evaluation. This element can have one of the following
-- values:
--
-- -   @PENDING@ - Amazon Machine Language (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.
getEvaluationResponse_status :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe EntityStatus)
getEvaluationResponse_status :: (Maybe EntityStatus -> f (Maybe EntityStatus))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_status = (GetEvaluationResponse -> Maybe EntityStatus)
-> (GetEvaluationResponse
    -> Maybe EntityStatus -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe EntityStatus)
     (Maybe EntityStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe EntityStatus
status :: Maybe EntityStatus
$sel:status:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe EntityStatus
status} -> Maybe EntityStatus
status) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe EntityStatus
a -> GetEvaluationResponse
s {$sel:status:GetEvaluationResponse' :: Maybe EntityStatus
status = Maybe EntityStatus
a} :: GetEvaluationResponse)

-- | Measurements of how well the @MLModel@ performed using observations
-- referenced by the @DataSource@. One of the following metric 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>.
getEvaluationResponse_performanceMetrics :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe PerformanceMetrics)
getEvaluationResponse_performanceMetrics :: (Maybe PerformanceMetrics -> f (Maybe PerformanceMetrics))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_performanceMetrics = (GetEvaluationResponse -> Maybe PerformanceMetrics)
-> (GetEvaluationResponse
    -> Maybe PerformanceMetrics -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe PerformanceMetrics)
     (Maybe PerformanceMetrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe PerformanceMetrics
performanceMetrics :: Maybe PerformanceMetrics
$sel:performanceMetrics:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe PerformanceMetrics
performanceMetrics} -> Maybe PerformanceMetrics
performanceMetrics) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe PerformanceMetrics
a -> GetEvaluationResponse
s {$sel:performanceMetrics:GetEvaluationResponse' :: Maybe PerformanceMetrics
performanceMetrics = Maybe PerformanceMetrics
a} :: GetEvaluationResponse)

-- | The time of the most recent edit to the @Evaluation@. The time is
-- expressed in epoch time.
getEvaluationResponse_lastUpdatedAt :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.UTCTime)
getEvaluationResponse_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_lastUpdatedAt = (GetEvaluationResponse -> Maybe POSIX)
-> (GetEvaluationResponse -> Maybe POSIX -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe POSIX
a -> GetEvaluationResponse
s {$sel:lastUpdatedAt:GetEvaluationResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: GetEvaluationResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetEvaluationResponse -> f GetEvaluationResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEvaluationResponse
-> f GetEvaluationResponse
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.
getEvaluationResponse_createdAt :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.UTCTime)
getEvaluationResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_createdAt = (GetEvaluationResponse -> Maybe POSIX)
-> (GetEvaluationResponse -> Maybe POSIX -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe POSIX
a -> GetEvaluationResponse
s {$sel:createdAt:GetEvaluationResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: GetEvaluationResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetEvaluationResponse -> f GetEvaluationResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEvaluationResponse
-> f GetEvaluationResponse
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 approximate CPU time in milliseconds that Amazon Machine Learning
-- spent processing the @Evaluation@, normalized and scaled on computation
-- resources. @ComputeTime@ is only available if the @Evaluation@ is in the
-- @COMPLETED@ state.
getEvaluationResponse_computeTime :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.Integer)
getEvaluationResponse_computeTime :: (Maybe Integer -> f (Maybe Integer))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_computeTime = (GetEvaluationResponse -> Maybe Integer)
-> (GetEvaluationResponse
    -> Maybe Integer -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe Integer
computeTime :: Maybe Integer
$sel:computeTime:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe Integer
computeTime} -> Maybe Integer
computeTime) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe Integer
a -> GetEvaluationResponse
s {$sel:computeTime:GetEvaluationResponse' :: Maybe Integer
computeTime = Maybe Integer
a} :: GetEvaluationResponse)

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

-- | The ID of the @MLModel@ that was the focus of the evaluation.
getEvaluationResponse_mLModelId :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.Text)
getEvaluationResponse_mLModelId :: (Maybe Text -> f (Maybe Text))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_mLModelId = (GetEvaluationResponse -> Maybe Text)
-> (GetEvaluationResponse -> Maybe Text -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe Text
mLModelId :: Maybe Text
$sel:mLModelId:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe Text
mLModelId} -> Maybe Text
mLModelId) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe Text
a -> GetEvaluationResponse
s {$sel:mLModelId:GetEvaluationResponse' :: Maybe Text
mLModelId = Maybe Text
a} :: GetEvaluationResponse)

-- | The epoch time when Amazon Machine Learning marked the @Evaluation@ as
-- @INPROGRESS@. @StartedAt@ isn\'t available if the @Evaluation@ is in the
-- @PENDING@ state.
getEvaluationResponse_startedAt :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.UTCTime)
getEvaluationResponse_startedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_startedAt = (GetEvaluationResponse -> Maybe POSIX)
-> (GetEvaluationResponse -> Maybe POSIX -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe POSIX
startedAt :: Maybe POSIX
$sel:startedAt:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe POSIX
startedAt} -> Maybe POSIX
startedAt) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe POSIX
a -> GetEvaluationResponse
s {$sel:startedAt:GetEvaluationResponse' :: Maybe POSIX
startedAt = Maybe POSIX
a} :: GetEvaluationResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetEvaluationResponse -> f GetEvaluationResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEvaluationResponse
-> f GetEvaluationResponse
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 epoch time when Amazon Machine Learning marked the @Evaluation@ as
-- @COMPLETED@ or @FAILED@. @FinishedAt@ is only available when the
-- @Evaluation@ is in the @COMPLETED@ or @FAILED@ state.
getEvaluationResponse_finishedAt :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.UTCTime)
getEvaluationResponse_finishedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_finishedAt = (GetEvaluationResponse -> Maybe POSIX)
-> (GetEvaluationResponse -> Maybe POSIX -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe POSIX
finishedAt :: Maybe POSIX
$sel:finishedAt:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe POSIX
finishedAt} -> Maybe POSIX
finishedAt) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe POSIX
a -> GetEvaluationResponse
s {$sel:finishedAt:GetEvaluationResponse' :: Maybe POSIX
finishedAt = Maybe POSIX
a} :: GetEvaluationResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetEvaluationResponse -> f GetEvaluationResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEvaluationResponse
-> f GetEvaluationResponse
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.
getEvaluationResponse_createdByIamUser :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.Text)
getEvaluationResponse_createdByIamUser :: (Maybe Text -> f (Maybe Text))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_createdByIamUser = (GetEvaluationResponse -> Maybe Text)
-> (GetEvaluationResponse -> Maybe Text -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe Text
createdByIamUser :: Maybe Text
$sel:createdByIamUser:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe Text
createdByIamUser} -> Maybe Text
createdByIamUser) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe Text
a -> GetEvaluationResponse
s {$sel:createdByIamUser:GetEvaluationResponse' :: Maybe Text
createdByIamUser = Maybe Text
a} :: GetEvaluationResponse)

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

-- | A link to the file that contains logs of the @CreateEvaluation@
-- operation.
getEvaluationResponse_logUri :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.Text)
getEvaluationResponse_logUri :: (Maybe Text -> f (Maybe Text))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_logUri = (GetEvaluationResponse -> Maybe Text)
-> (GetEvaluationResponse -> Maybe Text -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe Text
logUri :: Maybe Text
$sel:logUri:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe Text
logUri} -> Maybe Text
logUri) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe Text
a -> GetEvaluationResponse
s {$sel:logUri:GetEvaluationResponse' :: Maybe Text
logUri = Maybe Text
a} :: GetEvaluationResponse)

-- | The evaluation ID which is same as the @EvaluationId@ in the request.
getEvaluationResponse_evaluationId :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.Text)
getEvaluationResponse_evaluationId :: (Maybe Text -> f (Maybe Text))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_evaluationId = (GetEvaluationResponse -> Maybe Text)
-> (GetEvaluationResponse -> Maybe Text -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe Text
evaluationId :: Maybe Text
$sel:evaluationId:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe Text
evaluationId} -> Maybe Text
evaluationId) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe Text
a -> GetEvaluationResponse
s {$sel:evaluationId:GetEvaluationResponse' :: Maybe Text
evaluationId = Maybe Text
a} :: GetEvaluationResponse)

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

-- | The @DataSource@ used for this evaluation.
getEvaluationResponse_evaluationDataSourceId :: Lens.Lens' GetEvaluationResponse (Prelude.Maybe Prelude.Text)
getEvaluationResponse_evaluationDataSourceId :: (Maybe Text -> f (Maybe Text))
-> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_evaluationDataSourceId = (GetEvaluationResponse -> Maybe Text)
-> (GetEvaluationResponse -> Maybe Text -> GetEvaluationResponse)
-> Lens
     GetEvaluationResponse
     GetEvaluationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Maybe Text
evaluationDataSourceId :: Maybe Text
$sel:evaluationDataSourceId:GetEvaluationResponse' :: GetEvaluationResponse -> Maybe Text
evaluationDataSourceId} -> Maybe Text
evaluationDataSourceId) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Maybe Text
a -> GetEvaluationResponse
s {$sel:evaluationDataSourceId:GetEvaluationResponse' :: Maybe Text
evaluationDataSourceId = Maybe Text
a} :: GetEvaluationResponse)

-- | The response's http status code.
getEvaluationResponse_httpStatus :: Lens.Lens' GetEvaluationResponse Prelude.Int
getEvaluationResponse_httpStatus :: (Int -> f Int) -> GetEvaluationResponse -> f GetEvaluationResponse
getEvaluationResponse_httpStatus = (GetEvaluationResponse -> Int)
-> (GetEvaluationResponse -> Int -> GetEvaluationResponse)
-> Lens GetEvaluationResponse GetEvaluationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvaluationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetEvaluationResponse' :: GetEvaluationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetEvaluationResponse
s@GetEvaluationResponse' {} Int
a -> GetEvaluationResponse
s {$sel:httpStatus:GetEvaluationResponse' :: Int
httpStatus = Int
a} :: GetEvaluationResponse)

instance Prelude.NFData GetEvaluationResponse