{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Statistics = Statistics'
{
Statistics -> Maybe Double
avg :: Prelude.Maybe Prelude.Double,
Statistics -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
Statistics -> Maybe Int
countDistinct :: Prelude.Maybe Prelude.Int,
Statistics -> Maybe Integer
countDistinctLong :: Prelude.Maybe Prelude.Integer,
Statistics -> Maybe Integer
countLong :: Prelude.Maybe Prelude.Integer,
Statistics -> Maybe Int
countNan :: Prelude.Maybe Prelude.Int,
Statistics -> Maybe Integer
countNanLong :: Prelude.Maybe Prelude.Integer,
Statistics -> Maybe Int
countNull :: Prelude.Maybe Prelude.Int,
Statistics -> Maybe Integer
countNullLong :: Prelude.Maybe Prelude.Integer,
Statistics -> Maybe Text
max :: Prelude.Maybe Prelude.Text,
Statistics -> Maybe Text
min :: Prelude.Maybe Prelude.Text,
Statistics -> Maybe Double
stddev :: Prelude.Maybe Prelude.Double
}
deriving (Statistics -> Statistics -> Bool
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]
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
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. 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'
{ $sel:avg:Statistics' :: Maybe Double
avg = forall a. Maybe a
Prelude.Nothing,
$sel:count:Statistics' :: Maybe Int
count = forall a. Maybe a
Prelude.Nothing,
$sel:countDistinct:Statistics' :: Maybe Int
countDistinct = forall a. Maybe a
Prelude.Nothing,
$sel:countDistinctLong:Statistics' :: Maybe Integer
countDistinctLong = forall a. Maybe a
Prelude.Nothing,
$sel:countLong:Statistics' :: Maybe Integer
countLong = forall a. Maybe a
Prelude.Nothing,
$sel:countNan:Statistics' :: Maybe Int
countNan = forall a. Maybe a
Prelude.Nothing,
$sel:countNanLong:Statistics' :: Maybe Integer
countNanLong = forall a. Maybe a
Prelude.Nothing,
$sel:countNull:Statistics' :: Maybe Int
countNull = forall a. Maybe a
Prelude.Nothing,
$sel:countNullLong:Statistics' :: Maybe Integer
countNullLong = forall a. Maybe a
Prelude.Nothing,
$sel:max:Statistics' :: Maybe Text
max = forall a. Maybe a
Prelude.Nothing,
$sel:min:Statistics' :: Maybe Text
min = forall a. Maybe a
Prelude.Nothing,
$sel:stddev:Statistics' :: Maybe Double
stddev = forall a. Maybe a
Prelude.Nothing
}
statistics_avg :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Double)
statistics_avg :: Lens' Statistics (Maybe Double)
statistics_avg = 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_count :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Int)
statistics_count :: Lens' Statistics (Maybe Int)
statistics_count = 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_countDistinct :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Int)
statistics_countDistinct :: Lens' Statistics (Maybe Int)
statistics_countDistinct = 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)
statistics_countDistinctLong :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Integer)
statistics_countDistinctLong :: Lens' Statistics (Maybe Integer)
statistics_countDistinctLong = 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_countLong :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Integer)
statistics_countLong :: Lens' Statistics (Maybe Integer)
statistics_countLong = 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_countNan :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Int)
statistics_countNan :: Lens' Statistics (Maybe Int)
statistics_countNan = 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 :: Lens' Statistics (Maybe Integer)
statistics_countNanLong = 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_countNull :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Int)
statistics_countNull :: Lens' Statistics (Maybe Int)
statistics_countNull = 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_countNullLong :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Integer)
statistics_countNullLong :: Lens' Statistics (Maybe Integer)
statistics_countNullLong = 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_max :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Text)
statistics_max :: Lens' Statistics (Maybe Text)
statistics_max = 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_min :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Text)
statistics_min :: Lens' Statistics (Maybe Text)
statistics_min = 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_stddev :: Lens.Lens' Statistics (Prelude.Maybe Prelude.Double)
statistics_stddev :: Lens' Statistics (Maybe Double)
statistics_stddev = 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)
instance Data.FromJSON Statistics where
parseJSON :: Value -> Parser Statistics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Statistics"
( \Object
x ->
Maybe Double
-> Maybe Int
-> Maybe Int
-> Maybe Integer
-> Maybe Integer
-> Maybe Int
-> Maybe Integer
-> Maybe Int
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> Statistics
Statistics'
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
"Avg")
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
"Count")
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
"CountDistinct")
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
"CountDistinctLong")
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
"CountLong")
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
"CountNan")
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
"CountNanLong")
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
"CountNull")
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
"CountNullLong")
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
"Max")
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
"Min")
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
"Stddev")
)
instance Prelude.Hashable Statistics where
hashWithSalt :: Int -> Statistics -> Int
hashWithSalt Int
_salt Statistics' {Maybe Double
Maybe Int
Maybe Integer
Maybe Text
stddev :: Maybe Double
min :: Maybe Text
max :: Maybe Text
countNullLong :: Maybe Integer
countNull :: Maybe Int
countNanLong :: Maybe Integer
countNan :: Maybe Int
countLong :: Maybe Integer
countDistinctLong :: Maybe Integer
countDistinct :: Maybe Int
count :: Maybe Int
avg :: Maybe Double
$sel:stddev:Statistics' :: Statistics -> Maybe Double
$sel:min:Statistics' :: Statistics -> Maybe Text
$sel:max:Statistics' :: Statistics -> Maybe Text
$sel:countNullLong:Statistics' :: Statistics -> Maybe Integer
$sel:countNull:Statistics' :: Statistics -> Maybe Int
$sel:countNanLong:Statistics' :: Statistics -> Maybe Integer
$sel:countNan:Statistics' :: Statistics -> Maybe Int
$sel:countLong:Statistics' :: Statistics -> Maybe Integer
$sel:countDistinctLong:Statistics' :: Statistics -> Maybe Integer
$sel:countDistinct:Statistics' :: Statistics -> Maybe Int
$sel:count:Statistics' :: Statistics -> Maybe Int
$sel:avg:Statistics' :: Statistics -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
avg
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
count
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
countDistinct
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
countDistinctLong
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
countLong
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
countNan
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
countNanLong
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
countNull
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
countNullLong
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
max
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
min
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
stddev
instance Prelude.NFData Statistics where
rnf :: Statistics -> ()
rnf Statistics' {Maybe Double
Maybe Int
Maybe Integer
Maybe Text
stddev :: Maybe Double
min :: Maybe Text
max :: Maybe Text
countNullLong :: Maybe Integer
countNull :: Maybe Int
countNanLong :: Maybe Integer
countNan :: Maybe Int
countLong :: Maybe Integer
countDistinctLong :: Maybe Integer
countDistinct :: Maybe Int
count :: Maybe Int
avg :: Maybe Double
$sel:stddev:Statistics' :: Statistics -> Maybe Double
$sel:min:Statistics' :: Statistics -> Maybe Text
$sel:max:Statistics' :: Statistics -> Maybe Text
$sel:countNullLong:Statistics' :: Statistics -> Maybe Integer
$sel:countNull:Statistics' :: Statistics -> Maybe Int
$sel:countNanLong:Statistics' :: Statistics -> Maybe Integer
$sel:countNan:Statistics' :: Statistics -> Maybe Int
$sel:countLong:Statistics' :: Statistics -> Maybe Integer
$sel:countDistinctLong:Statistics' :: Statistics -> Maybe Integer
$sel:countDistinct:Statistics' :: Statistics -> Maybe Int
$sel:count:Statistics' :: Statistics -> Maybe Int
$sel:avg:Statistics' :: Statistics -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
avg
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
count
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
countDistinct
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
countDistinctLong
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
countLong
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
countNan
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
countNanLong
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
countNull
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
countNullLong
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
max
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
min
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
stddev