{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data JobExecutionSummary = JobExecutionSummary'
{
JobExecutionSummary -> Maybe Integer
executionNumber :: Prelude.Maybe Prelude.Integer,
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
startedAt :: Prelude.Maybe Prelude.Integer,
JobExecutionSummary -> Maybe Integer
versionNumber :: Prelude.Maybe Prelude.Integer
}
deriving (JobExecutionSummary -> JobExecutionSummary -> Bool
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]
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
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. 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'
{ $sel:executionNumber:JobExecutionSummary' :: Maybe Integer
executionNumber =
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:JobExecutionSummary' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedAt:JobExecutionSummary' :: Maybe Integer
lastUpdatedAt = forall a. Maybe a
Prelude.Nothing,
$sel:queuedAt:JobExecutionSummary' :: Maybe Integer
queuedAt = forall a. Maybe a
Prelude.Nothing,
$sel:startedAt:JobExecutionSummary' :: Maybe Integer
startedAt = forall a. Maybe a
Prelude.Nothing,
$sel:versionNumber:JobExecutionSummary' :: Maybe Integer
versionNumber = forall a. Maybe a
Prelude.Nothing
}
jobExecutionSummary_executionNumber :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Integer)
jobExecutionSummary_executionNumber :: Lens' JobExecutionSummary (Maybe Integer)
jobExecutionSummary_executionNumber = 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_jobId :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Text)
jobExecutionSummary_jobId :: Lens' JobExecutionSummary (Maybe Text)
jobExecutionSummary_jobId = 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 :: Lens' JobExecutionSummary (Maybe Integer)
jobExecutionSummary_lastUpdatedAt = 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 :: Lens' JobExecutionSummary (Maybe Integer)
jobExecutionSummary_queuedAt = 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_startedAt :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Integer)
jobExecutionSummary_startedAt :: Lens' JobExecutionSummary (Maybe Integer)
jobExecutionSummary_startedAt = 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)
jobExecutionSummary_versionNumber :: Lens.Lens' JobExecutionSummary (Prelude.Maybe Prelude.Integer)
jobExecutionSummary_versionNumber :: Lens' JobExecutionSummary (Maybe Integer)
jobExecutionSummary_versionNumber = 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)
instance Data.FromJSON JobExecutionSummary where
parseJSON :: Value -> Parser JobExecutionSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"JobExecutionSummary"
( \Object
x ->
Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> JobExecutionSummary
JobExecutionSummary'
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
"executionNumber")
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
"jobId")
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
"lastUpdatedAt")
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
"queuedAt")
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
"startedAt")
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
"versionNumber")
)
instance Prelude.Hashable JobExecutionSummary where
hashWithSalt :: Int -> JobExecutionSummary -> Int
hashWithSalt Int
_salt JobExecutionSummary' {Maybe Integer
Maybe Text
versionNumber :: Maybe Integer
startedAt :: Maybe Integer
queuedAt :: Maybe Integer
lastUpdatedAt :: Maybe Integer
jobId :: Maybe Text
executionNumber :: Maybe Integer
$sel:versionNumber:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
$sel:startedAt:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
$sel:queuedAt:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
$sel:lastUpdatedAt:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
$sel:jobId:JobExecutionSummary' :: JobExecutionSummary -> Maybe Text
$sel:executionNumber:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
executionNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
lastUpdatedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
queuedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
startedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
versionNumber
instance Prelude.NFData JobExecutionSummary where
rnf :: JobExecutionSummary -> ()
rnf JobExecutionSummary' {Maybe Integer
Maybe Text
versionNumber :: Maybe Integer
startedAt :: Maybe Integer
queuedAt :: Maybe Integer
lastUpdatedAt :: Maybe Integer
jobId :: Maybe Text
executionNumber :: Maybe Integer
$sel:versionNumber:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
$sel:startedAt:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
$sel:queuedAt:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
$sel:lastUpdatedAt:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
$sel:jobId:JobExecutionSummary' :: JobExecutionSummary -> Maybe Text
$sel:executionNumber:JobExecutionSummary' :: JobExecutionSummary -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
executionNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
lastUpdatedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
queuedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
startedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
versionNumber