{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_autoMLOverrideStrategy,
    getAccuracyMetricsResponse_isAutoPredictor,
    getAccuracyMetricsResponse_optimizationMetric,
    getAccuracyMetricsResponse_predictorEvaluationResults,
    getAccuracyMetricsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Forecast.Types
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
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]
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
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. 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' {$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 :: Lens' GetAccuracyMetrics Text
getAccuracyMetrics_predictorArn = 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 :: (Service -> Service)
-> GetAccuracyMetrics -> Request GetAccuracyMetrics
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetAccuracyMetrics
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetAccuracyMetrics)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe AutoMLOverrideStrategy
-> Maybe Bool
-> Maybe OptimizationMetric
-> Maybe [EvaluationResult]
-> Int
-> GetAccuracyMetricsResponse
GetAccuracyMetricsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"AutoMLOverrideStrategy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"IsAutoPredictor")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"OptimizationMetric")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PredictorEvaluationResults"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetAccuracyMetrics where
  hashWithSalt :: Int -> GetAccuracyMetrics -> Int
hashWithSalt Int
_salt GetAccuracyMetrics' {Text
predictorArn :: Text
$sel:predictorArn:GetAccuracyMetrics' :: GetAccuracyMetrics -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
predictorArn

instance Prelude.NFData GetAccuracyMetrics where
  rnf :: GetAccuracyMetrics -> ()
rnf GetAccuracyMetrics' {Text
predictorArn :: Text
$sel:predictorArn:GetAccuracyMetrics' :: GetAccuracyMetrics -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
predictorArn

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

instance Data.ToJSON GetAccuracyMetrics where
  toJSON :: GetAccuracyMetrics -> Value
toJSON GetAccuracyMetrics' {Text
predictorArn :: Text
$sel:predictorArn:GetAccuracyMetrics' :: GetAccuracyMetrics -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"PredictorArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
predictorArn)]
      )

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

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

-- | /See:/ 'newGetAccuracyMetricsResponse' smart constructor.
data GetAccuracyMetricsResponse = 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 -> Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy :: Prelude.Maybe AutoMLOverrideStrategy,
    -- | Whether the predictor was created with CreateAutoPredictor.
    GetAccuracyMetricsResponse -> Maybe Bool
isAutoPredictor :: Prelude.Maybe Prelude.Bool,
    -- | The accuracy metric used to optimize the predictor.
    GetAccuracyMetricsResponse -> Maybe OptimizationMetric
optimizationMetric :: Prelude.Maybe OptimizationMetric,
    -- | An array of results from evaluating the predictor.
    GetAccuracyMetricsResponse -> Maybe [EvaluationResult]
predictorEvaluationResults :: Prelude.Maybe [EvaluationResult],
    -- | The response's http status code.
    GetAccuracyMetricsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetAccuracyMetricsResponse -> GetAccuracyMetricsResponse -> Bool
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]
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
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.
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:
--
-- '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.
--
-- 'isAutoPredictor', 'getAccuracyMetricsResponse_isAutoPredictor' - Whether the predictor was created with CreateAutoPredictor.
--
-- 'optimizationMetric', 'getAccuracyMetricsResponse_optimizationMetric' - The accuracy metric used to optimize the predictor.
--
-- 'predictorEvaluationResults', 'getAccuracyMetricsResponse_predictorEvaluationResults' - An array of results from evaluating the predictor.
--
-- 'httpStatus', 'getAccuracyMetricsResponse_httpStatus' - The response's http status code.
newGetAccuracyMetricsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAccuracyMetricsResponse
newGetAccuracyMetricsResponse :: Int -> GetAccuracyMetricsResponse
newGetAccuracyMetricsResponse Int
pHttpStatus_ =
  GetAccuracyMetricsResponse'
    { $sel:autoMLOverrideStrategy:GetAccuracyMetricsResponse' :: Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy =
        forall a. Maybe a
Prelude.Nothing,
      $sel:isAutoPredictor:GetAccuracyMetricsResponse' :: Maybe Bool
isAutoPredictor = forall a. Maybe a
Prelude.Nothing,
      $sel:optimizationMetric:GetAccuracyMetricsResponse' :: Maybe OptimizationMetric
optimizationMetric = forall a. Maybe a
Prelude.Nothing,
      $sel:predictorEvaluationResults:GetAccuracyMetricsResponse' :: Maybe [EvaluationResult]
predictorEvaluationResults = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAccuracyMetricsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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 :: Lens' GetAccuracyMetricsResponse (Maybe AutoMLOverrideStrategy)
getAccuracyMetricsResponse_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)

-- | Whether the predictor was created with CreateAutoPredictor.
getAccuracyMetricsResponse_isAutoPredictor :: Lens.Lens' GetAccuracyMetricsResponse (Prelude.Maybe Prelude.Bool)
getAccuracyMetricsResponse_isAutoPredictor :: Lens' GetAccuracyMetricsResponse (Maybe Bool)
getAccuracyMetricsResponse_isAutoPredictor = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccuracyMetricsResponse' {Maybe Bool
isAutoPredictor :: Maybe Bool
$sel:isAutoPredictor:GetAccuracyMetricsResponse' :: GetAccuracyMetricsResponse -> Maybe Bool
isAutoPredictor} -> Maybe Bool
isAutoPredictor) (\s :: GetAccuracyMetricsResponse
s@GetAccuracyMetricsResponse' {} Maybe Bool
a -> GetAccuracyMetricsResponse
s {$sel:isAutoPredictor:GetAccuracyMetricsResponse' :: Maybe Bool
isAutoPredictor = Maybe Bool
a} :: GetAccuracyMetricsResponse)

-- | The accuracy metric used to optimize the predictor.
getAccuracyMetricsResponse_optimizationMetric :: Lens.Lens' GetAccuracyMetricsResponse (Prelude.Maybe OptimizationMetric)
getAccuracyMetricsResponse_optimizationMetric :: Lens' GetAccuracyMetricsResponse (Maybe OptimizationMetric)
getAccuracyMetricsResponse_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)

-- | An array of results from evaluating the predictor.
getAccuracyMetricsResponse_predictorEvaluationResults :: Lens.Lens' GetAccuracyMetricsResponse (Prelude.Maybe [EvaluationResult])
getAccuracyMetricsResponse_predictorEvaluationResults :: Lens' GetAccuracyMetricsResponse (Maybe [EvaluationResult])
getAccuracyMetricsResponse_predictorEvaluationResults = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
getAccuracyMetricsResponse_httpStatus :: Lens.Lens' GetAccuracyMetricsResponse Prelude.Int
getAccuracyMetricsResponse_httpStatus :: Lens' GetAccuracyMetricsResponse Int
getAccuracyMetricsResponse_httpStatus = 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 where
  rnf :: GetAccuracyMetricsResponse -> ()
rnf GetAccuracyMetricsResponse' {Int
Maybe Bool
Maybe [EvaluationResult]
Maybe AutoMLOverrideStrategy
Maybe OptimizationMetric
httpStatus :: Int
predictorEvaluationResults :: Maybe [EvaluationResult]
optimizationMetric :: Maybe OptimizationMetric
isAutoPredictor :: Maybe Bool
autoMLOverrideStrategy :: Maybe AutoMLOverrideStrategy
$sel:httpStatus:GetAccuracyMetricsResponse' :: GetAccuracyMetricsResponse -> Int
$sel:predictorEvaluationResults:GetAccuracyMetricsResponse' :: GetAccuracyMetricsResponse -> Maybe [EvaluationResult]
$sel:optimizationMetric:GetAccuracyMetricsResponse' :: GetAccuracyMetricsResponse -> Maybe OptimizationMetric
$sel:isAutoPredictor:GetAccuracyMetricsResponse' :: GetAccuracyMetricsResponse -> Maybe Bool
$sel:autoMLOverrideStrategy:GetAccuracyMetricsResponse' :: GetAccuracyMetricsResponse -> Maybe AutoMLOverrideStrategy
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isAutoPredictor
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OptimizationMetric
optimizationMetric
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [EvaluationResult]
predictorEvaluationResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus