{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ProfilingStatus = ProfilingStatus'
{
ProfilingStatus -> Maybe ISO8601
latestAgentOrchestratedAt :: Prelude.Maybe Data.ISO8601,
ProfilingStatus -> Maybe ISO8601
latestAgentProfileReportedAt :: Prelude.Maybe Data.ISO8601,
ProfilingStatus -> Maybe AggregatedProfileTime
latestAggregatedProfile :: Prelude.Maybe AggregatedProfileTime
}
deriving (ProfilingStatus -> ProfilingStatus -> Bool
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]
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
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. 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'
{ $sel:latestAgentOrchestratedAt:ProfilingStatus' :: Maybe ISO8601
latestAgentOrchestratedAt =
forall a. Maybe a
Prelude.Nothing,
$sel:latestAgentProfileReportedAt:ProfilingStatus' :: Maybe ISO8601
latestAgentProfileReportedAt = forall a. Maybe a
Prelude.Nothing,
$sel:latestAggregatedProfile:ProfilingStatus' :: Maybe AggregatedProfileTime
latestAggregatedProfile = forall a. Maybe a
Prelude.Nothing
}
profilingStatus_latestAgentOrchestratedAt :: Lens.Lens' ProfilingStatus (Prelude.Maybe Prelude.UTCTime)
profilingStatus_latestAgentOrchestratedAt :: Lens' ProfilingStatus (Maybe UTCTime)
profilingStatus_latestAgentOrchestratedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingStatus' {Maybe ISO8601
latestAgentOrchestratedAt :: Maybe ISO8601
$sel:latestAgentOrchestratedAt:ProfilingStatus' :: ProfilingStatus -> Maybe ISO8601
latestAgentOrchestratedAt} -> Maybe ISO8601
latestAgentOrchestratedAt) (\s :: ProfilingStatus
s@ProfilingStatus' {} Maybe ISO8601
a -> ProfilingStatus
s {$sel:latestAgentOrchestratedAt:ProfilingStatus' :: Maybe ISO8601
latestAgentOrchestratedAt = Maybe ISO8601
a} :: ProfilingStatus) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
profilingStatus_latestAgentProfileReportedAt :: Lens.Lens' ProfilingStatus (Prelude.Maybe Prelude.UTCTime)
profilingStatus_latestAgentProfileReportedAt :: Lens' ProfilingStatus (Maybe UTCTime)
profilingStatus_latestAgentProfileReportedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingStatus' {Maybe ISO8601
latestAgentProfileReportedAt :: Maybe ISO8601
$sel:latestAgentProfileReportedAt:ProfilingStatus' :: ProfilingStatus -> Maybe ISO8601
latestAgentProfileReportedAt} -> Maybe ISO8601
latestAgentProfileReportedAt) (\s :: ProfilingStatus
s@ProfilingStatus' {} Maybe ISO8601
a -> ProfilingStatus
s {$sel:latestAgentProfileReportedAt:ProfilingStatus' :: Maybe ISO8601
latestAgentProfileReportedAt = Maybe ISO8601
a} :: ProfilingStatus) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
profilingStatus_latestAggregatedProfile :: Lens.Lens' ProfilingStatus (Prelude.Maybe AggregatedProfileTime)
profilingStatus_latestAggregatedProfile :: Lens' ProfilingStatus (Maybe AggregatedProfileTime)
profilingStatus_latestAggregatedProfile = 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 Data.FromJSON ProfilingStatus where
parseJSON :: Value -> Parser ProfilingStatus
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProfilingStatus"
( \Object
x ->
Maybe ISO8601
-> Maybe ISO8601 -> Maybe AggregatedProfileTime -> ProfilingStatus
ProfilingStatus'
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
"latestAgentOrchestratedAt")
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
"latestAgentProfileReportedAt")
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
"latestAggregatedProfile")
)
instance Prelude.Hashable ProfilingStatus where
hashWithSalt :: Int -> ProfilingStatus -> Int
hashWithSalt Int
_salt ProfilingStatus' {Maybe ISO8601
Maybe AggregatedProfileTime
latestAggregatedProfile :: Maybe AggregatedProfileTime
latestAgentProfileReportedAt :: Maybe ISO8601
latestAgentOrchestratedAt :: Maybe ISO8601
$sel:latestAggregatedProfile:ProfilingStatus' :: ProfilingStatus -> Maybe AggregatedProfileTime
$sel:latestAgentProfileReportedAt:ProfilingStatus' :: ProfilingStatus -> Maybe ISO8601
$sel:latestAgentOrchestratedAt:ProfilingStatus' :: ProfilingStatus -> Maybe ISO8601
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
latestAgentOrchestratedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
latestAgentProfileReportedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AggregatedProfileTime
latestAggregatedProfile
instance Prelude.NFData ProfilingStatus where
rnf :: ProfilingStatus -> ()
rnf ProfilingStatus' {Maybe ISO8601
Maybe AggregatedProfileTime
latestAggregatedProfile :: Maybe AggregatedProfileTime
latestAgentProfileReportedAt :: Maybe ISO8601
latestAgentOrchestratedAt :: Maybe ISO8601
$sel:latestAggregatedProfile:ProfilingStatus' :: ProfilingStatus -> Maybe AggregatedProfileTime
$sel:latestAgentProfileReportedAt:ProfilingStatus' :: ProfilingStatus -> Maybe ISO8601
$sel:latestAgentOrchestratedAt:ProfilingStatus' :: ProfilingStatus -> Maybe ISO8601
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
latestAgentOrchestratedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
latestAgentProfileReportedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AggregatedProfileTime
latestAggregatedProfile