{-# 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.CloudWatch.Types.StatisticSet where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StatisticSet = StatisticSet'
{
StatisticSet -> Double
sampleCount :: Prelude.Double,
StatisticSet -> Double
sum :: Prelude.Double,
StatisticSet -> Double
minimum :: Prelude.Double,
StatisticSet -> Double
maximum :: Prelude.Double
}
deriving (StatisticSet -> StatisticSet -> Bool
(StatisticSet -> StatisticSet -> Bool)
-> (StatisticSet -> StatisticSet -> Bool) -> Eq StatisticSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StatisticSet -> StatisticSet -> Bool
$c/= :: StatisticSet -> StatisticSet -> Bool
== :: StatisticSet -> StatisticSet -> Bool
$c== :: StatisticSet -> StatisticSet -> Bool
Prelude.Eq, ReadPrec [StatisticSet]
ReadPrec StatisticSet
Int -> ReadS StatisticSet
ReadS [StatisticSet]
(Int -> ReadS StatisticSet)
-> ReadS [StatisticSet]
-> ReadPrec StatisticSet
-> ReadPrec [StatisticSet]
-> Read StatisticSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StatisticSet]
$creadListPrec :: ReadPrec [StatisticSet]
readPrec :: ReadPrec StatisticSet
$creadPrec :: ReadPrec StatisticSet
readList :: ReadS [StatisticSet]
$creadList :: ReadS [StatisticSet]
readsPrec :: Int -> ReadS StatisticSet
$creadsPrec :: Int -> ReadS StatisticSet
Prelude.Read, Int -> StatisticSet -> ShowS
[StatisticSet] -> ShowS
StatisticSet -> String
(Int -> StatisticSet -> ShowS)
-> (StatisticSet -> String)
-> ([StatisticSet] -> ShowS)
-> Show StatisticSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StatisticSet] -> ShowS
$cshowList :: [StatisticSet] -> ShowS
show :: StatisticSet -> String
$cshow :: StatisticSet -> String
showsPrec :: Int -> StatisticSet -> ShowS
$cshowsPrec :: Int -> StatisticSet -> ShowS
Prelude.Show, (forall x. StatisticSet -> Rep StatisticSet x)
-> (forall x. Rep StatisticSet x -> StatisticSet)
-> Generic StatisticSet
forall x. Rep StatisticSet x -> StatisticSet
forall x. StatisticSet -> Rep StatisticSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StatisticSet x -> StatisticSet
$cfrom :: forall x. StatisticSet -> Rep StatisticSet x
Prelude.Generic)
newStatisticSet ::
Prelude.Double ->
Prelude.Double ->
Prelude.Double ->
Prelude.Double ->
StatisticSet
newStatisticSet :: Double -> Double -> Double -> Double -> StatisticSet
newStatisticSet
Double
pSampleCount_
Double
pSum_
Double
pMinimum_
Double
pMaximum_ =
StatisticSet' :: Double -> Double -> Double -> Double -> StatisticSet
StatisticSet'
{ $sel:sampleCount:StatisticSet' :: Double
sampleCount = Double
pSampleCount_,
$sel:sum:StatisticSet' :: Double
sum = Double
pSum_,
$sel:minimum:StatisticSet' :: Double
minimum = Double
pMinimum_,
$sel:maximum:StatisticSet' :: Double
maximum = Double
pMaximum_
}
statisticSet_sampleCount :: Lens.Lens' StatisticSet Prelude.Double
statisticSet_sampleCount :: (Double -> f Double) -> StatisticSet -> f StatisticSet
statisticSet_sampleCount = (StatisticSet -> Double)
-> (StatisticSet -> Double -> StatisticSet)
-> Lens StatisticSet StatisticSet Double Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatisticSet' {Double
sampleCount :: Double
$sel:sampleCount:StatisticSet' :: StatisticSet -> Double
sampleCount} -> Double
sampleCount) (\s :: StatisticSet
s@StatisticSet' {} Double
a -> StatisticSet
s {$sel:sampleCount:StatisticSet' :: Double
sampleCount = Double
a} :: StatisticSet)
statisticSet_sum :: Lens.Lens' StatisticSet Prelude.Double
statisticSet_sum :: (Double -> f Double) -> StatisticSet -> f StatisticSet
statisticSet_sum = (StatisticSet -> Double)
-> (StatisticSet -> Double -> StatisticSet)
-> Lens StatisticSet StatisticSet Double Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatisticSet' {Double
sum :: Double
$sel:sum:StatisticSet' :: StatisticSet -> Double
sum} -> Double
sum) (\s :: StatisticSet
s@StatisticSet' {} Double
a -> StatisticSet
s {$sel:sum:StatisticSet' :: Double
sum = Double
a} :: StatisticSet)
statisticSet_minimum :: Lens.Lens' StatisticSet Prelude.Double
statisticSet_minimum :: (Double -> f Double) -> StatisticSet -> f StatisticSet
statisticSet_minimum = (StatisticSet -> Double)
-> (StatisticSet -> Double -> StatisticSet)
-> Lens StatisticSet StatisticSet Double Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatisticSet' {Double
minimum :: Double
$sel:minimum:StatisticSet' :: StatisticSet -> Double
minimum} -> Double
minimum) (\s :: StatisticSet
s@StatisticSet' {} Double
a -> StatisticSet
s {$sel:minimum:StatisticSet' :: Double
minimum = Double
a} :: StatisticSet)
statisticSet_maximum :: Lens.Lens' StatisticSet Prelude.Double
statisticSet_maximum :: (Double -> f Double) -> StatisticSet -> f StatisticSet
statisticSet_maximum = (StatisticSet -> Double)
-> (StatisticSet -> Double -> StatisticSet)
-> Lens StatisticSet StatisticSet Double Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatisticSet' {Double
maximum :: Double
$sel:maximum:StatisticSet' :: StatisticSet -> Double
maximum} -> Double
maximum) (\s :: StatisticSet
s@StatisticSet' {} Double
a -> StatisticSet
s {$sel:maximum:StatisticSet' :: Double
maximum = Double
a} :: StatisticSet)
instance Prelude.Hashable StatisticSet
instance Prelude.NFData StatisticSet
instance Core.ToQuery StatisticSet where
toQuery :: StatisticSet -> QueryString
toQuery StatisticSet' {Double
maximum :: Double
minimum :: Double
sum :: Double
sampleCount :: Double
$sel:maximum:StatisticSet' :: StatisticSet -> Double
$sel:minimum:StatisticSet' :: StatisticSet -> Double
$sel:sum:StatisticSet' :: StatisticSet -> Double
$sel:sampleCount:StatisticSet' :: StatisticSet -> Double
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"SampleCount" ByteString -> Double -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Double
sampleCount,
ByteString
"Sum" ByteString -> Double -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Double
sum,
ByteString
"Minimum" ByteString -> Double -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Double
minimum,
ByteString
"Maximum" ByteString -> Double -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Double
maximum
]