{-# 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.CodeGuruProfiler.Types.ProfilingStatus where
import Amazonka.CodeGuruProfiler.Types.AggregatedProfileTime
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProfilingStatus = ProfilingStatus'
{
ProfilingStatus -> Maybe POSIX
latestAgentOrchestratedAt :: Prelude.Maybe Core.POSIX,
ProfilingStatus -> Maybe POSIX
latestAgentProfileReportedAt :: Prelude.Maybe Core.POSIX,
ProfilingStatus -> Maybe AggregatedProfileTime
latestAggregatedProfile :: Prelude.Maybe AggregatedProfileTime
}
deriving (ProfilingStatus -> ProfilingStatus -> Bool
(ProfilingStatus -> ProfilingStatus -> Bool)
-> (ProfilingStatus -> ProfilingStatus -> Bool)
-> Eq ProfilingStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProfilingStatus -> ProfilingStatus -> Bool
$c/= :: ProfilingStatus -> ProfilingStatus -> Bool
== :: ProfilingStatus -> ProfilingStatus -> Bool
$c== :: ProfilingStatus -> ProfilingStatus -> Bool
Prelude.Eq, ReadPrec [ProfilingStatus]
ReadPrec ProfilingStatus
Int -> ReadS ProfilingStatus
ReadS [ProfilingStatus]
(Int -> ReadS ProfilingStatus)
-> ReadS [ProfilingStatus]
-> ReadPrec ProfilingStatus
-> ReadPrec [ProfilingStatus]
-> Read ProfilingStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProfilingStatus]
$creadListPrec :: ReadPrec [ProfilingStatus]
readPrec :: ReadPrec ProfilingStatus
$creadPrec :: ReadPrec ProfilingStatus
readList :: ReadS [ProfilingStatus]
$creadList :: ReadS [ProfilingStatus]
readsPrec :: Int -> ReadS ProfilingStatus
$creadsPrec :: Int -> ReadS ProfilingStatus
Prelude.Read, Int -> ProfilingStatus -> ShowS
[ProfilingStatus] -> ShowS
ProfilingStatus -> String
(Int -> ProfilingStatus -> ShowS)
-> (ProfilingStatus -> String)
-> ([ProfilingStatus] -> ShowS)
-> Show ProfilingStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProfilingStatus] -> ShowS
$cshowList :: [ProfilingStatus] -> ShowS
show :: ProfilingStatus -> String
$cshow :: ProfilingStatus -> String
showsPrec :: Int -> ProfilingStatus -> ShowS
$cshowsPrec :: Int -> ProfilingStatus -> ShowS
Prelude.Show, (forall x. ProfilingStatus -> Rep ProfilingStatus x)
-> (forall x. Rep ProfilingStatus x -> ProfilingStatus)
-> Generic ProfilingStatus
forall x. Rep ProfilingStatus x -> ProfilingStatus
forall x. ProfilingStatus -> Rep ProfilingStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProfilingStatus x -> ProfilingStatus
$cfrom :: forall x. ProfilingStatus -> Rep ProfilingStatus x
Prelude.Generic)
newProfilingStatus ::
ProfilingStatus
newProfilingStatus :: ProfilingStatus
newProfilingStatus =
ProfilingStatus' :: Maybe POSIX
-> Maybe POSIX -> Maybe AggregatedProfileTime -> ProfilingStatus
ProfilingStatus'
{ $sel:latestAgentOrchestratedAt:ProfilingStatus' :: Maybe POSIX
latestAgentOrchestratedAt =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:latestAgentProfileReportedAt:ProfilingStatus' :: Maybe POSIX
latestAgentProfileReportedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:latestAggregatedProfile:ProfilingStatus' :: Maybe AggregatedProfileTime
latestAggregatedProfile = Maybe AggregatedProfileTime
forall a. Maybe a
Prelude.Nothing
}
profilingStatus_latestAgentOrchestratedAt :: Lens.Lens' ProfilingStatus (Prelude.Maybe Prelude.UTCTime)
profilingStatus_latestAgentOrchestratedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilingStatus -> f ProfilingStatus
profilingStatus_latestAgentOrchestratedAt = (ProfilingStatus -> Maybe POSIX)
-> (ProfilingStatus -> Maybe POSIX -> ProfilingStatus)
-> Lens ProfilingStatus ProfilingStatus (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingStatus' {Maybe POSIX
latestAgentOrchestratedAt :: Maybe POSIX
$sel:latestAgentOrchestratedAt:ProfilingStatus' :: ProfilingStatus -> Maybe POSIX
latestAgentOrchestratedAt} -> Maybe POSIX
latestAgentOrchestratedAt) (\s :: ProfilingStatus
s@ProfilingStatus' {} Maybe POSIX
a -> ProfilingStatus
s {$sel:latestAgentOrchestratedAt:ProfilingStatus' :: Maybe POSIX
latestAgentOrchestratedAt = Maybe POSIX
a} :: ProfilingStatus) ((Maybe POSIX -> f (Maybe POSIX))
-> ProfilingStatus -> f ProfilingStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilingStatus
-> f ProfilingStatus
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
profilingStatus_latestAgentProfileReportedAt :: Lens.Lens' ProfilingStatus (Prelude.Maybe Prelude.UTCTime)
profilingStatus_latestAgentProfileReportedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilingStatus -> f ProfilingStatus
profilingStatus_latestAgentProfileReportedAt = (ProfilingStatus -> Maybe POSIX)
-> (ProfilingStatus -> Maybe POSIX -> ProfilingStatus)
-> Lens ProfilingStatus ProfilingStatus (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingStatus' {Maybe POSIX
latestAgentProfileReportedAt :: Maybe POSIX
$sel:latestAgentProfileReportedAt:ProfilingStatus' :: ProfilingStatus -> Maybe POSIX
latestAgentProfileReportedAt} -> Maybe POSIX
latestAgentProfileReportedAt) (\s :: ProfilingStatus
s@ProfilingStatus' {} Maybe POSIX
a -> ProfilingStatus
s {$sel:latestAgentProfileReportedAt:ProfilingStatus' :: Maybe POSIX
latestAgentProfileReportedAt = Maybe POSIX
a} :: ProfilingStatus) ((Maybe POSIX -> f (Maybe POSIX))
-> ProfilingStatus -> f ProfilingStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilingStatus
-> f ProfilingStatus
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
profilingStatus_latestAggregatedProfile :: Lens.Lens' ProfilingStatus (Prelude.Maybe AggregatedProfileTime)
profilingStatus_latestAggregatedProfile :: (Maybe AggregatedProfileTime -> f (Maybe AggregatedProfileTime))
-> ProfilingStatus -> f ProfilingStatus
profilingStatus_latestAggregatedProfile = (ProfilingStatus -> Maybe AggregatedProfileTime)
-> (ProfilingStatus
-> Maybe AggregatedProfileTime -> ProfilingStatus)
-> Lens
ProfilingStatus
ProfilingStatus
(Maybe AggregatedProfileTime)
(Maybe AggregatedProfileTime)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingStatus' {Maybe AggregatedProfileTime
latestAggregatedProfile :: Maybe AggregatedProfileTime
$sel:latestAggregatedProfile:ProfilingStatus' :: ProfilingStatus -> Maybe AggregatedProfileTime
latestAggregatedProfile} -> Maybe AggregatedProfileTime
latestAggregatedProfile) (\s :: ProfilingStatus
s@ProfilingStatus' {} Maybe AggregatedProfileTime
a -> ProfilingStatus
s {$sel:latestAggregatedProfile:ProfilingStatus' :: Maybe AggregatedProfileTime
latestAggregatedProfile = Maybe AggregatedProfileTime
a} :: ProfilingStatus)
instance Core.FromJSON ProfilingStatus where
parseJSON :: Value -> Parser ProfilingStatus
parseJSON =
String
-> (Object -> Parser ProfilingStatus)
-> Value
-> Parser ProfilingStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProfilingStatus"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX -> Maybe AggregatedProfileTime -> ProfilingStatus
ProfilingStatus'
(Maybe POSIX
-> Maybe POSIX -> Maybe AggregatedProfileTime -> ProfilingStatus)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX -> Maybe AggregatedProfileTime -> ProfilingStatus)
forall (f :: * -> *) a b. Functor 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
"latestAgentOrchestratedAt")
Parser
(Maybe POSIX -> Maybe AggregatedProfileTime -> ProfilingStatus)
-> Parser (Maybe POSIX)
-> Parser (Maybe AggregatedProfileTime -> ProfilingStatus)
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
"latestAgentProfileReportedAt")
Parser (Maybe AggregatedProfileTime -> ProfilingStatus)
-> Parser (Maybe AggregatedProfileTime) -> Parser ProfilingStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AggregatedProfileTime)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"latestAggregatedProfile")
)
instance Prelude.Hashable ProfilingStatus
instance Prelude.NFData ProfilingStatus