{-# 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.Statistics
-- 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.Forecast.Types.Statistics where

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

-- | Provides statistics for each data field imported into to an Amazon
-- Forecast dataset with the CreateDatasetImportJob operation.
--
-- /See:/ 'newStatistics' smart constructor.
data Statistics = Statistics'
  { -- | For a numeric field, the maximum value in the field.
    Statistics -> Maybe Text
max :: Prelude.Maybe Prelude.Text,
    -- | The number of null values in the field. @CountNullLong@ is used instead
    -- of @CountNull@ if the value is greater than 2,147,483,647.
    Statistics -> Maybe Integer
countNullLong :: Prelude.Maybe Prelude.Integer,
    -- | The number of NAN (not a number) values in the field. If the response
    -- value is -1, refer to @CountNanLong@.
    Statistics -> Maybe Int
countNan :: Prelude.Maybe Prelude.Int,
    -- | The number of NAN (not a number) values in the field. @CountNanLong@ is
    -- used instead of @CountNan@ if the value is greater than 2,147,483,647.
    Statistics -> Maybe Integer
countNanLong :: Prelude.Maybe Prelude.Integer,
    -- | For a numeric field, the average value in the field.
    Statistics -> Maybe Double
avg :: Prelude.Maybe Prelude.Double,
    -- | The number of null values in the field. If the response value is -1,
    -- refer to @CountNullLong@.
    Statistics -> Maybe Int
countNull :: Prelude.Maybe Prelude.Int,
    -- | The number of values in the field. If the response value is -1, refer to
    -- @CountLong@.
    Statistics -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
    -- | The number of values in the field. @CountLong@ is used instead of
    -- @Count@ if the value is greater than 2,147,483,647.
    Statistics -> Maybe Integer
countLong :: Prelude.Maybe Prelude.Integer,
    -- | For a numeric field, the standard deviation.
    Statistics -> Maybe Double
stddev :: Prelude.Maybe Prelude.Double,
    -- | For a numeric field, the minimum value in the field.
    Statistics -> Maybe Text
min :: Prelude.Maybe Prelude.Text,
    -- | The number of distinct values in the field. @CountDistinctLong@ is used
    -- instead of @CountDistinct@ if the value is greater than 2,147,483,647.
    Statistics -> Maybe Integer
countDistinctLong :: Prelude.Maybe Prelude.Integer,
    -- | The number of distinct values in the field. If the response value is -1,
    -- refer to @CountDistinctLong@.
    Statistics -> Maybe Int
countDistinct :: Prelude.Maybe Prelude.Int
  }
  deriving (Statistics -> Statistics -> Bool
(Statistics -> Statistics -> Bool)
-> (Statistics -> Statistics -> Bool) -> Eq Statistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Statistics -> Statistics -> Bool
$c/= :: Statistics -> Statistics -> Bool
== :: Statistics -> Statistics -> Bool
$c== :: Statistics -> Statistics -> Bool
Prelude.Eq, ReadPrec [Statistics]
ReadPrec Statistics
Int -> ReadS Statistics
ReadS [Statistics]
(Int -> ReadS Statistics)
-> ReadS [Statistics]
-> ReadPrec Statistics
-> ReadPrec [Statistics]
-> Read Statistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Statistics]
$creadListPrec :: ReadPrec [Statistics]
readPrec :: ReadPrec Statistics
$creadPrec :: ReadPrec Statistics
readList :: ReadS [Statistics]
$creadList :: ReadS [Statistics]
readsPrec :: Int -> ReadS Statistics
$creadsPrec :: Int -> ReadS Statistics
Prelude.Read, Int -> Statistics -> ShowS
[Statistics] -> ShowS
Statistics -> String
(Int -> Statistics -> ShowS)
-> (Statistics -> String)
-> ([Statistics] -> ShowS)
-> Show Statistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Statistics] -> ShowS
$cshowList :: [Statistics] -> ShowS
show :: Statistics -> String
$cshow :: Statistics -> String
showsPrec :: Int -> Statistics -> ShowS
$cshowsPrec :: Int -> Statistics -> ShowS
Prelude.Show, (forall x. Statistics -> Rep Statistics x)
-> (forall x. Rep Statistics x -> Statistics) -> Generic Statistics
forall x. Rep Statistics x -> Statistics
forall x. Statistics -> Rep Statistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Statistics x -> Statistics
$cfrom :: forall x. Statistics -> Rep Statistics x
Prelude.Generic)

-- |
-- Create a value of 'Statistics' 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', 'statistics_max' - For a numeric field, the maximum value in the field.
--
-- 'countNullLong', 'statistics_countNullLong' - The number of null values in the field. @CountNullLong@ is used instead
-- of @CountNull@ if the value is greater than 2,147,483,647.
--
-- 'countNan', 'statistics_countNan' - The number of NAN (not a number) values in the field. If the response
-- value is -1, refer to @CountNanLong@.
--
-- 'countNanLong', 'statistics_countNanLong' - The number of NAN (not a number) values in the field. @CountNanLong@ is
-- used instead of @CountNan@ if the value is greater than 2,147,483,647.
--
-- 'avg', 'statistics_avg' - For a numeric field, the average value in the field.
--
-- 'countNull', 'statistics_countNull' - The number of null values in the field. If the response value is -1,
-- refer to @CountNullLong@.
--
-- 'count', 'statistics_count' - The number of values in the field. If the response value is -1, refer to
-- @CountLong@.
--
-- 'countLong', 'statistics_countLong' - The number of values in the field. @CountLong@ is used instead of
-- @Count@ if the value is greater than 2,147,483,647.
--
-- 'stddev', 'statistics_stddev' - For a numeric field, the standard deviation.
--
-- 'min', 'statistics_min' - For a numeric field, the minimum value in the field.
--
-- 'countDistinctLong', 'statistics_countDistinctLong' - The number of distinct values in the field. @CountDistinctLong@ is used
-- instead of @CountDistinct@ if the value is greater than 2,147,483,647.
--
-- 'countDistinct', 'statistics_countDistinct' - The number of distinct values in the field. If the response value is -1,
-- refer to @CountDistinctLong@.
newStatistics ::
  Statistics
newStatistics :: Statistics
newStatistics =
  Statistics' :: Maybe Text
-> Maybe Integer
-> Maybe Int
-> Maybe Integer
-> Maybe Double
-> Maybe Int
-> Maybe Int
-> Maybe Integer
-> Maybe Double
-> Maybe Text
-> Maybe Integer
-> Maybe Int
-> Statistics
Statistics'
    { $sel:max:Statistics' :: Maybe Text
max = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:countNullLong:Statistics' :: Maybe Integer
countNullLong = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:countNan:Statistics' :: Maybe Int
countNan = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:countNanLong:Statistics' :: Maybe Integer
countNanLong = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:avg:Statistics' :: Maybe Double
avg = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:countNull:Statistics' :: Maybe Int
countNull = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:count:Statistics' :: Maybe Int
count = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:countLong:Statistics' :: Maybe Integer
countLong = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:stddev:Statistics' :: Maybe Double
stddev = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:min:Statistics' :: Maybe Text
min = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:countDistinctLong:Statistics' :: Maybe Integer
countDistinctLong = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:countDistinct:Statistics' :: Maybe Int
countDistinct = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | For a numeric field, the maximum value in the field.
statistics_max :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Text)
statistics_max :: (Maybe Text -> f (Maybe Text)) -> Statistics -> f Statistics
statistics_max = (Statistics -> Maybe Text)
-> (Statistics -> Maybe Text -> Statistics)
-> Lens Statistics Statistics (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Text
max :: Maybe Text
$sel:max:Statistics' :: Statistics -> Maybe Text
max} -> Maybe Text
max) (\s :: Statistics
s@Statistics' {} Maybe Text
a -> Statistics
s {$sel:max:Statistics' :: Maybe Text
max = Maybe Text
a} :: Statistics)

-- | The number of null values in the field. @CountNullLong@ is used instead
-- of @CountNull@ if the value is greater than 2,147,483,647.
statistics_countNullLong :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Integer)
statistics_countNullLong :: (Maybe Integer -> f (Maybe Integer)) -> Statistics -> f Statistics
statistics_countNullLong = (Statistics -> Maybe Integer)
-> (Statistics -> Maybe Integer -> Statistics)
-> Lens Statistics Statistics (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Integer
countNullLong :: Maybe Integer
$sel:countNullLong:Statistics' :: Statistics -> Maybe Integer
countNullLong} -> Maybe Integer
countNullLong) (\s :: Statistics
s@Statistics' {} Maybe Integer
a -> Statistics
s {$sel:countNullLong:Statistics' :: Maybe Integer
countNullLong = Maybe Integer
a} :: Statistics)

-- | The number of NAN (not a number) values in the field. If the response
-- value is -1, refer to @CountNanLong@.
statistics_countNan :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Int)
statistics_countNan :: (Maybe Int -> f (Maybe Int)) -> Statistics -> f Statistics
statistics_countNan = (Statistics -> Maybe Int)
-> (Statistics -> Maybe Int -> Statistics)
-> Lens Statistics Statistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Int
countNan :: Maybe Int
$sel:countNan:Statistics' :: Statistics -> Maybe Int
countNan} -> Maybe Int
countNan) (\s :: Statistics
s@Statistics' {} Maybe Int
a -> Statistics
s {$sel:countNan:Statistics' :: Maybe Int
countNan = Maybe Int
a} :: Statistics)

-- | The number of NAN (not a number) values in the field. @CountNanLong@ is
-- used instead of @CountNan@ if the value is greater than 2,147,483,647.
statistics_countNanLong :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Integer)
statistics_countNanLong :: (Maybe Integer -> f (Maybe Integer)) -> Statistics -> f Statistics
statistics_countNanLong = (Statistics -> Maybe Integer)
-> (Statistics -> Maybe Integer -> Statistics)
-> Lens Statistics Statistics (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Integer
countNanLong :: Maybe Integer
$sel:countNanLong:Statistics' :: Statistics -> Maybe Integer
countNanLong} -> Maybe Integer
countNanLong) (\s :: Statistics
s@Statistics' {} Maybe Integer
a -> Statistics
s {$sel:countNanLong:Statistics' :: Maybe Integer
countNanLong = Maybe Integer
a} :: Statistics)

-- | For a numeric field, the average value in the field.
statistics_avg :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Double)
statistics_avg :: (Maybe Double -> f (Maybe Double)) -> Statistics -> f Statistics
statistics_avg = (Statistics -> Maybe Double)
-> (Statistics -> Maybe Double -> Statistics)
-> Lens Statistics Statistics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Double
avg :: Maybe Double
$sel:avg:Statistics' :: Statistics -> Maybe Double
avg} -> Maybe Double
avg) (\s :: Statistics
s@Statistics' {} Maybe Double
a -> Statistics
s {$sel:avg:Statistics' :: Maybe Double
avg = Maybe Double
a} :: Statistics)

-- | The number of null values in the field. If the response value is -1,
-- refer to @CountNullLong@.
statistics_countNull :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Int)
statistics_countNull :: (Maybe Int -> f (Maybe Int)) -> Statistics -> f Statistics
statistics_countNull = (Statistics -> Maybe Int)
-> (Statistics -> Maybe Int -> Statistics)
-> Lens Statistics Statistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Int
countNull :: Maybe Int
$sel:countNull:Statistics' :: Statistics -> Maybe Int
countNull} -> Maybe Int
countNull) (\s :: Statistics
s@Statistics' {} Maybe Int
a -> Statistics
s {$sel:countNull:Statistics' :: Maybe Int
countNull = Maybe Int
a} :: Statistics)

-- | The number of values in the field. If the response value is -1, refer to
-- @CountLong@.
statistics_count :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Int)
statistics_count :: (Maybe Int -> f (Maybe Int)) -> Statistics -> f Statistics
statistics_count = (Statistics -> Maybe Int)
-> (Statistics -> Maybe Int -> Statistics)
-> Lens Statistics Statistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Int
count :: Maybe Int
$sel:count:Statistics' :: Statistics -> Maybe Int
count} -> Maybe Int
count) (\s :: Statistics
s@Statistics' {} Maybe Int
a -> Statistics
s {$sel:count:Statistics' :: Maybe Int
count = Maybe Int
a} :: Statistics)

-- | The number of values in the field. @CountLong@ is used instead of
-- @Count@ if the value is greater than 2,147,483,647.
statistics_countLong :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Integer)
statistics_countLong :: (Maybe Integer -> f (Maybe Integer)) -> Statistics -> f Statistics
statistics_countLong = (Statistics -> Maybe Integer)
-> (Statistics -> Maybe Integer -> Statistics)
-> Lens Statistics Statistics (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Integer
countLong :: Maybe Integer
$sel:countLong:Statistics' :: Statistics -> Maybe Integer
countLong} -> Maybe Integer
countLong) (\s :: Statistics
s@Statistics' {} Maybe Integer
a -> Statistics
s {$sel:countLong:Statistics' :: Maybe Integer
countLong = Maybe Integer
a} :: Statistics)

-- | For a numeric field, the standard deviation.
statistics_stddev :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Double)
statistics_stddev :: (Maybe Double -> f (Maybe Double)) -> Statistics -> f Statistics
statistics_stddev = (Statistics -> Maybe Double)
-> (Statistics -> Maybe Double -> Statistics)
-> Lens Statistics Statistics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Double
stddev :: Maybe Double
$sel:stddev:Statistics' :: Statistics -> Maybe Double
stddev} -> Maybe Double
stddev) (\s :: Statistics
s@Statistics' {} Maybe Double
a -> Statistics
s {$sel:stddev:Statistics' :: Maybe Double
stddev = Maybe Double
a} :: Statistics)

-- | For a numeric field, the minimum value in the field.
statistics_min :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Text)
statistics_min :: (Maybe Text -> f (Maybe Text)) -> Statistics -> f Statistics
statistics_min = (Statistics -> Maybe Text)
-> (Statistics -> Maybe Text -> Statistics)
-> Lens Statistics Statistics (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Text
min :: Maybe Text
$sel:min:Statistics' :: Statistics -> Maybe Text
min} -> Maybe Text
min) (\s :: Statistics
s@Statistics' {} Maybe Text
a -> Statistics
s {$sel:min:Statistics' :: Maybe Text
min = Maybe Text
a} :: Statistics)

-- | The number of distinct values in the field. @CountDistinctLong@ is used
-- instead of @CountDistinct@ if the value is greater than 2,147,483,647.
statistics_countDistinctLong :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Integer)
statistics_countDistinctLong :: (Maybe Integer -> f (Maybe Integer)) -> Statistics -> f Statistics
statistics_countDistinctLong = (Statistics -> Maybe Integer)
-> (Statistics -> Maybe Integer -> Statistics)
-> Lens Statistics Statistics (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Integer
countDistinctLong :: Maybe Integer
$sel:countDistinctLong:Statistics' :: Statistics -> Maybe Integer
countDistinctLong} -> Maybe Integer
countDistinctLong) (\s :: Statistics
s@Statistics' {} Maybe Integer
a -> Statistics
s {$sel:countDistinctLong:Statistics' :: Maybe Integer
countDistinctLong = Maybe Integer
a} :: Statistics)

-- | The number of distinct values in the field. If the response value is -1,
-- refer to @CountDistinctLong@.
statistics_countDistinct :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Int)
statistics_countDistinct :: (Maybe Int -> f (Maybe Int)) -> Statistics -> f Statistics
statistics_countDistinct = (Statistics -> Maybe Int)
-> (Statistics -> Maybe Int -> Statistics)
-> Lens Statistics Statistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Statistics' {Maybe Int
countDistinct :: Maybe Int
$sel:countDistinct:Statistics' :: Statistics -> Maybe Int
countDistinct} -> Maybe Int
countDistinct) (\s :: Statistics
s@Statistics' {} Maybe Int
a -> Statistics
s {$sel:countDistinct:Statistics' :: Maybe Int
countDistinct = Maybe Int
a} :: Statistics)

instance Core.FromJSON Statistics where
  parseJSON :: Value -> Parser Statistics
parseJSON =
    String
-> (Object -> Parser Statistics) -> Value -> Parser Statistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Statistics"
      ( \Object
x ->
          Maybe Text
-> Maybe Integer
-> Maybe Int
-> Maybe Integer
-> Maybe Double
-> Maybe Int
-> Maybe Int
-> Maybe Integer
-> Maybe Double
-> Maybe Text
-> Maybe Integer
-> Maybe Int
-> Statistics
Statistics'
            (Maybe Text
 -> Maybe Integer
 -> Maybe Int
 -> Maybe Integer
 -> Maybe Double
 -> Maybe Int
 -> Maybe Int
 -> Maybe Integer
 -> Maybe Double
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Int
 -> Statistics)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Statistics)
forall (f :: * -> *) a b. Functor 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
"Max")
            Parser
  (Maybe Integer
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Int
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Statistics)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Int
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Statistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CountNullLong")
            Parser
  (Maybe Int
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Int
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Statistics)
-> Parser (Maybe Int)
-> Parser
     (Maybe Integer
      -> Maybe Double
      -> Maybe Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Statistics)
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
"CountNan")
            Parser
  (Maybe Integer
   -> Maybe Double
   -> Maybe Int
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Statistics)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Double
      -> Maybe Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Statistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CountNanLong")
            Parser
  (Maybe Double
   -> Maybe Int
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Statistics)
-> Parser (Maybe Double)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Statistics)
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 Int
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Statistics)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Statistics)
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
"CountNull")
            Parser
  (Maybe Int
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Statistics)
-> Parser (Maybe Int)
-> Parser
     (Maybe Integer
      -> Maybe Double
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Int
      -> Statistics)
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 Integer
   -> Maybe Double
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Int
   -> Statistics)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Double
      -> Maybe Text -> Maybe Integer -> Maybe Int -> Statistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CountLong")
            Parser
  (Maybe Double
   -> Maybe Text -> Maybe Integer -> Maybe Int -> Statistics)
-> Parser (Maybe Double)
-> Parser (Maybe Text -> Maybe Integer -> Maybe Int -> Statistics)
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 Text -> Maybe Integer -> Maybe Int -> Statistics)
-> Parser (Maybe Text)
-> Parser (Maybe Integer -> Maybe Int -> Statistics)
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
"Min")
            Parser (Maybe Integer -> Maybe Int -> Statistics)
-> Parser (Maybe Integer) -> Parser (Maybe Int -> Statistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CountDistinctLong")
            Parser (Maybe Int -> Statistics)
-> Parser (Maybe Int) -> Parser Statistics
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
"CountDistinct")
      )

instance Prelude.Hashable Statistics

instance Prelude.NFData Statistics