{-# 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.IoT.Types.JobProcessDetails 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 JobProcessDetails = JobProcessDetails'
{
JobProcessDetails -> Maybe Int
numberOfCanceledThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfFailedThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfInProgressThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfQueuedThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfRejectedThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfRemovedThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfSucceededThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfTimedOutThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe [Text]
processingTargets :: Prelude.Maybe [Prelude.Text]
}
deriving (JobProcessDetails -> JobProcessDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobProcessDetails -> JobProcessDetails -> Bool
$c/= :: JobProcessDetails -> JobProcessDetails -> Bool
== :: JobProcessDetails -> JobProcessDetails -> Bool
$c== :: JobProcessDetails -> JobProcessDetails -> Bool
Prelude.Eq, ReadPrec [JobProcessDetails]
ReadPrec JobProcessDetails
Int -> ReadS JobProcessDetails
ReadS [JobProcessDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobProcessDetails]
$creadListPrec :: ReadPrec [JobProcessDetails]
readPrec :: ReadPrec JobProcessDetails
$creadPrec :: ReadPrec JobProcessDetails
readList :: ReadS [JobProcessDetails]
$creadList :: ReadS [JobProcessDetails]
readsPrec :: Int -> ReadS JobProcessDetails
$creadsPrec :: Int -> ReadS JobProcessDetails
Prelude.Read, Int -> JobProcessDetails -> ShowS
[JobProcessDetails] -> ShowS
JobProcessDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobProcessDetails] -> ShowS
$cshowList :: [JobProcessDetails] -> ShowS
show :: JobProcessDetails -> String
$cshow :: JobProcessDetails -> String
showsPrec :: Int -> JobProcessDetails -> ShowS
$cshowsPrec :: Int -> JobProcessDetails -> ShowS
Prelude.Show, forall x. Rep JobProcessDetails x -> JobProcessDetails
forall x. JobProcessDetails -> Rep JobProcessDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobProcessDetails x -> JobProcessDetails
$cfrom :: forall x. JobProcessDetails -> Rep JobProcessDetails x
Prelude.Generic)
newJobProcessDetails ::
JobProcessDetails
newJobProcessDetails :: JobProcessDetails
newJobProcessDetails =
JobProcessDetails'
{ $sel:numberOfCanceledThings:JobProcessDetails' :: Maybe Int
numberOfCanceledThings =
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfFailedThings:JobProcessDetails' :: Maybe Int
numberOfFailedThings = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfInProgressThings:JobProcessDetails' :: Maybe Int
numberOfInProgressThings = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfQueuedThings:JobProcessDetails' :: Maybe Int
numberOfQueuedThings = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfRejectedThings:JobProcessDetails' :: Maybe Int
numberOfRejectedThings = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfRemovedThings:JobProcessDetails' :: Maybe Int
numberOfRemovedThings = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfSucceededThings:JobProcessDetails' :: Maybe Int
numberOfSucceededThings = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfTimedOutThings:JobProcessDetails' :: Maybe Int
numberOfTimedOutThings = forall a. Maybe a
Prelude.Nothing,
$sel:processingTargets:JobProcessDetails' :: Maybe [Text]
processingTargets = forall a. Maybe a
Prelude.Nothing
}
jobProcessDetails_numberOfCanceledThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfCanceledThings :: Lens' JobProcessDetails (Maybe Int)
jobProcessDetails_numberOfCanceledThings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobProcessDetails' {Maybe Int
numberOfCanceledThings :: Maybe Int
$sel:numberOfCanceledThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
numberOfCanceledThings} -> Maybe Int
numberOfCanceledThings) (\s :: JobProcessDetails
s@JobProcessDetails' {} Maybe Int
a -> JobProcessDetails
s {$sel:numberOfCanceledThings:JobProcessDetails' :: Maybe Int
numberOfCanceledThings = Maybe Int
a} :: JobProcessDetails)
jobProcessDetails_numberOfFailedThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfFailedThings :: Lens' JobProcessDetails (Maybe Int)
jobProcessDetails_numberOfFailedThings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobProcessDetails' {Maybe Int
numberOfFailedThings :: Maybe Int
$sel:numberOfFailedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
numberOfFailedThings} -> Maybe Int
numberOfFailedThings) (\s :: JobProcessDetails
s@JobProcessDetails' {} Maybe Int
a -> JobProcessDetails
s {$sel:numberOfFailedThings:JobProcessDetails' :: Maybe Int
numberOfFailedThings = Maybe Int
a} :: JobProcessDetails)
jobProcessDetails_numberOfInProgressThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfInProgressThings :: Lens' JobProcessDetails (Maybe Int)
jobProcessDetails_numberOfInProgressThings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobProcessDetails' {Maybe Int
numberOfInProgressThings :: Maybe Int
$sel:numberOfInProgressThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
numberOfInProgressThings} -> Maybe Int
numberOfInProgressThings) (\s :: JobProcessDetails
s@JobProcessDetails' {} Maybe Int
a -> JobProcessDetails
s {$sel:numberOfInProgressThings:JobProcessDetails' :: Maybe Int
numberOfInProgressThings = Maybe Int
a} :: JobProcessDetails)
jobProcessDetails_numberOfQueuedThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfQueuedThings :: Lens' JobProcessDetails (Maybe Int)
jobProcessDetails_numberOfQueuedThings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobProcessDetails' {Maybe Int
numberOfQueuedThings :: Maybe Int
$sel:numberOfQueuedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
numberOfQueuedThings} -> Maybe Int
numberOfQueuedThings) (\s :: JobProcessDetails
s@JobProcessDetails' {} Maybe Int
a -> JobProcessDetails
s {$sel:numberOfQueuedThings:JobProcessDetails' :: Maybe Int
numberOfQueuedThings = Maybe Int
a} :: JobProcessDetails)
jobProcessDetails_numberOfRejectedThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfRejectedThings :: Lens' JobProcessDetails (Maybe Int)
jobProcessDetails_numberOfRejectedThings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobProcessDetails' {Maybe Int
numberOfRejectedThings :: Maybe Int
$sel:numberOfRejectedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
numberOfRejectedThings} -> Maybe Int
numberOfRejectedThings) (\s :: JobProcessDetails
s@JobProcessDetails' {} Maybe Int
a -> JobProcessDetails
s {$sel:numberOfRejectedThings:JobProcessDetails' :: Maybe Int
numberOfRejectedThings = Maybe Int
a} :: JobProcessDetails)
jobProcessDetails_numberOfRemovedThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfRemovedThings :: Lens' JobProcessDetails (Maybe Int)
jobProcessDetails_numberOfRemovedThings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobProcessDetails' {Maybe Int
numberOfRemovedThings :: Maybe Int
$sel:numberOfRemovedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
numberOfRemovedThings} -> Maybe Int
numberOfRemovedThings) (\s :: JobProcessDetails
s@JobProcessDetails' {} Maybe Int
a -> JobProcessDetails
s {$sel:numberOfRemovedThings:JobProcessDetails' :: Maybe Int
numberOfRemovedThings = Maybe Int
a} :: JobProcessDetails)
jobProcessDetails_numberOfSucceededThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfSucceededThings :: Lens' JobProcessDetails (Maybe Int)
jobProcessDetails_numberOfSucceededThings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobProcessDetails' {Maybe Int
numberOfSucceededThings :: Maybe Int
$sel:numberOfSucceededThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
numberOfSucceededThings} -> Maybe Int
numberOfSucceededThings) (\s :: JobProcessDetails
s@JobProcessDetails' {} Maybe Int
a -> JobProcessDetails
s {$sel:numberOfSucceededThings:JobProcessDetails' :: Maybe Int
numberOfSucceededThings = Maybe Int
a} :: JobProcessDetails)
jobProcessDetails_numberOfTimedOutThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfTimedOutThings :: Lens' JobProcessDetails (Maybe Int)
jobProcessDetails_numberOfTimedOutThings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobProcessDetails' {Maybe Int
numberOfTimedOutThings :: Maybe Int
$sel:numberOfTimedOutThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
numberOfTimedOutThings} -> Maybe Int
numberOfTimedOutThings) (\s :: JobProcessDetails
s@JobProcessDetails' {} Maybe Int
a -> JobProcessDetails
s {$sel:numberOfTimedOutThings:JobProcessDetails' :: Maybe Int
numberOfTimedOutThings = Maybe Int
a} :: JobProcessDetails)
jobProcessDetails_processingTargets :: Lens.Lens' JobProcessDetails (Prelude.Maybe [Prelude.Text])
jobProcessDetails_processingTargets :: Lens' JobProcessDetails (Maybe [Text])
jobProcessDetails_processingTargets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobProcessDetails' {Maybe [Text]
processingTargets :: Maybe [Text]
$sel:processingTargets:JobProcessDetails' :: JobProcessDetails -> Maybe [Text]
processingTargets} -> Maybe [Text]
processingTargets) (\s :: JobProcessDetails
s@JobProcessDetails' {} Maybe [Text]
a -> JobProcessDetails
s {$sel:processingTargets:JobProcessDetails' :: Maybe [Text]
processingTargets = Maybe [Text]
a} :: JobProcessDetails) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON JobProcessDetails where
parseJSON :: Value -> Parser JobProcessDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"JobProcessDetails"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails
JobProcessDetails'
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
"numberOfCanceledThings")
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
"numberOfFailedThings")
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
"numberOfInProgressThings")
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
"numberOfQueuedThings")
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
"numberOfRejectedThings")
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
"numberOfRemovedThings")
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
"numberOfSucceededThings")
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
"numberOfTimedOutThings")
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
"processingTargets"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable JobProcessDetails where
hashWithSalt :: Int -> JobProcessDetails -> Int
hashWithSalt Int
_salt JobProcessDetails' {Maybe Int
Maybe [Text]
processingTargets :: Maybe [Text]
numberOfTimedOutThings :: Maybe Int
numberOfSucceededThings :: Maybe Int
numberOfRemovedThings :: Maybe Int
numberOfRejectedThings :: Maybe Int
numberOfQueuedThings :: Maybe Int
numberOfInProgressThings :: Maybe Int
numberOfFailedThings :: Maybe Int
numberOfCanceledThings :: Maybe Int
$sel:processingTargets:JobProcessDetails' :: JobProcessDetails -> Maybe [Text]
$sel:numberOfTimedOutThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfSucceededThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfRemovedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfRejectedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfQueuedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfInProgressThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfFailedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfCanceledThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfCanceledThings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfFailedThings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfInProgressThings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfQueuedThings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfRejectedThings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfRemovedThings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfSucceededThings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfTimedOutThings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
processingTargets
instance Prelude.NFData JobProcessDetails where
rnf :: JobProcessDetails -> ()
rnf JobProcessDetails' {Maybe Int
Maybe [Text]
processingTargets :: Maybe [Text]
numberOfTimedOutThings :: Maybe Int
numberOfSucceededThings :: Maybe Int
numberOfRemovedThings :: Maybe Int
numberOfRejectedThings :: Maybe Int
numberOfQueuedThings :: Maybe Int
numberOfInProgressThings :: Maybe Int
numberOfFailedThings :: Maybe Int
numberOfCanceledThings :: Maybe Int
$sel:processingTargets:JobProcessDetails' :: JobProcessDetails -> Maybe [Text]
$sel:numberOfTimedOutThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfSucceededThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfRemovedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfRejectedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfQueuedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfInProgressThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfFailedThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
$sel:numberOfCanceledThings:JobProcessDetails' :: JobProcessDetails -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfCanceledThings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfFailedThings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfInProgressThings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfQueuedThings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfRejectedThings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfRemovedThings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfSucceededThings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfTimedOutThings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
processingTargets