{-# 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.XRay.Types.TimeSeriesServiceStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.XRay.Types.EdgeStatistics
import Amazonka.XRay.Types.ForecastStatistics
import Amazonka.XRay.Types.HistogramEntry
import Amazonka.XRay.Types.ServiceStatistics
data TimeSeriesServiceStatistics = TimeSeriesServiceStatistics'
{ TimeSeriesServiceStatistics -> Maybe ServiceStatistics
serviceSummaryStatistics :: Prelude.Maybe ServiceStatistics,
TimeSeriesServiceStatistics -> Maybe [HistogramEntry]
responseTimeHistogram :: Prelude.Maybe [HistogramEntry],
TimeSeriesServiceStatistics -> Maybe EdgeStatistics
edgeSummaryStatistics :: Prelude.Maybe EdgeStatistics,
TimeSeriesServiceStatistics -> Maybe ForecastStatistics
serviceForecastStatistics :: Prelude.Maybe ForecastStatistics,
TimeSeriesServiceStatistics -> Maybe POSIX
timestamp :: Prelude.Maybe Core.POSIX
}
deriving (TimeSeriesServiceStatistics -> TimeSeriesServiceStatistics -> Bool
(TimeSeriesServiceStatistics
-> TimeSeriesServiceStatistics -> Bool)
-> (TimeSeriesServiceStatistics
-> TimeSeriesServiceStatistics -> Bool)
-> Eq TimeSeriesServiceStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimeSeriesServiceStatistics -> TimeSeriesServiceStatistics -> Bool
$c/= :: TimeSeriesServiceStatistics -> TimeSeriesServiceStatistics -> Bool
== :: TimeSeriesServiceStatistics -> TimeSeriesServiceStatistics -> Bool
$c== :: TimeSeriesServiceStatistics -> TimeSeriesServiceStatistics -> Bool
Prelude.Eq, ReadPrec [TimeSeriesServiceStatistics]
ReadPrec TimeSeriesServiceStatistics
Int -> ReadS TimeSeriesServiceStatistics
ReadS [TimeSeriesServiceStatistics]
(Int -> ReadS TimeSeriesServiceStatistics)
-> ReadS [TimeSeriesServiceStatistics]
-> ReadPrec TimeSeriesServiceStatistics
-> ReadPrec [TimeSeriesServiceStatistics]
-> Read TimeSeriesServiceStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TimeSeriesServiceStatistics]
$creadListPrec :: ReadPrec [TimeSeriesServiceStatistics]
readPrec :: ReadPrec TimeSeriesServiceStatistics
$creadPrec :: ReadPrec TimeSeriesServiceStatistics
readList :: ReadS [TimeSeriesServiceStatistics]
$creadList :: ReadS [TimeSeriesServiceStatistics]
readsPrec :: Int -> ReadS TimeSeriesServiceStatistics
$creadsPrec :: Int -> ReadS TimeSeriesServiceStatistics
Prelude.Read, Int -> TimeSeriesServiceStatistics -> ShowS
[TimeSeriesServiceStatistics] -> ShowS
TimeSeriesServiceStatistics -> String
(Int -> TimeSeriesServiceStatistics -> ShowS)
-> (TimeSeriesServiceStatistics -> String)
-> ([TimeSeriesServiceStatistics] -> ShowS)
-> Show TimeSeriesServiceStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimeSeriesServiceStatistics] -> ShowS
$cshowList :: [TimeSeriesServiceStatistics] -> ShowS
show :: TimeSeriesServiceStatistics -> String
$cshow :: TimeSeriesServiceStatistics -> String
showsPrec :: Int -> TimeSeriesServiceStatistics -> ShowS
$cshowsPrec :: Int -> TimeSeriesServiceStatistics -> ShowS
Prelude.Show, (forall x.
TimeSeriesServiceStatistics -> Rep TimeSeriesServiceStatistics x)
-> (forall x.
Rep TimeSeriesServiceStatistics x -> TimeSeriesServiceStatistics)
-> Generic TimeSeriesServiceStatistics
forall x.
Rep TimeSeriesServiceStatistics x -> TimeSeriesServiceStatistics
forall x.
TimeSeriesServiceStatistics -> Rep TimeSeriesServiceStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TimeSeriesServiceStatistics x -> TimeSeriesServiceStatistics
$cfrom :: forall x.
TimeSeriesServiceStatistics -> Rep TimeSeriesServiceStatistics x
Prelude.Generic)
newTimeSeriesServiceStatistics ::
TimeSeriesServiceStatistics
newTimeSeriesServiceStatistics :: TimeSeriesServiceStatistics
newTimeSeriesServiceStatistics =
TimeSeriesServiceStatistics' :: Maybe ServiceStatistics
-> Maybe [HistogramEntry]
-> Maybe EdgeStatistics
-> Maybe ForecastStatistics
-> Maybe POSIX
-> TimeSeriesServiceStatistics
TimeSeriesServiceStatistics'
{ $sel:serviceSummaryStatistics:TimeSeriesServiceStatistics' :: Maybe ServiceStatistics
serviceSummaryStatistics =
Maybe ServiceStatistics
forall a. Maybe a
Prelude.Nothing,
$sel:responseTimeHistogram:TimeSeriesServiceStatistics' :: Maybe [HistogramEntry]
responseTimeHistogram = Maybe [HistogramEntry]
forall a. Maybe a
Prelude.Nothing,
$sel:edgeSummaryStatistics:TimeSeriesServiceStatistics' :: Maybe EdgeStatistics
edgeSummaryStatistics = Maybe EdgeStatistics
forall a. Maybe a
Prelude.Nothing,
$sel:serviceForecastStatistics:TimeSeriesServiceStatistics' :: Maybe ForecastStatistics
serviceForecastStatistics = Maybe ForecastStatistics
forall a. Maybe a
Prelude.Nothing,
$sel:timestamp:TimeSeriesServiceStatistics' :: Maybe POSIX
timestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
timeSeriesServiceStatistics_serviceSummaryStatistics :: Lens.Lens' TimeSeriesServiceStatistics (Prelude.Maybe ServiceStatistics)
timeSeriesServiceStatistics_serviceSummaryStatistics :: (Maybe ServiceStatistics -> f (Maybe ServiceStatistics))
-> TimeSeriesServiceStatistics -> f TimeSeriesServiceStatistics
timeSeriesServiceStatistics_serviceSummaryStatistics = (TimeSeriesServiceStatistics -> Maybe ServiceStatistics)
-> (TimeSeriesServiceStatistics
-> Maybe ServiceStatistics -> TimeSeriesServiceStatistics)
-> Lens
TimeSeriesServiceStatistics
TimeSeriesServiceStatistics
(Maybe ServiceStatistics)
(Maybe ServiceStatistics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimeSeriesServiceStatistics' {Maybe ServiceStatistics
serviceSummaryStatistics :: Maybe ServiceStatistics
$sel:serviceSummaryStatistics:TimeSeriesServiceStatistics' :: TimeSeriesServiceStatistics -> Maybe ServiceStatistics
serviceSummaryStatistics} -> Maybe ServiceStatistics
serviceSummaryStatistics) (\s :: TimeSeriesServiceStatistics
s@TimeSeriesServiceStatistics' {} Maybe ServiceStatistics
a -> TimeSeriesServiceStatistics
s {$sel:serviceSummaryStatistics:TimeSeriesServiceStatistics' :: Maybe ServiceStatistics
serviceSummaryStatistics = Maybe ServiceStatistics
a} :: TimeSeriesServiceStatistics)
timeSeriesServiceStatistics_responseTimeHistogram :: Lens.Lens' TimeSeriesServiceStatistics (Prelude.Maybe [HistogramEntry])
timeSeriesServiceStatistics_responseTimeHistogram :: (Maybe [HistogramEntry] -> f (Maybe [HistogramEntry]))
-> TimeSeriesServiceStatistics -> f TimeSeriesServiceStatistics
timeSeriesServiceStatistics_responseTimeHistogram = (TimeSeriesServiceStatistics -> Maybe [HistogramEntry])
-> (TimeSeriesServiceStatistics
-> Maybe [HistogramEntry] -> TimeSeriesServiceStatistics)
-> Lens
TimeSeriesServiceStatistics
TimeSeriesServiceStatistics
(Maybe [HistogramEntry])
(Maybe [HistogramEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimeSeriesServiceStatistics' {Maybe [HistogramEntry]
responseTimeHistogram :: Maybe [HistogramEntry]
$sel:responseTimeHistogram:TimeSeriesServiceStatistics' :: TimeSeriesServiceStatistics -> Maybe [HistogramEntry]
responseTimeHistogram} -> Maybe [HistogramEntry]
responseTimeHistogram) (\s :: TimeSeriesServiceStatistics
s@TimeSeriesServiceStatistics' {} Maybe [HistogramEntry]
a -> TimeSeriesServiceStatistics
s {$sel:responseTimeHistogram:TimeSeriesServiceStatistics' :: Maybe [HistogramEntry]
responseTimeHistogram = Maybe [HistogramEntry]
a} :: TimeSeriesServiceStatistics) ((Maybe [HistogramEntry] -> f (Maybe [HistogramEntry]))
-> TimeSeriesServiceStatistics -> f TimeSeriesServiceStatistics)
-> ((Maybe [HistogramEntry] -> f (Maybe [HistogramEntry]))
-> Maybe [HistogramEntry] -> f (Maybe [HistogramEntry]))
-> (Maybe [HistogramEntry] -> f (Maybe [HistogramEntry]))
-> TimeSeriesServiceStatistics
-> f TimeSeriesServiceStatistics
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[HistogramEntry] [HistogramEntry] [HistogramEntry] [HistogramEntry]
-> Iso
(Maybe [HistogramEntry])
(Maybe [HistogramEntry])
(Maybe [HistogramEntry])
(Maybe [HistogramEntry])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[HistogramEntry] [HistogramEntry] [HistogramEntry] [HistogramEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
timeSeriesServiceStatistics_edgeSummaryStatistics :: Lens.Lens' TimeSeriesServiceStatistics (Prelude.Maybe EdgeStatistics)
timeSeriesServiceStatistics_edgeSummaryStatistics :: (Maybe EdgeStatistics -> f (Maybe EdgeStatistics))
-> TimeSeriesServiceStatistics -> f TimeSeriesServiceStatistics
timeSeriesServiceStatistics_edgeSummaryStatistics = (TimeSeriesServiceStatistics -> Maybe EdgeStatistics)
-> (TimeSeriesServiceStatistics
-> Maybe EdgeStatistics -> TimeSeriesServiceStatistics)
-> Lens
TimeSeriesServiceStatistics
TimeSeriesServiceStatistics
(Maybe EdgeStatistics)
(Maybe EdgeStatistics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimeSeriesServiceStatistics' {Maybe EdgeStatistics
edgeSummaryStatistics :: Maybe EdgeStatistics
$sel:edgeSummaryStatistics:TimeSeriesServiceStatistics' :: TimeSeriesServiceStatistics -> Maybe EdgeStatistics
edgeSummaryStatistics} -> Maybe EdgeStatistics
edgeSummaryStatistics) (\s :: TimeSeriesServiceStatistics
s@TimeSeriesServiceStatistics' {} Maybe EdgeStatistics
a -> TimeSeriesServiceStatistics
s {$sel:edgeSummaryStatistics:TimeSeriesServiceStatistics' :: Maybe EdgeStatistics
edgeSummaryStatistics = Maybe EdgeStatistics
a} :: TimeSeriesServiceStatistics)
timeSeriesServiceStatistics_serviceForecastStatistics :: Lens.Lens' TimeSeriesServiceStatistics (Prelude.Maybe ForecastStatistics)
timeSeriesServiceStatistics_serviceForecastStatistics :: (Maybe ForecastStatistics -> f (Maybe ForecastStatistics))
-> TimeSeriesServiceStatistics -> f TimeSeriesServiceStatistics
timeSeriesServiceStatistics_serviceForecastStatistics = (TimeSeriesServiceStatistics -> Maybe ForecastStatistics)
-> (TimeSeriesServiceStatistics
-> Maybe ForecastStatistics -> TimeSeriesServiceStatistics)
-> Lens
TimeSeriesServiceStatistics
TimeSeriesServiceStatistics
(Maybe ForecastStatistics)
(Maybe ForecastStatistics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimeSeriesServiceStatistics' {Maybe ForecastStatistics
serviceForecastStatistics :: Maybe ForecastStatistics
$sel:serviceForecastStatistics:TimeSeriesServiceStatistics' :: TimeSeriesServiceStatistics -> Maybe ForecastStatistics
serviceForecastStatistics} -> Maybe ForecastStatistics
serviceForecastStatistics) (\s :: TimeSeriesServiceStatistics
s@TimeSeriesServiceStatistics' {} Maybe ForecastStatistics
a -> TimeSeriesServiceStatistics
s {$sel:serviceForecastStatistics:TimeSeriesServiceStatistics' :: Maybe ForecastStatistics
serviceForecastStatistics = Maybe ForecastStatistics
a} :: TimeSeriesServiceStatistics)
timeSeriesServiceStatistics_timestamp :: Lens.Lens' TimeSeriesServiceStatistics (Prelude.Maybe Prelude.UTCTime)
timeSeriesServiceStatistics_timestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TimeSeriesServiceStatistics -> f TimeSeriesServiceStatistics
timeSeriesServiceStatistics_timestamp = (TimeSeriesServiceStatistics -> Maybe POSIX)
-> (TimeSeriesServiceStatistics
-> Maybe POSIX -> TimeSeriesServiceStatistics)
-> Lens
TimeSeriesServiceStatistics
TimeSeriesServiceStatistics
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimeSeriesServiceStatistics' {Maybe POSIX
timestamp :: Maybe POSIX
$sel:timestamp:TimeSeriesServiceStatistics' :: TimeSeriesServiceStatistics -> Maybe POSIX
timestamp} -> Maybe POSIX
timestamp) (\s :: TimeSeriesServiceStatistics
s@TimeSeriesServiceStatistics' {} Maybe POSIX
a -> TimeSeriesServiceStatistics
s {$sel:timestamp:TimeSeriesServiceStatistics' :: Maybe POSIX
timestamp = Maybe POSIX
a} :: TimeSeriesServiceStatistics) ((Maybe POSIX -> f (Maybe POSIX))
-> TimeSeriesServiceStatistics -> f TimeSeriesServiceStatistics)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TimeSeriesServiceStatistics
-> f TimeSeriesServiceStatistics
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON TimeSeriesServiceStatistics where
parseJSON :: Value -> Parser TimeSeriesServiceStatistics
parseJSON =
String
-> (Object -> Parser TimeSeriesServiceStatistics)
-> Value
-> Parser TimeSeriesServiceStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TimeSeriesServiceStatistics"
( \Object
x ->
Maybe ServiceStatistics
-> Maybe [HistogramEntry]
-> Maybe EdgeStatistics
-> Maybe ForecastStatistics
-> Maybe POSIX
-> TimeSeriesServiceStatistics
TimeSeriesServiceStatistics'
(Maybe ServiceStatistics
-> Maybe [HistogramEntry]
-> Maybe EdgeStatistics
-> Maybe ForecastStatistics
-> Maybe POSIX
-> TimeSeriesServiceStatistics)
-> Parser (Maybe ServiceStatistics)
-> Parser
(Maybe [HistogramEntry]
-> Maybe EdgeStatistics
-> Maybe ForecastStatistics
-> Maybe POSIX
-> TimeSeriesServiceStatistics)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ServiceStatistics)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceSummaryStatistics")
Parser
(Maybe [HistogramEntry]
-> Maybe EdgeStatistics
-> Maybe ForecastStatistics
-> Maybe POSIX
-> TimeSeriesServiceStatistics)
-> Parser (Maybe [HistogramEntry])
-> Parser
(Maybe EdgeStatistics
-> Maybe ForecastStatistics
-> Maybe POSIX
-> TimeSeriesServiceStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [HistogramEntry]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResponseTimeHistogram"
Parser (Maybe (Maybe [HistogramEntry]))
-> Maybe [HistogramEntry] -> Parser (Maybe [HistogramEntry])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [HistogramEntry]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe EdgeStatistics
-> Maybe ForecastStatistics
-> Maybe POSIX
-> TimeSeriesServiceStatistics)
-> Parser (Maybe EdgeStatistics)
-> Parser
(Maybe ForecastStatistics
-> Maybe POSIX -> TimeSeriesServiceStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EdgeStatistics)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EdgeSummaryStatistics")
Parser
(Maybe ForecastStatistics
-> Maybe POSIX -> TimeSeriesServiceStatistics)
-> Parser (Maybe ForecastStatistics)
-> Parser (Maybe POSIX -> TimeSeriesServiceStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ForecastStatistics)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceForecastStatistics")
Parser (Maybe POSIX -> TimeSeriesServiceStatistics)
-> Parser (Maybe POSIX) -> Parser TimeSeriesServiceStatistics
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Timestamp")
)
instance Prelude.Hashable TimeSeriesServiceStatistics
instance Prelude.NFData TimeSeriesServiceStatistics