{-# 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.SageMaker.Types.TrialComponentMetricSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.TrialComponentMetricSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A summary of the metrics of a trial component.
--
-- /See:/ 'newTrialComponentMetricSummary' smart constructor.
data TrialComponentMetricSummary = TrialComponentMetricSummary'
  { -- | The maximum value of the metric.
    TrialComponentMetricSummary -> Maybe Double
max :: Prelude.Maybe Prelude.Double,
    -- | The Amazon Resource Name (ARN) of the source.
    TrialComponentMetricSummary -> Maybe Text
sourceArn :: Prelude.Maybe Prelude.Text,
    -- | The average value of the metric.
    TrialComponentMetricSummary -> Maybe Double
avg :: Prelude.Maybe Prelude.Double,
    -- | The number of samples used to generate the metric.
    TrialComponentMetricSummary -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
    -- | The name of the metric.
    TrialComponentMetricSummary -> Maybe Text
metricName :: Prelude.Maybe Prelude.Text,
    -- | The standard deviation of the metric.
    TrialComponentMetricSummary -> Maybe Double
stdDev :: Prelude.Maybe Prelude.Double,
    -- | The minimum value of the metric.
    TrialComponentMetricSummary -> Maybe Double
min :: Prelude.Maybe Prelude.Double,
    -- | The most recent value of the metric.
    TrialComponentMetricSummary -> Maybe Double
last :: Prelude.Maybe Prelude.Double,
    -- | When the metric was last updated.
    TrialComponentMetricSummary -> Maybe POSIX
timeStamp :: Prelude.Maybe Core.POSIX
  }
  deriving (TrialComponentMetricSummary -> TrialComponentMetricSummary -> Bool
(TrialComponentMetricSummary
 -> TrialComponentMetricSummary -> Bool)
-> (TrialComponentMetricSummary
    -> TrialComponentMetricSummary -> Bool)
-> Eq TrialComponentMetricSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrialComponentMetricSummary -> TrialComponentMetricSummary -> Bool
$c/= :: TrialComponentMetricSummary -> TrialComponentMetricSummary -> Bool
== :: TrialComponentMetricSummary -> TrialComponentMetricSummary -> Bool
$c== :: TrialComponentMetricSummary -> TrialComponentMetricSummary -> Bool
Prelude.Eq, ReadPrec [TrialComponentMetricSummary]
ReadPrec TrialComponentMetricSummary
Int -> ReadS TrialComponentMetricSummary
ReadS [TrialComponentMetricSummary]
(Int -> ReadS TrialComponentMetricSummary)
-> ReadS [TrialComponentMetricSummary]
-> ReadPrec TrialComponentMetricSummary
-> ReadPrec [TrialComponentMetricSummary]
-> Read TrialComponentMetricSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrialComponentMetricSummary]
$creadListPrec :: ReadPrec [TrialComponentMetricSummary]
readPrec :: ReadPrec TrialComponentMetricSummary
$creadPrec :: ReadPrec TrialComponentMetricSummary
readList :: ReadS [TrialComponentMetricSummary]
$creadList :: ReadS [TrialComponentMetricSummary]
readsPrec :: Int -> ReadS TrialComponentMetricSummary
$creadsPrec :: Int -> ReadS TrialComponentMetricSummary
Prelude.Read, Int -> TrialComponentMetricSummary -> ShowS
[TrialComponentMetricSummary] -> ShowS
TrialComponentMetricSummary -> String
(Int -> TrialComponentMetricSummary -> ShowS)
-> (TrialComponentMetricSummary -> String)
-> ([TrialComponentMetricSummary] -> ShowS)
-> Show TrialComponentMetricSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrialComponentMetricSummary] -> ShowS
$cshowList :: [TrialComponentMetricSummary] -> ShowS
show :: TrialComponentMetricSummary -> String
$cshow :: TrialComponentMetricSummary -> String
showsPrec :: Int -> TrialComponentMetricSummary -> ShowS
$cshowsPrec :: Int -> TrialComponentMetricSummary -> ShowS
Prelude.Show, (forall x.
 TrialComponentMetricSummary -> Rep TrialComponentMetricSummary x)
-> (forall x.
    Rep TrialComponentMetricSummary x -> TrialComponentMetricSummary)
-> Generic TrialComponentMetricSummary
forall x.
Rep TrialComponentMetricSummary x -> TrialComponentMetricSummary
forall x.
TrialComponentMetricSummary -> Rep TrialComponentMetricSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrialComponentMetricSummary x -> TrialComponentMetricSummary
$cfrom :: forall x.
TrialComponentMetricSummary -> Rep TrialComponentMetricSummary x
Prelude.Generic)

-- |
-- Create a value of 'TrialComponentMetricSummary' 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:
--
-- 'max', 'trialComponentMetricSummary_max' - The maximum value of the metric.
--
-- 'sourceArn', 'trialComponentMetricSummary_sourceArn' - The Amazon Resource Name (ARN) of the source.
--
-- 'avg', 'trialComponentMetricSummary_avg' - The average value of the metric.
--
-- 'count', 'trialComponentMetricSummary_count' - The number of samples used to generate the metric.
--
-- 'metricName', 'trialComponentMetricSummary_metricName' - The name of the metric.
--
-- 'stdDev', 'trialComponentMetricSummary_stdDev' - The standard deviation of the metric.
--
-- 'min', 'trialComponentMetricSummary_min' - The minimum value of the metric.
--
-- 'last', 'trialComponentMetricSummary_last' - The most recent value of the metric.
--
-- 'timeStamp', 'trialComponentMetricSummary_timeStamp' - When the metric was last updated.
newTrialComponentMetricSummary ::
  TrialComponentMetricSummary
newTrialComponentMetricSummary :: TrialComponentMetricSummary
newTrialComponentMetricSummary =
  TrialComponentMetricSummary' :: Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe POSIX
-> TrialComponentMetricSummary
TrialComponentMetricSummary'
    { $sel:max:TrialComponentMetricSummary' :: Maybe Double
max = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceArn:TrialComponentMetricSummary' :: Maybe Text
sourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:avg:TrialComponentMetricSummary' :: Maybe Double
avg = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:count:TrialComponentMetricSummary' :: Maybe Int
count = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:metricName:TrialComponentMetricSummary' :: Maybe Text
metricName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stdDev:TrialComponentMetricSummary' :: Maybe Double
stdDev = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:min:TrialComponentMetricSummary' :: Maybe Double
min = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:last:TrialComponentMetricSummary' :: Maybe Double
last = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:timeStamp:TrialComponentMetricSummary' :: Maybe POSIX
timeStamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum value of the metric.
trialComponentMetricSummary_max :: Lens.Lens' TrialComponentMetricSummary (Prelude.Maybe Prelude.Double)
trialComponentMetricSummary_max :: (Maybe Double -> f (Maybe Double))
-> TrialComponentMetricSummary -> f TrialComponentMetricSummary
trialComponentMetricSummary_max = (TrialComponentMetricSummary -> Maybe Double)
-> (TrialComponentMetricSummary
    -> Maybe Double -> TrialComponentMetricSummary)
-> Lens
     TrialComponentMetricSummary
     TrialComponentMetricSummary
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentMetricSummary' {Maybe Double
max :: Maybe Double
$sel:max:TrialComponentMetricSummary' :: TrialComponentMetricSummary -> Maybe Double
max} -> Maybe Double
max) (\s :: TrialComponentMetricSummary
s@TrialComponentMetricSummary' {} Maybe Double
a -> TrialComponentMetricSummary
s {$sel:max:TrialComponentMetricSummary' :: Maybe Double
max = Maybe Double
a} :: TrialComponentMetricSummary)

-- | The Amazon Resource Name (ARN) of the source.
trialComponentMetricSummary_sourceArn :: Lens.Lens' TrialComponentMetricSummary (Prelude.Maybe Prelude.Text)
trialComponentMetricSummary_sourceArn :: (Maybe Text -> f (Maybe Text))
-> TrialComponentMetricSummary -> f TrialComponentMetricSummary
trialComponentMetricSummary_sourceArn = (TrialComponentMetricSummary -> Maybe Text)
-> (TrialComponentMetricSummary
    -> Maybe Text -> TrialComponentMetricSummary)
-> Lens
     TrialComponentMetricSummary
     TrialComponentMetricSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentMetricSummary' {Maybe Text
sourceArn :: Maybe Text
$sel:sourceArn:TrialComponentMetricSummary' :: TrialComponentMetricSummary -> Maybe Text
sourceArn} -> Maybe Text
sourceArn) (\s :: TrialComponentMetricSummary
s@TrialComponentMetricSummary' {} Maybe Text
a -> TrialComponentMetricSummary
s {$sel:sourceArn:TrialComponentMetricSummary' :: Maybe Text
sourceArn = Maybe Text
a} :: TrialComponentMetricSummary)

-- | The average value of the metric.
trialComponentMetricSummary_avg :: Lens.Lens' TrialComponentMetricSummary (Prelude.Maybe Prelude.Double)
trialComponentMetricSummary_avg :: (Maybe Double -> f (Maybe Double))
-> TrialComponentMetricSummary -> f TrialComponentMetricSummary
trialComponentMetricSummary_avg = (TrialComponentMetricSummary -> Maybe Double)
-> (TrialComponentMetricSummary
    -> Maybe Double -> TrialComponentMetricSummary)
-> Lens
     TrialComponentMetricSummary
     TrialComponentMetricSummary
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentMetricSummary' {Maybe Double
avg :: Maybe Double
$sel:avg:TrialComponentMetricSummary' :: TrialComponentMetricSummary -> Maybe Double
avg} -> Maybe Double
avg) (\s :: TrialComponentMetricSummary
s@TrialComponentMetricSummary' {} Maybe Double
a -> TrialComponentMetricSummary
s {$sel:avg:TrialComponentMetricSummary' :: Maybe Double
avg = Maybe Double
a} :: TrialComponentMetricSummary)

-- | The number of samples used to generate the metric.
trialComponentMetricSummary_count :: Lens.Lens' TrialComponentMetricSummary (Prelude.Maybe Prelude.Int)
trialComponentMetricSummary_count :: (Maybe Int -> f (Maybe Int))
-> TrialComponentMetricSummary -> f TrialComponentMetricSummary
trialComponentMetricSummary_count = (TrialComponentMetricSummary -> Maybe Int)
-> (TrialComponentMetricSummary
    -> Maybe Int -> TrialComponentMetricSummary)
-> Lens
     TrialComponentMetricSummary
     TrialComponentMetricSummary
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentMetricSummary' {Maybe Int
count :: Maybe Int
$sel:count:TrialComponentMetricSummary' :: TrialComponentMetricSummary -> Maybe Int
count} -> Maybe Int
count) (\s :: TrialComponentMetricSummary
s@TrialComponentMetricSummary' {} Maybe Int
a -> TrialComponentMetricSummary
s {$sel:count:TrialComponentMetricSummary' :: Maybe Int
count = Maybe Int
a} :: TrialComponentMetricSummary)

-- | The name of the metric.
trialComponentMetricSummary_metricName :: Lens.Lens' TrialComponentMetricSummary (Prelude.Maybe Prelude.Text)
trialComponentMetricSummary_metricName :: (Maybe Text -> f (Maybe Text))
-> TrialComponentMetricSummary -> f TrialComponentMetricSummary
trialComponentMetricSummary_metricName = (TrialComponentMetricSummary -> Maybe Text)
-> (TrialComponentMetricSummary
    -> Maybe Text -> TrialComponentMetricSummary)
-> Lens
     TrialComponentMetricSummary
     TrialComponentMetricSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentMetricSummary' {Maybe Text
metricName :: Maybe Text
$sel:metricName:TrialComponentMetricSummary' :: TrialComponentMetricSummary -> Maybe Text
metricName} -> Maybe Text
metricName) (\s :: TrialComponentMetricSummary
s@TrialComponentMetricSummary' {} Maybe Text
a -> TrialComponentMetricSummary
s {$sel:metricName:TrialComponentMetricSummary' :: Maybe Text
metricName = Maybe Text
a} :: TrialComponentMetricSummary)

-- | The standard deviation of the metric.
trialComponentMetricSummary_stdDev :: Lens.Lens' TrialComponentMetricSummary (Prelude.Maybe Prelude.Double)
trialComponentMetricSummary_stdDev :: (Maybe Double -> f (Maybe Double))
-> TrialComponentMetricSummary -> f TrialComponentMetricSummary
trialComponentMetricSummary_stdDev = (TrialComponentMetricSummary -> Maybe Double)
-> (TrialComponentMetricSummary
    -> Maybe Double -> TrialComponentMetricSummary)
-> Lens
     TrialComponentMetricSummary
     TrialComponentMetricSummary
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentMetricSummary' {Maybe Double
stdDev :: Maybe Double
$sel:stdDev:TrialComponentMetricSummary' :: TrialComponentMetricSummary -> Maybe Double
stdDev} -> Maybe Double
stdDev) (\s :: TrialComponentMetricSummary
s@TrialComponentMetricSummary' {} Maybe Double
a -> TrialComponentMetricSummary
s {$sel:stdDev:TrialComponentMetricSummary' :: Maybe Double
stdDev = Maybe Double
a} :: TrialComponentMetricSummary)

-- | The minimum value of the metric.
trialComponentMetricSummary_min :: Lens.Lens' TrialComponentMetricSummary (Prelude.Maybe Prelude.Double)
trialComponentMetricSummary_min :: (Maybe Double -> f (Maybe Double))
-> TrialComponentMetricSummary -> f TrialComponentMetricSummary
trialComponentMetricSummary_min = (TrialComponentMetricSummary -> Maybe Double)
-> (TrialComponentMetricSummary
    -> Maybe Double -> TrialComponentMetricSummary)
-> Lens
     TrialComponentMetricSummary
     TrialComponentMetricSummary
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentMetricSummary' {Maybe Double
min :: Maybe Double
$sel:min:TrialComponentMetricSummary' :: TrialComponentMetricSummary -> Maybe Double
min} -> Maybe Double
min) (\s :: TrialComponentMetricSummary
s@TrialComponentMetricSummary' {} Maybe Double
a -> TrialComponentMetricSummary
s {$sel:min:TrialComponentMetricSummary' :: Maybe Double
min = Maybe Double
a} :: TrialComponentMetricSummary)

-- | The most recent value of the metric.
trialComponentMetricSummary_last :: Lens.Lens' TrialComponentMetricSummary (Prelude.Maybe Prelude.Double)
trialComponentMetricSummary_last :: (Maybe Double -> f (Maybe Double))
-> TrialComponentMetricSummary -> f TrialComponentMetricSummary
trialComponentMetricSummary_last = (TrialComponentMetricSummary -> Maybe Double)
-> (TrialComponentMetricSummary
    -> Maybe Double -> TrialComponentMetricSummary)
-> Lens
     TrialComponentMetricSummary
     TrialComponentMetricSummary
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentMetricSummary' {Maybe Double
last :: Maybe Double
$sel:last:TrialComponentMetricSummary' :: TrialComponentMetricSummary -> Maybe Double
last} -> Maybe Double
last) (\s :: TrialComponentMetricSummary
s@TrialComponentMetricSummary' {} Maybe Double
a -> TrialComponentMetricSummary
s {$sel:last:TrialComponentMetricSummary' :: Maybe Double
last = Maybe Double
a} :: TrialComponentMetricSummary)

-- | When the metric was last updated.
trialComponentMetricSummary_timeStamp :: Lens.Lens' TrialComponentMetricSummary (Prelude.Maybe Prelude.UTCTime)
trialComponentMetricSummary_timeStamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TrialComponentMetricSummary -> f TrialComponentMetricSummary
trialComponentMetricSummary_timeStamp = (TrialComponentMetricSummary -> Maybe POSIX)
-> (TrialComponentMetricSummary
    -> Maybe POSIX -> TrialComponentMetricSummary)
-> Lens
     TrialComponentMetricSummary
     TrialComponentMetricSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentMetricSummary' {Maybe POSIX
timeStamp :: Maybe POSIX
$sel:timeStamp:TrialComponentMetricSummary' :: TrialComponentMetricSummary -> Maybe POSIX
timeStamp} -> Maybe POSIX
timeStamp) (\s :: TrialComponentMetricSummary
s@TrialComponentMetricSummary' {} Maybe POSIX
a -> TrialComponentMetricSummary
s {$sel:timeStamp:TrialComponentMetricSummary' :: Maybe POSIX
timeStamp = Maybe POSIX
a} :: TrialComponentMetricSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> TrialComponentMetricSummary -> f TrialComponentMetricSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TrialComponentMetricSummary
-> f TrialComponentMetricSummary
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

instance Core.FromJSON TrialComponentMetricSummary where
  parseJSON :: Value -> Parser TrialComponentMetricSummary
parseJSON =
    String
-> (Object -> Parser TrialComponentMetricSummary)
-> Value
-> Parser TrialComponentMetricSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"TrialComponentMetricSummary"
      ( \Object
x ->
          Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe POSIX
-> TrialComponentMetricSummary
TrialComponentMetricSummary'
            (Maybe Double
 -> Maybe Text
 -> Maybe Double
 -> Maybe Int
 -> Maybe Text
 -> Maybe Double
 -> Maybe Double
 -> Maybe Double
 -> Maybe POSIX
 -> TrialComponentMetricSummary)
-> Parser (Maybe Double)
-> Parser
     (Maybe Text
      -> Maybe Double
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Double
      -> Maybe Double
      -> Maybe POSIX
      -> TrialComponentMetricSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Max")
            Parser
  (Maybe Text
   -> Maybe Double
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Double
   -> Maybe Double
   -> Maybe POSIX
   -> TrialComponentMetricSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Double
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Double
      -> Maybe Double
      -> Maybe POSIX
      -> TrialComponentMetricSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceArn")
            Parser
  (Maybe Double
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Double
   -> Maybe Double
   -> Maybe POSIX
   -> TrialComponentMetricSummary)
-> Parser (Maybe Double)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Double
      -> Maybe Double
      -> Maybe POSIX
      -> TrialComponentMetricSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Avg")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Double
   -> Maybe Double
   -> Maybe POSIX
   -> TrialComponentMetricSummary)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Double
      -> Maybe Double
      -> Maybe Double
      -> Maybe POSIX
      -> TrialComponentMetricSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Count")
            Parser
  (Maybe Text
   -> Maybe Double
   -> Maybe Double
   -> Maybe Double
   -> Maybe POSIX
   -> TrialComponentMetricSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Double
      -> Maybe Double
      -> Maybe Double
      -> Maybe POSIX
      -> TrialComponentMetricSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MetricName")
            Parser
  (Maybe Double
   -> Maybe Double
   -> Maybe Double
   -> Maybe POSIX
   -> TrialComponentMetricSummary)
-> Parser (Maybe Double)
-> Parser
     (Maybe Double
      -> Maybe Double -> Maybe POSIX -> TrialComponentMetricSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StdDev")
            Parser
  (Maybe Double
   -> Maybe Double -> Maybe POSIX -> TrialComponentMetricSummary)
-> Parser (Maybe Double)
-> Parser
     (Maybe Double -> Maybe POSIX -> TrialComponentMetricSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Min")
            Parser (Maybe Double -> Maybe POSIX -> TrialComponentMetricSummary)
-> Parser (Maybe Double)
-> Parser (Maybe POSIX -> TrialComponentMetricSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Last")
            Parser (Maybe POSIX -> TrialComponentMetricSummary)
-> Parser (Maybe POSIX) -> Parser TrialComponentMetricSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TimeStamp")
      )

instance Prelude.Hashable TrialComponentMetricSummary

instance Prelude.NFData TrialComponentMetricSummary