{-# 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.ElasticBeanstalk.Types.Latency 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 Latency = Latency'
{
Latency -> Maybe Double
p10 :: Prelude.Maybe Prelude.Double,
Latency -> Maybe Double
p50 :: Prelude.Maybe Prelude.Double,
Latency -> Maybe Double
p75 :: Prelude.Maybe Prelude.Double,
Latency -> Maybe Double
p85 :: Prelude.Maybe Prelude.Double,
Latency -> Maybe Double
p90 :: Prelude.Maybe Prelude.Double,
Latency -> Maybe Double
p95 :: Prelude.Maybe Prelude.Double,
Latency -> Maybe Double
p99 :: Prelude.Maybe Prelude.Double,
Latency -> Maybe Double
p999 :: Prelude.Maybe Prelude.Double
}
deriving (Latency -> Latency -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Latency -> Latency -> Bool
$c/= :: Latency -> Latency -> Bool
== :: Latency -> Latency -> Bool
$c== :: Latency -> Latency -> Bool
Prelude.Eq, ReadPrec [Latency]
ReadPrec Latency
Int -> ReadS Latency
ReadS [Latency]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Latency]
$creadListPrec :: ReadPrec [Latency]
readPrec :: ReadPrec Latency
$creadPrec :: ReadPrec Latency
readList :: ReadS [Latency]
$creadList :: ReadS [Latency]
readsPrec :: Int -> ReadS Latency
$creadsPrec :: Int -> ReadS Latency
Prelude.Read, Int -> Latency -> ShowS
[Latency] -> ShowS
Latency -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Latency] -> ShowS
$cshowList :: [Latency] -> ShowS
show :: Latency -> String
$cshow :: Latency -> String
showsPrec :: Int -> Latency -> ShowS
$cshowsPrec :: Int -> Latency -> ShowS
Prelude.Show, forall x. Rep Latency x -> Latency
forall x. Latency -> Rep Latency x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Latency x -> Latency
$cfrom :: forall x. Latency -> Rep Latency x
Prelude.Generic)
newLatency ::
Latency
newLatency :: Latency
newLatency =
Latency'
{ $sel:p10:Latency' :: Maybe Double
p10 = forall a. Maybe a
Prelude.Nothing,
$sel:p50:Latency' :: Maybe Double
p50 = forall a. Maybe a
Prelude.Nothing,
$sel:p75:Latency' :: Maybe Double
p75 = forall a. Maybe a
Prelude.Nothing,
$sel:p85:Latency' :: Maybe Double
p85 = forall a. Maybe a
Prelude.Nothing,
$sel:p90:Latency' :: Maybe Double
p90 = forall a. Maybe a
Prelude.Nothing,
$sel:p95:Latency' :: Maybe Double
p95 = forall a. Maybe a
Prelude.Nothing,
$sel:p99:Latency' :: Maybe Double
p99 = forall a. Maybe a
Prelude.Nothing,
$sel:p999:Latency' :: Maybe Double
p999 = forall a. Maybe a
Prelude.Nothing
}
latency_p10 :: Lens.Lens' Latency (Prelude.Maybe Prelude.Double)
latency_p10 :: Lens' Latency (Maybe Double)
latency_p10 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Latency' {Maybe Double
p10 :: Maybe Double
$sel:p10:Latency' :: Latency -> Maybe Double
p10} -> Maybe Double
p10) (\s :: Latency
s@Latency' {} Maybe Double
a -> Latency
s {$sel:p10:Latency' :: Maybe Double
p10 = Maybe Double
a} :: Latency)
latency_p50 :: Lens.Lens' Latency (Prelude.Maybe Prelude.Double)
latency_p50 :: Lens' Latency (Maybe Double)
latency_p50 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Latency' {Maybe Double
p50 :: Maybe Double
$sel:p50:Latency' :: Latency -> Maybe Double
p50} -> Maybe Double
p50) (\s :: Latency
s@Latency' {} Maybe Double
a -> Latency
s {$sel:p50:Latency' :: Maybe Double
p50 = Maybe Double
a} :: Latency)
latency_p75 :: Lens.Lens' Latency (Prelude.Maybe Prelude.Double)
latency_p75 :: Lens' Latency (Maybe Double)
latency_p75 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Latency' {Maybe Double
p75 :: Maybe Double
$sel:p75:Latency' :: Latency -> Maybe Double
p75} -> Maybe Double
p75) (\s :: Latency
s@Latency' {} Maybe Double
a -> Latency
s {$sel:p75:Latency' :: Maybe Double
p75 = Maybe Double
a} :: Latency)
latency_p85 :: Lens.Lens' Latency (Prelude.Maybe Prelude.Double)
latency_p85 :: Lens' Latency (Maybe Double)
latency_p85 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Latency' {Maybe Double
p85 :: Maybe Double
$sel:p85:Latency' :: Latency -> Maybe Double
p85} -> Maybe Double
p85) (\s :: Latency
s@Latency' {} Maybe Double
a -> Latency
s {$sel:p85:Latency' :: Maybe Double
p85 = Maybe Double
a} :: Latency)
latency_p90 :: Lens.Lens' Latency (Prelude.Maybe Prelude.Double)
latency_p90 :: Lens' Latency (Maybe Double)
latency_p90 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Latency' {Maybe Double
p90 :: Maybe Double
$sel:p90:Latency' :: Latency -> Maybe Double
p90} -> Maybe Double
p90) (\s :: Latency
s@Latency' {} Maybe Double
a -> Latency
s {$sel:p90:Latency' :: Maybe Double
p90 = Maybe Double
a} :: Latency)
latency_p95 :: Lens.Lens' Latency (Prelude.Maybe Prelude.Double)
latency_p95 :: Lens' Latency (Maybe Double)
latency_p95 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Latency' {Maybe Double
p95 :: Maybe Double
$sel:p95:Latency' :: Latency -> Maybe Double
p95} -> Maybe Double
p95) (\s :: Latency
s@Latency' {} Maybe Double
a -> Latency
s {$sel:p95:Latency' :: Maybe Double
p95 = Maybe Double
a} :: Latency)
latency_p99 :: Lens.Lens' Latency (Prelude.Maybe Prelude.Double)
latency_p99 :: Lens' Latency (Maybe Double)
latency_p99 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Latency' {Maybe Double
p99 :: Maybe Double
$sel:p99:Latency' :: Latency -> Maybe Double
p99} -> Maybe Double
p99) (\s :: Latency
s@Latency' {} Maybe Double
a -> Latency
s {$sel:p99:Latency' :: Maybe Double
p99 = Maybe Double
a} :: Latency)
latency_p999 :: Lens.Lens' Latency (Prelude.Maybe Prelude.Double)
latency_p999 :: Lens' Latency (Maybe Double)
latency_p999 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Latency' {Maybe Double
p999 :: Maybe Double
$sel:p999:Latency' :: Latency -> Maybe Double
p999} -> Maybe Double
p999) (\s :: Latency
s@Latency' {} Maybe Double
a -> Latency
s {$sel:p999:Latency' :: Maybe Double
p999 = Maybe Double
a} :: Latency)
instance Data.FromXML Latency where
parseXML :: [Node] -> Either String Latency
parseXML [Node]
x =
Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Latency
Latency'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"P10")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"P50")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"P75")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"P85")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"P90")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"P95")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"P99")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"P999")
instance Prelude.Hashable Latency where
hashWithSalt :: Int -> Latency -> Int
hashWithSalt Int
_salt Latency' {Maybe Double
p999 :: Maybe Double
p99 :: Maybe Double
p95 :: Maybe Double
p90 :: Maybe Double
p85 :: Maybe Double
p75 :: Maybe Double
p50 :: Maybe Double
p10 :: Maybe Double
$sel:p999:Latency' :: Latency -> Maybe Double
$sel:p99:Latency' :: Latency -> Maybe Double
$sel:p95:Latency' :: Latency -> Maybe Double
$sel:p90:Latency' :: Latency -> Maybe Double
$sel:p85:Latency' :: Latency -> Maybe Double
$sel:p75:Latency' :: Latency -> Maybe Double
$sel:p50:Latency' :: Latency -> Maybe Double
$sel:p10:Latency' :: Latency -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
p10
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
p50
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
p75
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
p85
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
p90
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
p95
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
p99
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
p999
instance Prelude.NFData Latency where
rnf :: Latency -> ()
rnf Latency' {Maybe Double
p999 :: Maybe Double
p99 :: Maybe Double
p95 :: Maybe Double
p90 :: Maybe Double
p85 :: Maybe Double
p75 :: Maybe Double
p50 :: Maybe Double
p10 :: Maybe Double
$sel:p999:Latency' :: Latency -> Maybe Double
$sel:p99:Latency' :: Latency -> Maybe Double
$sel:p95:Latency' :: Latency -> Maybe Double
$sel:p90:Latency' :: Latency -> Maybe Double
$sel:p85:Latency' :: Latency -> Maybe Double
$sel:p75:Latency' :: Latency -> Maybe Double
$sel:p50:Latency' :: Latency -> Maybe Double
$sel:p10:Latency' :: Latency -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
p10
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
p50
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
p75
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
p85
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
p90
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
p95
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
p99
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
p999