{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Forecast.Types.PredictorMonitorEvaluation
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Forecast.Types.PredictorMonitorEvaluation 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.MetricResult
import Amazonka.Forecast.Types.MonitorDataSource
import Amazonka.Forecast.Types.PredictorEvent
import qualified Amazonka.Prelude as Prelude

-- | Describes the results of a monitor evaluation.
--
-- /See:/ 'newPredictorMonitorEvaluation' smart constructor.
data PredictorMonitorEvaluation = PredictorMonitorEvaluation'
  { -- | The status of the monitor evaluation. The state can be @SUCCESS@ or
    -- @FAILURE@.
    PredictorMonitorEvaluation -> Maybe Text
evaluationState :: Prelude.Maybe Prelude.Text,
    -- | The timestamp that indicates when the monitor evaluation was started.
    PredictorMonitorEvaluation -> Maybe POSIX
evaluationTime :: Prelude.Maybe Data.POSIX,
    -- | Information about any errors that may have occurred during the monitor
    -- evaluation.
    PredictorMonitorEvaluation -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | A list of metrics Forecast calculated when monitoring a predictor. You
    -- can compare the value for each metric in the list to the metric\'s value
    -- in the Baseline to see how your predictor\'s performance is changing.
    PredictorMonitorEvaluation -> Maybe [MetricResult]
metricResults :: Prelude.Maybe [MetricResult],
    -- | The Amazon Resource Name (ARN) of the monitor resource.
    PredictorMonitorEvaluation -> Maybe Text
monitorArn :: Prelude.Maybe Prelude.Text,
    -- | The source of the data the monitor resource used during the evaluation.
    PredictorMonitorEvaluation -> Maybe MonitorDataSource
monitorDataSource :: Prelude.Maybe MonitorDataSource,
    -- | The number of items considered during the evaluation.
    PredictorMonitorEvaluation -> Maybe Integer
numItemsEvaluated :: Prelude.Maybe Prelude.Integer,
    -- | Provides details about a predictor event, such as a retraining.
    PredictorMonitorEvaluation -> Maybe PredictorEvent
predictorEvent :: Prelude.Maybe PredictorEvent,
    -- | The Amazon Resource Name (ARN) of the resource to monitor.
    PredictorMonitorEvaluation -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | The timestamp that indicates the end of the window that is used for
    -- monitor evaluation.
    PredictorMonitorEvaluation -> Maybe POSIX
windowEndDatetime :: Prelude.Maybe Data.POSIX,
    -- | The timestamp that indicates the start of the window that is used for
    -- monitor evaluation.
    PredictorMonitorEvaluation -> Maybe POSIX
windowStartDatetime :: Prelude.Maybe Data.POSIX
  }
  deriving (PredictorMonitorEvaluation -> PredictorMonitorEvaluation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PredictorMonitorEvaluation -> PredictorMonitorEvaluation -> Bool
$c/= :: PredictorMonitorEvaluation -> PredictorMonitorEvaluation -> Bool
== :: PredictorMonitorEvaluation -> PredictorMonitorEvaluation -> Bool
$c== :: PredictorMonitorEvaluation -> PredictorMonitorEvaluation -> Bool
Prelude.Eq, ReadPrec [PredictorMonitorEvaluation]
ReadPrec PredictorMonitorEvaluation
Int -> ReadS PredictorMonitorEvaluation
ReadS [PredictorMonitorEvaluation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PredictorMonitorEvaluation]
$creadListPrec :: ReadPrec [PredictorMonitorEvaluation]
readPrec :: ReadPrec PredictorMonitorEvaluation
$creadPrec :: ReadPrec PredictorMonitorEvaluation
readList :: ReadS [PredictorMonitorEvaluation]
$creadList :: ReadS [PredictorMonitorEvaluation]
readsPrec :: Int -> ReadS PredictorMonitorEvaluation
$creadsPrec :: Int -> ReadS PredictorMonitorEvaluation
Prelude.Read, Int -> PredictorMonitorEvaluation -> ShowS
[PredictorMonitorEvaluation] -> ShowS
PredictorMonitorEvaluation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PredictorMonitorEvaluation] -> ShowS
$cshowList :: [PredictorMonitorEvaluation] -> ShowS
show :: PredictorMonitorEvaluation -> String
$cshow :: PredictorMonitorEvaluation -> String
showsPrec :: Int -> PredictorMonitorEvaluation -> ShowS
$cshowsPrec :: Int -> PredictorMonitorEvaluation -> ShowS
Prelude.Show, forall x.
Rep PredictorMonitorEvaluation x -> PredictorMonitorEvaluation
forall x.
PredictorMonitorEvaluation -> Rep PredictorMonitorEvaluation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PredictorMonitorEvaluation x -> PredictorMonitorEvaluation
$cfrom :: forall x.
PredictorMonitorEvaluation -> Rep PredictorMonitorEvaluation x
Prelude.Generic)

-- |
-- Create a value of 'PredictorMonitorEvaluation' 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:
--
-- 'evaluationState', 'predictorMonitorEvaluation_evaluationState' - The status of the monitor evaluation. The state can be @SUCCESS@ or
-- @FAILURE@.
--
-- 'evaluationTime', 'predictorMonitorEvaluation_evaluationTime' - The timestamp that indicates when the monitor evaluation was started.
--
-- 'message', 'predictorMonitorEvaluation_message' - Information about any errors that may have occurred during the monitor
-- evaluation.
--
-- 'metricResults', 'predictorMonitorEvaluation_metricResults' - A list of metrics Forecast calculated when monitoring a predictor. You
-- can compare the value for each metric in the list to the metric\'s value
-- in the Baseline to see how your predictor\'s performance is changing.
--
-- 'monitorArn', 'predictorMonitorEvaluation_monitorArn' - The Amazon Resource Name (ARN) of the monitor resource.
--
-- 'monitorDataSource', 'predictorMonitorEvaluation_monitorDataSource' - The source of the data the monitor resource used during the evaluation.
--
-- 'numItemsEvaluated', 'predictorMonitorEvaluation_numItemsEvaluated' - The number of items considered during the evaluation.
--
-- 'predictorEvent', 'predictorMonitorEvaluation_predictorEvent' - Provides details about a predictor event, such as a retraining.
--
-- 'resourceArn', 'predictorMonitorEvaluation_resourceArn' - The Amazon Resource Name (ARN) of the resource to monitor.
--
-- 'windowEndDatetime', 'predictorMonitorEvaluation_windowEndDatetime' - The timestamp that indicates the end of the window that is used for
-- monitor evaluation.
--
-- 'windowStartDatetime', 'predictorMonitorEvaluation_windowStartDatetime' - The timestamp that indicates the start of the window that is used for
-- monitor evaluation.
newPredictorMonitorEvaluation ::
  PredictorMonitorEvaluation
newPredictorMonitorEvaluation :: PredictorMonitorEvaluation
newPredictorMonitorEvaluation =
  PredictorMonitorEvaluation'
    { $sel:evaluationState:PredictorMonitorEvaluation' :: Maybe Text
evaluationState =
        forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationTime:PredictorMonitorEvaluation' :: Maybe POSIX
evaluationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:message:PredictorMonitorEvaluation' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
      $sel:metricResults:PredictorMonitorEvaluation' :: Maybe [MetricResult]
metricResults = forall a. Maybe a
Prelude.Nothing,
      $sel:monitorArn:PredictorMonitorEvaluation' :: Maybe Text
monitorArn = forall a. Maybe a
Prelude.Nothing,
      $sel:monitorDataSource:PredictorMonitorEvaluation' :: Maybe MonitorDataSource
monitorDataSource = forall a. Maybe a
Prelude.Nothing,
      $sel:numItemsEvaluated:PredictorMonitorEvaluation' :: Maybe Integer
numItemsEvaluated = forall a. Maybe a
Prelude.Nothing,
      $sel:predictorEvent:PredictorMonitorEvaluation' :: Maybe PredictorEvent
predictorEvent = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:PredictorMonitorEvaluation' :: Maybe Text
resourceArn = forall a. Maybe a
Prelude.Nothing,
      $sel:windowEndDatetime:PredictorMonitorEvaluation' :: Maybe POSIX
windowEndDatetime = forall a. Maybe a
Prelude.Nothing,
      $sel:windowStartDatetime:PredictorMonitorEvaluation' :: Maybe POSIX
windowStartDatetime = forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the monitor evaluation. The state can be @SUCCESS@ or
-- @FAILURE@.
predictorMonitorEvaluation_evaluationState :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe Prelude.Text)
predictorMonitorEvaluation_evaluationState :: Lens' PredictorMonitorEvaluation (Maybe Text)
predictorMonitorEvaluation_evaluationState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe Text
evaluationState :: Maybe Text
$sel:evaluationState:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
evaluationState} -> Maybe Text
evaluationState) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe Text
a -> PredictorMonitorEvaluation
s {$sel:evaluationState:PredictorMonitorEvaluation' :: Maybe Text
evaluationState = Maybe Text
a} :: PredictorMonitorEvaluation)

-- | The timestamp that indicates when the monitor evaluation was started.
predictorMonitorEvaluation_evaluationTime :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe Prelude.UTCTime)
predictorMonitorEvaluation_evaluationTime :: Lens' PredictorMonitorEvaluation (Maybe UTCTime)
predictorMonitorEvaluation_evaluationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe POSIX
evaluationTime :: Maybe POSIX
$sel:evaluationTime:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe POSIX
evaluationTime} -> Maybe POSIX
evaluationTime) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe POSIX
a -> PredictorMonitorEvaluation
s {$sel:evaluationTime:PredictorMonitorEvaluation' :: Maybe POSIX
evaluationTime = Maybe POSIX
a} :: PredictorMonitorEvaluation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Information about any errors that may have occurred during the monitor
-- evaluation.
predictorMonitorEvaluation_message :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe Prelude.Text)
predictorMonitorEvaluation_message :: Lens' PredictorMonitorEvaluation (Maybe Text)
predictorMonitorEvaluation_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe Text
message :: Maybe Text
$sel:message:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
message} -> Maybe Text
message) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe Text
a -> PredictorMonitorEvaluation
s {$sel:message:PredictorMonitorEvaluation' :: Maybe Text
message = Maybe Text
a} :: PredictorMonitorEvaluation)

-- | A list of metrics Forecast calculated when monitoring a predictor. You
-- can compare the value for each metric in the list to the metric\'s value
-- in the Baseline to see how your predictor\'s performance is changing.
predictorMonitorEvaluation_metricResults :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe [MetricResult])
predictorMonitorEvaluation_metricResults :: Lens' PredictorMonitorEvaluation (Maybe [MetricResult])
predictorMonitorEvaluation_metricResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe [MetricResult]
metricResults :: Maybe [MetricResult]
$sel:metricResults:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe [MetricResult]
metricResults} -> Maybe [MetricResult]
metricResults) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe [MetricResult]
a -> PredictorMonitorEvaluation
s {$sel:metricResults:PredictorMonitorEvaluation' :: Maybe [MetricResult]
metricResults = Maybe [MetricResult]
a} :: PredictorMonitorEvaluation) 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 Amazon Resource Name (ARN) of the monitor resource.
predictorMonitorEvaluation_monitorArn :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe Prelude.Text)
predictorMonitorEvaluation_monitorArn :: Lens' PredictorMonitorEvaluation (Maybe Text)
predictorMonitorEvaluation_monitorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe Text
monitorArn :: Maybe Text
$sel:monitorArn:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
monitorArn} -> Maybe Text
monitorArn) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe Text
a -> PredictorMonitorEvaluation
s {$sel:monitorArn:PredictorMonitorEvaluation' :: Maybe Text
monitorArn = Maybe Text
a} :: PredictorMonitorEvaluation)

-- | The source of the data the monitor resource used during the evaluation.
predictorMonitorEvaluation_monitorDataSource :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe MonitorDataSource)
predictorMonitorEvaluation_monitorDataSource :: Lens' PredictorMonitorEvaluation (Maybe MonitorDataSource)
predictorMonitorEvaluation_monitorDataSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe MonitorDataSource
monitorDataSource :: Maybe MonitorDataSource
$sel:monitorDataSource:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe MonitorDataSource
monitorDataSource} -> Maybe MonitorDataSource
monitorDataSource) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe MonitorDataSource
a -> PredictorMonitorEvaluation
s {$sel:monitorDataSource:PredictorMonitorEvaluation' :: Maybe MonitorDataSource
monitorDataSource = Maybe MonitorDataSource
a} :: PredictorMonitorEvaluation)

-- | The number of items considered during the evaluation.
predictorMonitorEvaluation_numItemsEvaluated :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe Prelude.Integer)
predictorMonitorEvaluation_numItemsEvaluated :: Lens' PredictorMonitorEvaluation (Maybe Integer)
predictorMonitorEvaluation_numItemsEvaluated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe Integer
numItemsEvaluated :: Maybe Integer
$sel:numItemsEvaluated:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Integer
numItemsEvaluated} -> Maybe Integer
numItemsEvaluated) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe Integer
a -> PredictorMonitorEvaluation
s {$sel:numItemsEvaluated:PredictorMonitorEvaluation' :: Maybe Integer
numItemsEvaluated = Maybe Integer
a} :: PredictorMonitorEvaluation)

-- | Provides details about a predictor event, such as a retraining.
predictorMonitorEvaluation_predictorEvent :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe PredictorEvent)
predictorMonitorEvaluation_predictorEvent :: Lens' PredictorMonitorEvaluation (Maybe PredictorEvent)
predictorMonitorEvaluation_predictorEvent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe PredictorEvent
predictorEvent :: Maybe PredictorEvent
$sel:predictorEvent:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe PredictorEvent
predictorEvent} -> Maybe PredictorEvent
predictorEvent) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe PredictorEvent
a -> PredictorMonitorEvaluation
s {$sel:predictorEvent:PredictorMonitorEvaluation' :: Maybe PredictorEvent
predictorEvent = Maybe PredictorEvent
a} :: PredictorMonitorEvaluation)

-- | The Amazon Resource Name (ARN) of the resource to monitor.
predictorMonitorEvaluation_resourceArn :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe Prelude.Text)
predictorMonitorEvaluation_resourceArn :: Lens' PredictorMonitorEvaluation (Maybe Text)
predictorMonitorEvaluation_resourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe Text
a -> PredictorMonitorEvaluation
s {$sel:resourceArn:PredictorMonitorEvaluation' :: Maybe Text
resourceArn = Maybe Text
a} :: PredictorMonitorEvaluation)

-- | The timestamp that indicates the end of the window that is used for
-- monitor evaluation.
predictorMonitorEvaluation_windowEndDatetime :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe Prelude.UTCTime)
predictorMonitorEvaluation_windowEndDatetime :: Lens' PredictorMonitorEvaluation (Maybe UTCTime)
predictorMonitorEvaluation_windowEndDatetime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe POSIX
windowEndDatetime :: Maybe POSIX
$sel:windowEndDatetime:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe POSIX
windowEndDatetime} -> Maybe POSIX
windowEndDatetime) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe POSIX
a -> PredictorMonitorEvaluation
s {$sel:windowEndDatetime:PredictorMonitorEvaluation' :: Maybe POSIX
windowEndDatetime = Maybe POSIX
a} :: PredictorMonitorEvaluation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The timestamp that indicates the start of the window that is used for
-- monitor evaluation.
predictorMonitorEvaluation_windowStartDatetime :: Lens.Lens' PredictorMonitorEvaluation (Prelude.Maybe Prelude.UTCTime)
predictorMonitorEvaluation_windowStartDatetime :: Lens' PredictorMonitorEvaluation (Maybe UTCTime)
predictorMonitorEvaluation_windowStartDatetime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorMonitorEvaluation' {Maybe POSIX
windowStartDatetime :: Maybe POSIX
$sel:windowStartDatetime:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe POSIX
windowStartDatetime} -> Maybe POSIX
windowStartDatetime) (\s :: PredictorMonitorEvaluation
s@PredictorMonitorEvaluation' {} Maybe POSIX
a -> PredictorMonitorEvaluation
s {$sel:windowStartDatetime:PredictorMonitorEvaluation' :: Maybe POSIX
windowStartDatetime = Maybe POSIX
a} :: PredictorMonitorEvaluation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Data.FromJSON PredictorMonitorEvaluation where
  parseJSON :: Value -> Parser PredictorMonitorEvaluation
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"PredictorMonitorEvaluation"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [MetricResult]
-> Maybe Text
-> Maybe MonitorDataSource
-> Maybe Integer
-> Maybe PredictorEvent
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> PredictorMonitorEvaluation
PredictorMonitorEvaluation'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EvaluationState")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EvaluationTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Message")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MetricResults" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MonitorArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MonitorDataSource")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NumItemsEvaluated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PredictorEvent")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResourceArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WindowEndDatetime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WindowStartDatetime")
      )

instance Prelude.Hashable PredictorMonitorEvaluation where
  hashWithSalt :: Int -> PredictorMonitorEvaluation -> Int
hashWithSalt Int
_salt PredictorMonitorEvaluation' {Maybe Integer
Maybe [MetricResult]
Maybe Text
Maybe POSIX
Maybe MonitorDataSource
Maybe PredictorEvent
windowStartDatetime :: Maybe POSIX
windowEndDatetime :: Maybe POSIX
resourceArn :: Maybe Text
predictorEvent :: Maybe PredictorEvent
numItemsEvaluated :: Maybe Integer
monitorDataSource :: Maybe MonitorDataSource
monitorArn :: Maybe Text
metricResults :: Maybe [MetricResult]
message :: Maybe Text
evaluationTime :: Maybe POSIX
evaluationState :: Maybe Text
$sel:windowStartDatetime:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe POSIX
$sel:windowEndDatetime:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe POSIX
$sel:resourceArn:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
$sel:predictorEvent:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe PredictorEvent
$sel:numItemsEvaluated:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Integer
$sel:monitorDataSource:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe MonitorDataSource
$sel:monitorArn:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
$sel:metricResults:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe [MetricResult]
$sel:message:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
$sel:evaluationTime:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe POSIX
$sel:evaluationState:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
evaluationState
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
evaluationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [MetricResult]
metricResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
monitorArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MonitorDataSource
monitorDataSource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
numItemsEvaluated
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PredictorEvent
predictorEvent
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
windowEndDatetime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
windowStartDatetime

instance Prelude.NFData PredictorMonitorEvaluation where
  rnf :: PredictorMonitorEvaluation -> ()
rnf PredictorMonitorEvaluation' {Maybe Integer
Maybe [MetricResult]
Maybe Text
Maybe POSIX
Maybe MonitorDataSource
Maybe PredictorEvent
windowStartDatetime :: Maybe POSIX
windowEndDatetime :: Maybe POSIX
resourceArn :: Maybe Text
predictorEvent :: Maybe PredictorEvent
numItemsEvaluated :: Maybe Integer
monitorDataSource :: Maybe MonitorDataSource
monitorArn :: Maybe Text
metricResults :: Maybe [MetricResult]
message :: Maybe Text
evaluationTime :: Maybe POSIX
evaluationState :: Maybe Text
$sel:windowStartDatetime:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe POSIX
$sel:windowEndDatetime:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe POSIX
$sel:resourceArn:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
$sel:predictorEvent:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe PredictorEvent
$sel:numItemsEvaluated:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Integer
$sel:monitorDataSource:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe MonitorDataSource
$sel:monitorArn:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
$sel:metricResults:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe [MetricResult]
$sel:message:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
$sel:evaluationTime:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe POSIX
$sel:evaluationState:PredictorMonitorEvaluation' :: PredictorMonitorEvaluation -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
evaluationState
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
evaluationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MetricResult]
metricResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
monitorArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MonitorDataSource
monitorDataSource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
numItemsEvaluated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PredictorEvent
predictorEvent
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
windowEndDatetime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
windowStartDatetime