{-# 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.Forecast.GetAccuracyMetrics
-- 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)
--
-- Provides metrics on the accuracy of the models that were trained by the
-- CreatePredictor operation. Use metrics to see how well the model
-- performed and to decide whether to use the predictor to generate a
-- forecast. For more information, see
-- <https://docs.aws.amazon.com/forecast/latest/dg/metrics.html Predictor Metrics>.
--
-- This operation generates metrics for each backtest window that was
-- evaluated. The number of backtest windows (@NumberOfBacktestWindows@) is
-- specified using the EvaluationParameters object, which is optionally
-- included in the @CreatePredictor@ request. If @NumberOfBacktestWindows@
-- isn\'t specified, the number defaults to one.
--
-- The parameters of the @filling@ method determine which items contribute
-- to the metrics. If you want all items to contribute, specify @zero@. If
-- you want only those items that have complete data in the range being
-- evaluated to contribute, specify @nan@. For more information, see
-- FeaturizationMethod.
--
-- Before you can get accuracy metrics, the @Status@ of the predictor must
-- be @ACTIVE@, signifying that training has completed. To get the status,
-- use the DescribePredictor operation.
module Amazonka.Forecast.GetAccuracyMetrics
  ( -- * Creating a Request
    GetAccuracyMetrics (..),
    newGetAccuracyMetrics,

    -- * Request Lenses
    getAccuracyMetrics_predictorArn,

    -- * Destructuring the Response
    GetAccuracyMetricsResponse (..),
    newGetAccuracyMetricsResponse,

    -- * Response Lenses
    getAccuracyMetricsResponse_predictorEvaluationResults,
    getAccuracyMetricsResponse_optimizationMetric,
    getAccuracyMetricsResponse_autoMLOverrideStrategy,
    getAccuracyMetricsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetAccuracyMetrics' smart constructor.
data GetAccuracyMetrics = GetAccuracyMetrics'
  { -- | The Amazon Resource Name (ARN) of the predictor to get metrics for.
    GetAccuracyMetrics -> Text
predictorArn :: Prelude.Text
  }
  deriving (GetAccuracyMetrics -> GetAccuracyMetrics -> Bool
(GetAccuracyMetrics -> GetAccuracyMetrics -> Bool)
-> (GetAccuracyMetrics -> GetAccuracyMetrics -> Bool)
-> Eq GetAccuracyMetrics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccuracyMetrics -> GetAccuracyMetrics -> Bool
$c/= :: GetAccuracyMetrics -> GetAccuracyMetrics -> Bool
== :: GetAccuracyMetrics -> GetAccuracyMetrics -> Bool
$c== :: GetAccuracyMetrics -> GetAccuracyMetrics -> Bool
Prelude.Eq, ReadPrec [GetAccuracyMetrics]
ReadPrec GetAccuracyMetrics
Int -> ReadS GetAccuracyMetrics
ReadS [GetAccuracyMetrics]
(Int -> ReadS GetAccuracyMetrics)
-> ReadS [GetAccuracyMetrics]
-> ReadPrec GetAccuracyMetrics
-> ReadPrec [GetAccuracyMetrics]
-> Read GetAccuracyMetrics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAccuracyMetrics]
$creadListPrec :: ReadPrec [GetAccuracyMetrics]
readPrec :: ReadPrec GetAccuracyMetrics
$creadPrec :: ReadPrec GetAccuracyMetrics
readList :: ReadS [GetAccuracyMetrics]
$creadList :: ReadS [GetAccuracyMetrics]
readsPrec :: Int -> ReadS GetAccuracyMetrics
$creadsPrec :: Int -> ReadS GetAccuracyMetrics
Prelude.Read, Int -> GetAccuracyMetrics -> ShowS
[GetAccuracyMetrics] -> ShowS
GetAccuracyMetrics -> String
(Int -> GetAccuracyMetrics -> ShowS)
-> (GetAccuracyMetrics -> String)
-> ([GetAccuracyMetrics] -> ShowS)
-> Show GetAccuracyMetrics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccuracyMetrics] -> ShowS
$cshowList :: [GetAccuracyMetrics] -> ShowS
show :: GetAccuracyMetrics -> String
$cshow :: GetAccuracyMetrics -> String
showsPrec :: Int -> GetAccuracyMetrics -> ShowS
$cshowsPrec :: Int -> GetAccuracyMetrics -> ShowS
Prelude.Show, (forall x. GetAccuracyMetrics -> Rep GetAccuracyMetrics x)
-> (forall x. Rep GetAccuracyMetrics x -> GetAccuracyMetrics)
-> Generic GetAccuracyMetrics
forall x. Rep GetAccuracyMetrics x -> GetAccuracyMetrics
forall x. GetAccuracyMetrics -> Rep GetAccuracyMetrics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAccuracyMetrics x -> GetAccuracyMetrics
$cfrom :: forall x. GetAccuracyMetrics -> Rep GetAccuracyMetrics x
Prelude.Generic)

-- |
-- Create a value of 'GetAccuracyMetrics' 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:
--
-- 'predictorArn', 'getAccuracyMetrics_predictorArn' - The Amazon Resource Name (ARN) of the predictor to get metrics for.
newGetAccuracyMetrics ::
  -- | 'predictorArn'
  Prelude.Text ->
  GetAccuracyMetrics
newGetAccuracyMetrics :: Text -> GetAccuracyMetrics
newGetAccuracyMetrics Text
pPredictorArn_ =
  GetAccuracyMetrics' :: Text -> GetAccuracyMetrics
GetAccuracyMetrics' {$sel:predictorArn:GetAccuracyMetrics' :: Text
predictorArn = Text
pPredictorArn_}

-- | The Amazon Resource Name (ARN) of the predictor to get metrics for.
getAccuracyMetrics_predictorArn :: Lens.Lens' GetAccuracyMetrics Prelude.Text
getAccuracyMetrics_predictorArn :: (Text -> f Text) -> GetAccuracyMetrics -> f GetAccuracyMetrics
getAccuracyMetrics_predictorArn = (GetAccuracyMetrics -> Text)
-> (GetAccuracyMetrics -> Text -> GetAccuracyMetrics)
-> Lens GetAccuracyMetrics GetAccuracyMetrics Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccuracyMetrics' {Text
predictorArn :: Text
$sel:predictorArn:GetAccuracyMetrics' :: GetAccuracyMetrics -> Text
predictorArn} -> Text
predictorArn) (\s :: GetAccuracyMetrics
s@GetAccuracyMetrics' {} Text
a -> GetAccuracyMetrics
s {$sel:predictorArn:GetAccuracyMetrics' :: Text
predictorArn = Text
a} :: GetAccuracyMetrics)

instance Core.AWSRequest GetAccuracyMetrics where
  type
    AWSResponse GetAccuracyMetrics =
      GetAccuracyMetricsResponse
  request :: GetAccuracyMetrics -> Request GetAccuracyMetrics
request = Service -> GetAccuracyMetrics -> Request GetAccuracyMetrics
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetAccuracyMetrics
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetAccuracyMetrics)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetAccuracyMetrics))
-> Logger
-> Service
-> Proxy GetAccuracyMetrics
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetAccuracyMetrics)))
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 [EvaluationResult]
-> Maybe OptimizationMetric
-> Maybe AutoMLOverrideStrategy
-> Int
-> GetAccuracyMetricsResponse
GetAccuracyMetricsResponse'
            (Maybe [EvaluationResult]
 -> Maybe OptimizationMetric
 -> Maybe AutoMLOverrideStrategy
 -> Int
 -> GetAccuracyMetricsResponse)
-> Either String (Maybe [EvaluationResult])
-> Either
     String
     (Maybe OptimizationMetric
      -> Maybe AutoMLOverrideStrategy
      -> Int
      -> GetAccuracyMetricsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [EvaluationResult]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PredictorEvaluationResults"
                            Either String (Maybe (Maybe [EvaluationResult]))
-> Maybe [EvaluationResult]
-> Either String (Maybe [EvaluationResult])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EvaluationResult]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe OptimizationMetric
   -> Maybe AutoMLOverrideStrategy
   -> Int
   -> GetAccuracyMetricsResponse)
-> Either String (Maybe OptimizationMetric)
-> Either
     String
     (Maybe AutoMLOverrideStrategy -> Int -> GetAccuracyMetricsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe OptimizationMetric)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"OptimizationMetric")
            Either
  String
  (Maybe AutoMLOverrideStrategy -> Int -> GetAccuracyMetricsResponse)
-> Either String (Maybe AutoMLOverrideStrategy)
-> Either String (Int -> GetAccuracyMetricsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AutoMLOverrideStrategy)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AutoMLOverrideStrategy")
            Either String (Int -> GetAccuracyMetricsResponse)
-> Either String Int -> Either String GetAccuracyMetricsResponse
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 GetAccuracyMetrics

instance Prelude.NFData GetAccuracyMetrics

instance Core.ToHeaders GetAccuracyMetrics where
  toHeaders :: GetAccuracyMetrics -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetAccuracyMetrics -> 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
"AmazonForecast.GetAccuracyMetrics" ::
                          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 GetAccuracyMetrics where
  toJSON :: GetAccuracyMetrics -> Value
toJSON GetAccuracyMetrics' {Text
predictorArn :: Text
$sel:predictorArn:GetAccuracyMetrics' :: GetAccuracyMetrics -> 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
"PredictorArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
predictorArn)]
      )

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

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

-- | /See:/ 'newGetAccuracyMetricsResponse' smart constructor.
data GetAccuracyMetricsResponse = GetAccuracyMetricsResponse'
  { -- | An array of results from evaluating the predictor.
    GetAccuracyMetricsResponse -> Maybe [EvaluationResult]
predictorEvaluationResults :: Prelude.Maybe [EvaluationResult],
    -- | The accuracy metric used to optimize the predictor.
    GetAccuracyMetricsResponse -> Maybe OptimizationMetric
optimizationMetric :: Prelude.Maybe OptimizationMetric,
    -- | The @LatencyOptimized@ AutoML override strategy is only available in
    -- private beta. Contact AWS Support or your account manager to learn more
    -- about access privileges.
    --
    -- The AutoML strategy used to train the predictor. Unless
    -- @LatencyOptimized@ is specified, the AutoML strategy optimizes predictor
    -- accuracy.
    --
    -- This parameter is only valid for predictors trained using AutoML.
    GetAccuracyMetricsResponse -> Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy :: Prelude.Maybe AutoMLOverrideStrategy,
    -- | The response's http status code.
    GetAccuracyMetricsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetAccuracyMetricsResponse -> GetAccuracyMetricsResponse -> Bool
(GetAccuracyMetricsResponse -> GetAccuracyMetricsResponse -> Bool)
-> (GetAccuracyMetricsResponse
    -> GetAccuracyMetricsResponse -> Bool)
-> Eq GetAccuracyMetricsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccuracyMetricsResponse -> GetAccuracyMetricsResponse -> Bool
$c/= :: GetAccuracyMetricsResponse -> GetAccuracyMetricsResponse -> Bool
== :: GetAccuracyMetricsResponse -> GetAccuracyMetricsResponse -> Bool
$c== :: GetAccuracyMetricsResponse -> GetAccuracyMetricsResponse -> Bool
Prelude.Eq, ReadPrec [GetAccuracyMetricsResponse]
ReadPrec GetAccuracyMetricsResponse
Int -> ReadS GetAccuracyMetricsResponse
ReadS [GetAccuracyMetricsResponse]
(Int -> ReadS GetAccuracyMetricsResponse)
-> ReadS [GetAccuracyMetricsResponse]
-> ReadPrec GetAccuracyMetricsResponse
-> ReadPrec [GetAccuracyMetricsResponse]
-> Read GetAccuracyMetricsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAccuracyMetricsResponse]
$creadListPrec :: ReadPrec [GetAccuracyMetricsResponse]
readPrec :: ReadPrec GetAccuracyMetricsResponse
$creadPrec :: ReadPrec GetAccuracyMetricsResponse
readList :: ReadS [GetAccuracyMetricsResponse]
$creadList :: ReadS [GetAccuracyMetricsResponse]
readsPrec :: Int -> ReadS GetAccuracyMetricsResponse
$creadsPrec :: Int -> ReadS GetAccuracyMetricsResponse
Prelude.Read, Int -> GetAccuracyMetricsResponse -> ShowS
[GetAccuracyMetricsResponse] -> ShowS
GetAccuracyMetricsResponse -> String
(Int -> GetAccuracyMetricsResponse -> ShowS)
-> (GetAccuracyMetricsResponse -> String)
-> ([GetAccuracyMetricsResponse] -> ShowS)
-> Show GetAccuracyMetricsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccuracyMetricsResponse] -> ShowS
$cshowList :: [GetAccuracyMetricsResponse] -> ShowS
show :: GetAccuracyMetricsResponse -> String
$cshow :: GetAccuracyMetricsResponse -> String
showsPrec :: Int -> GetAccuracyMetricsResponse -> ShowS
$cshowsPrec :: Int -> GetAccuracyMetricsResponse -> ShowS
Prelude.Show, (forall x.
 GetAccuracyMetricsResponse -> Rep GetAccuracyMetricsResponse x)
-> (forall x.
    Rep GetAccuracyMetricsResponse x -> GetAccuracyMetricsResponse)
-> Generic GetAccuracyMetricsResponse
forall x.
Rep GetAccuracyMetricsResponse x -> GetAccuracyMetricsResponse
forall x.
GetAccuracyMetricsResponse -> Rep GetAccuracyMetricsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAccuracyMetricsResponse x -> GetAccuracyMetricsResponse
$cfrom :: forall x.
GetAccuracyMetricsResponse -> Rep GetAccuracyMetricsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetAccuracyMetricsResponse' 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:
--
-- 'predictorEvaluationResults', 'getAccuracyMetricsResponse_predictorEvaluationResults' - An array of results from evaluating the predictor.
--
-- 'optimizationMetric', 'getAccuracyMetricsResponse_optimizationMetric' - The accuracy metric used to optimize the predictor.
--
-- 'autoMLOverrideStrategy', 'getAccuracyMetricsResponse_autoMLOverrideStrategy' - The @LatencyOptimized@ AutoML override strategy is only available in
-- private beta. Contact AWS Support or your account manager to learn more
-- about access privileges.
--
-- The AutoML strategy used to train the predictor. Unless
-- @LatencyOptimized@ is specified, the AutoML strategy optimizes predictor
-- accuracy.
--
-- This parameter is only valid for predictors trained using AutoML.
--
-- 'httpStatus', 'getAccuracyMetricsResponse_httpStatus' - The response's http status code.
newGetAccuracyMetricsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAccuracyMetricsResponse
newGetAccuracyMetricsResponse :: Int -> GetAccuracyMetricsResponse
newGetAccuracyMetricsResponse Int
pHttpStatus_ =
  GetAccuracyMetricsResponse' :: Maybe [EvaluationResult]
-> Maybe OptimizationMetric
-> Maybe AutoMLOverrideStrategy
-> Int
-> GetAccuracyMetricsResponse
GetAccuracyMetricsResponse'
    { $sel:predictorEvaluationResults:GetAccuracyMetricsResponse' :: Maybe [EvaluationResult]
predictorEvaluationResults =
        Maybe [EvaluationResult]
forall a. Maybe a
Prelude.Nothing,
      $sel:optimizationMetric:GetAccuracyMetricsResponse' :: Maybe OptimizationMetric
optimizationMetric = Maybe OptimizationMetric
forall a. Maybe a
Prelude.Nothing,
      $sel:autoMLOverrideStrategy:GetAccuracyMetricsResponse' :: Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy = Maybe AutoMLOverrideStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAccuracyMetricsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of results from evaluating the predictor.
getAccuracyMetricsResponse_predictorEvaluationResults :: Lens.Lens' GetAccuracyMetricsResponse (Prelude.Maybe [EvaluationResult])
getAccuracyMetricsResponse_predictorEvaluationResults :: (Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> GetAccuracyMetricsResponse -> f GetAccuracyMetricsResponse
getAccuracyMetricsResponse_predictorEvaluationResults = (GetAccuracyMetricsResponse -> Maybe [EvaluationResult])
-> (GetAccuracyMetricsResponse
    -> Maybe [EvaluationResult] -> GetAccuracyMetricsResponse)
-> Lens
     GetAccuracyMetricsResponse
     GetAccuracyMetricsResponse
     (Maybe [EvaluationResult])
     (Maybe [EvaluationResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccuracyMetricsResponse' {Maybe [EvaluationResult]
predictorEvaluationResults :: Maybe [EvaluationResult]
$sel:predictorEvaluationResults:GetAccuracyMetricsResponse' :: GetAccuracyMetricsResponse -> Maybe [EvaluationResult]
predictorEvaluationResults} -> Maybe [EvaluationResult]
predictorEvaluationResults) (\s :: GetAccuracyMetricsResponse
s@GetAccuracyMetricsResponse' {} Maybe [EvaluationResult]
a -> GetAccuracyMetricsResponse
s {$sel:predictorEvaluationResults:GetAccuracyMetricsResponse' :: Maybe [EvaluationResult]
predictorEvaluationResults = Maybe [EvaluationResult]
a} :: GetAccuracyMetricsResponse) ((Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
 -> GetAccuracyMetricsResponse -> f GetAccuracyMetricsResponse)
-> ((Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
    -> Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> (Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> GetAccuracyMetricsResponse
-> f GetAccuracyMetricsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EvaluationResult]
  [EvaluationResult]
  [EvaluationResult]
  [EvaluationResult]
-> Iso
     (Maybe [EvaluationResult])
     (Maybe [EvaluationResult])
     (Maybe [EvaluationResult])
     (Maybe [EvaluationResult])
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
  [EvaluationResult]
  [EvaluationResult]
  [EvaluationResult]
  [EvaluationResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The accuracy metric used to optimize the predictor.
getAccuracyMetricsResponse_optimizationMetric :: Lens.Lens' GetAccuracyMetricsResponse (Prelude.Maybe OptimizationMetric)
getAccuracyMetricsResponse_optimizationMetric :: (Maybe OptimizationMetric -> f (Maybe OptimizationMetric))
-> GetAccuracyMetricsResponse -> f GetAccuracyMetricsResponse
getAccuracyMetricsResponse_optimizationMetric = (GetAccuracyMetricsResponse -> Maybe OptimizationMetric)
-> (GetAccuracyMetricsResponse
    -> Maybe OptimizationMetric -> GetAccuracyMetricsResponse)
-> Lens
     GetAccuracyMetricsResponse
     GetAccuracyMetricsResponse
     (Maybe OptimizationMetric)
     (Maybe OptimizationMetric)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccuracyMetricsResponse' {Maybe OptimizationMetric
optimizationMetric :: Maybe OptimizationMetric
$sel:optimizationMetric:GetAccuracyMetricsResponse' :: GetAccuracyMetricsResponse -> Maybe OptimizationMetric
optimizationMetric} -> Maybe OptimizationMetric
optimizationMetric) (\s :: GetAccuracyMetricsResponse
s@GetAccuracyMetricsResponse' {} Maybe OptimizationMetric
a -> GetAccuracyMetricsResponse
s {$sel:optimizationMetric:GetAccuracyMetricsResponse' :: Maybe OptimizationMetric
optimizationMetric = Maybe OptimizationMetric
a} :: GetAccuracyMetricsResponse)

-- | The @LatencyOptimized@ AutoML override strategy is only available in
-- private beta. Contact AWS Support or your account manager to learn more
-- about access privileges.
--
-- The AutoML strategy used to train the predictor. Unless
-- @LatencyOptimized@ is specified, the AutoML strategy optimizes predictor
-- accuracy.
--
-- This parameter is only valid for predictors trained using AutoML.
getAccuracyMetricsResponse_autoMLOverrideStrategy :: Lens.Lens' GetAccuracyMetricsResponse (Prelude.Maybe AutoMLOverrideStrategy)
getAccuracyMetricsResponse_autoMLOverrideStrategy :: (Maybe AutoMLOverrideStrategy -> f (Maybe AutoMLOverrideStrategy))
-> GetAccuracyMetricsResponse -> f GetAccuracyMetricsResponse
getAccuracyMetricsResponse_autoMLOverrideStrategy = (GetAccuracyMetricsResponse -> Maybe AutoMLOverrideStrategy)
-> (GetAccuracyMetricsResponse
    -> Maybe AutoMLOverrideStrategy -> GetAccuracyMetricsResponse)
-> Lens
     GetAccuracyMetricsResponse
     GetAccuracyMetricsResponse
     (Maybe AutoMLOverrideStrategy)
     (Maybe AutoMLOverrideStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccuracyMetricsResponse' {Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy :: Maybe AutoMLOverrideStrategy
$sel:autoMLOverrideStrategy:GetAccuracyMetricsResponse' :: GetAccuracyMetricsResponse -> Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy} -> Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy) (\s :: GetAccuracyMetricsResponse
s@GetAccuracyMetricsResponse' {} Maybe AutoMLOverrideStrategy
a -> GetAccuracyMetricsResponse
s {$sel:autoMLOverrideStrategy:GetAccuracyMetricsResponse' :: Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy = Maybe AutoMLOverrideStrategy
a} :: GetAccuracyMetricsResponse)

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

instance Prelude.NFData GetAccuracyMetricsResponse