{-# 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 #-}
module Amazonka.Forecast.Types.Statistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Statistics = Statistics'
{
Statistics -> Maybe Text
max :: Prelude.Maybe Prelude.Text,
Statistics -> Maybe Integer
countNullLong :: Prelude.Maybe Prelude.Integer,
Statistics -> Maybe Int
countNan :: Prelude.Maybe Prelude.Int,
Statistics -> Maybe Integer
countNanLong :: Prelude.Maybe Prelude.Integer,
Statistics -> Maybe Double
avg :: Prelude.Maybe Prelude.Double,
Statistics -> Maybe Int
countNull :: Prelude.Maybe Prelude.Int,
Statistics -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
Statistics -> Maybe Integer
countLong :: Prelude.Maybe Prelude.Integer,
Statistics -> Maybe Double
stddev :: Prelude.Maybe Prelude.Double,
Statistics -> Maybe Text
min :: Prelude.Maybe Prelude.Text,
Statistics -> Maybe Integer
countDistinctLong :: Prelude.Maybe Prelude.Integer,
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)
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
}
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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