{-# 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.IoTJobsData.Types.JobExecutionSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JobExecutionSummary = JobExecutionSummary'
{
JobExecutionSummary -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
JobExecutionSummary -> Maybe Integer
lastUpdatedAt :: Prelude.Maybe Prelude.Integer,
JobExecutionSummary -> Maybe Integer
queuedAt :: Prelude.Maybe Prelude.Integer,
JobExecutionSummary -> Maybe Integer
executionNumber :: Prelude.Maybe Prelude.Integer,
JobExecutionSummary -> Maybe Integer
versionNumber :: Prelude.Maybe Prelude.Integer,
JobExecutionSummary -> Maybe Integer
startedAt :: Prelude.Maybe Prelude.Integer
}
deriving (JobExecutionSummary -> JobExecutionSummary -> Bool
(JobExecutionSummary -> JobExecutionSummary -> Bool)
-> (JobExecutionSummary -> JobExecutionSummary -> Bool)
-> Eq JobExecutionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobExecutionSummary -> JobExecutionSummary -> Bool
$c/= :: JobExecutionSummary -> JobExecutionSummary -> Bool
== :: JobExecutionSummary -> JobExecutionSummary -> Bool
$c== :: JobExecutionSummary -> JobExecutionSummary -> Bool
Prelude.Eq, ReadPrec [JobExecutionSummary]
ReadPrec JobExecutionSummary
Int -> ReadS JobExecutionSummary
ReadS [JobExecutionSummary]
(Int -> ReadS JobExecutionSummary)
-> ReadS [JobExecutionSummary]
-> ReadPrec JobExecutionSummary
-> ReadPrec [JobExecutionSummary]
-> Read JobExecutionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobExecutionSummary]
$creadListPrec :: ReadPrec [JobExecutionSummary]
readPrec :: ReadPrec JobExecutionSummary
$creadPrec :: ReadPrec JobExecutionSummary
readList :: ReadS [JobExecutionSummary]
$creadList :: ReadS [JobExecutionSummary]
readsPrec :: Int -> ReadS JobExecutionSummary
$creadsPrec :: Int -> ReadS JobExecutionSummary
Prelude.Read, Int -> JobExecutionSummary -> ShowS
[JobExecutionSummary] -> ShowS
JobExecutionSummary -> String
(Int -> JobExecutionSummary -> ShowS)
-> (JobExecutionSummary -> String)
-> ([JobExecutionSummary] -> ShowS)
-> Show JobExecutionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobExecutionSummary] -> ShowS
$cshowList :: [JobExecutionSummary] -> ShowS
show :: JobExecutionSummary -> String
$cshow :: JobExecutionSummary -> String
showsPrec :: Int -> JobExecutionSummary -> ShowS
$cshowsPrec :: Int -> JobExecutionSummary -> ShowS
Prelude.Show, (forall x. JobExecutionSummary -> Rep JobExecutionSummary x)
-> (forall x. Rep JobExecutionSummary x -> JobExecutionSummary)
-> Generic JobExecutionSummary
forall x. Rep JobExecutionSummary x -> JobExecutionSummary
forall x. JobExecutionSummary -> Rep JobExecutionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobExecutionSummary x -> JobExecutionSummary
$cfrom :: forall x. JobExecutionSummary -> Rep JobExecutionSummary x
Prelude.Generic)
newJobExecutionSummary ::
JobExecutionSummary
newJobExecutionSummary :: JobExecutionSummary
newJobExecutionSummary =
JobExecutionSummary' :: Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> JobExecutionSummary
JobExecutionSummary'
{ $sel:jobId:JobExecutionSummary' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedAt:JobExecutionSummary' :: Maybe Integer
lastUpdatedAt = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:queuedAt:JobExecutionSummary' :: Maybe Integer
queuedAt = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:executionNumber:JobExecutionSummary' :: Maybe Integer
executionNumber = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:versionNumber:JobExecutionSummary' :: Maybe Integer
versionNumber = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:startedAt:JobExecutionSummary' :: Maybe Integer
startedAt = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
jobExecutionSummary_jobId :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Text)
jobExecutionSummary_jobId :: (Maybe Text -> f (Maybe Text))
-> JobExecutionSummary -> f JobExecutionSummary
jobExecutionSummary_jobId = (JobExecutionSummary -> Maybe Text)
-> (JobExecutionSummary -> Maybe Text -> JobExecutionSummary)
-> Lens
JobExecutionSummary JobExecutionSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobExecutionSummary' {Maybe Text
jobId :: Maybe Text
$sel:jobId:JobExecutionSummary' :: JobExecutionSummary -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: JobExecutionSummary
s@JobExecutionSummary' {} Maybe Text
a -> JobExecutionSummary
s {$sel:jobId:JobExecutionSummary' :: Maybe Text
jobId = Maybe Text
a} :: JobExecutionSummary)
jobExecutionSummary_lastUpdatedAt :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Integer)
jobExecutionSummary_lastUpdatedAt :: (Maybe Integer -> f (Maybe Integer))
-> JobExecutionSummary -> f JobExecutionSummary
jobExecutionSummary_lastUpdatedAt = (JobExecutionSummary -> Maybe Integer)
-> (JobExecutionSummary -> Maybe Integer -> JobExecutionSummary)
-> Lens
JobExecutionSummary
JobExecutionSummary
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobExecutionSummary' {Maybe Integer
lastUpdatedAt :: Maybe Integer
$sel:lastUpdatedAt:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
lastUpdatedAt} -> Maybe Integer
lastUpdatedAt) (\s :: JobExecutionSummary
s@JobExecutionSummary' {} Maybe Integer
a -> JobExecutionSummary
s {$sel:lastUpdatedAt:JobExecutionSummary' :: Maybe Integer
lastUpdatedAt = Maybe Integer
a} :: JobExecutionSummary)
jobExecutionSummary_queuedAt :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Integer)
jobExecutionSummary_queuedAt :: (Maybe Integer -> f (Maybe Integer))
-> JobExecutionSummary -> f JobExecutionSummary
jobExecutionSummary_queuedAt = (JobExecutionSummary -> Maybe Integer)
-> (JobExecutionSummary -> Maybe Integer -> JobExecutionSummary)
-> Lens
JobExecutionSummary
JobExecutionSummary
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobExecutionSummary' {Maybe Integer
queuedAt :: Maybe Integer
$sel:queuedAt:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
queuedAt} -> Maybe Integer
queuedAt) (\s :: JobExecutionSummary
s@JobExecutionSummary' {} Maybe Integer
a -> JobExecutionSummary
s {$sel:queuedAt:JobExecutionSummary' :: Maybe Integer
queuedAt = Maybe Integer
a} :: JobExecutionSummary)
jobExecutionSummary_executionNumber :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Integer)
jobExecutionSummary_executionNumber :: (Maybe Integer -> f (Maybe Integer))
-> JobExecutionSummary -> f JobExecutionSummary
jobExecutionSummary_executionNumber = (JobExecutionSummary -> Maybe Integer)
-> (JobExecutionSummary -> Maybe Integer -> JobExecutionSummary)
-> Lens
JobExecutionSummary
JobExecutionSummary
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobExecutionSummary' {Maybe Integer
executionNumber :: Maybe Integer
$sel:executionNumber:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
executionNumber} -> Maybe Integer
executionNumber) (\s :: JobExecutionSummary
s@JobExecutionSummary' {} Maybe Integer
a -> JobExecutionSummary
s {$sel:executionNumber:JobExecutionSummary' :: Maybe Integer
executionNumber = Maybe Integer
a} :: JobExecutionSummary)
jobExecutionSummary_versionNumber :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Integer)
jobExecutionSummary_versionNumber :: (Maybe Integer -> f (Maybe Integer))
-> JobExecutionSummary -> f JobExecutionSummary
jobExecutionSummary_versionNumber = (JobExecutionSummary -> Maybe Integer)
-> (JobExecutionSummary -> Maybe Integer -> JobExecutionSummary)
-> Lens
JobExecutionSummary
JobExecutionSummary
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobExecutionSummary' {Maybe Integer
versionNumber :: Maybe Integer
$sel:versionNumber:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
versionNumber} -> Maybe Integer
versionNumber) (\s :: JobExecutionSummary
s@JobExecutionSummary' {} Maybe Integer
a -> JobExecutionSummary
s {$sel:versionNumber:JobExecutionSummary' :: Maybe Integer
versionNumber = Maybe Integer
a} :: JobExecutionSummary)
jobExecutionSummary_startedAt :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Integer)
jobExecutionSummary_startedAt :: (Maybe Integer -> f (Maybe Integer))
-> JobExecutionSummary -> f JobExecutionSummary
jobExecutionSummary_startedAt = (JobExecutionSummary -> Maybe Integer)
-> (JobExecutionSummary -> Maybe Integer -> JobExecutionSummary)
-> Lens
JobExecutionSummary
JobExecutionSummary
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobExecutionSummary' {Maybe Integer
startedAt :: Maybe Integer
$sel:startedAt:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
startedAt} -> Maybe Integer
startedAt) (\s :: JobExecutionSummary
s@JobExecutionSummary' {} Maybe Integer
a -> JobExecutionSummary
s {$sel:startedAt:JobExecutionSummary' :: Maybe Integer
startedAt = Maybe Integer
a} :: JobExecutionSummary)
instance Core.FromJSON JobExecutionSummary where
parseJSON :: Value -> Parser JobExecutionSummary
parseJSON =
String
-> (Object -> Parser JobExecutionSummary)
-> Value
-> Parser JobExecutionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JobExecutionSummary"
( \Object
x ->
Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> JobExecutionSummary
JobExecutionSummary'
(Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> JobExecutionSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> JobExecutionSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobId")
Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> JobExecutionSummary)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> JobExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedAt")
Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> JobExecutionSummary)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Integer -> Maybe Integer -> JobExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"queuedAt")
Parser
(Maybe Integer
-> Maybe Integer -> Maybe Integer -> JobExecutionSummary)
-> Parser (Maybe Integer)
-> Parser (Maybe Integer -> Maybe Integer -> JobExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"executionNumber")
Parser (Maybe Integer -> Maybe Integer -> JobExecutionSummary)
-> Parser (Maybe Integer)
-> Parser (Maybe Integer -> JobExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"versionNumber")
Parser (Maybe Integer -> JobExecutionSummary)
-> Parser (Maybe Integer) -> Parser JobExecutionSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"startedAt")
)
instance Prelude.Hashable JobExecutionSummary
instance Prelude.NFData JobExecutionSummary