{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JobProcessDetails = JobProcessDetails'
{
JobProcessDetails -> Maybe Int
numberOfRemovedThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfQueuedThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfFailedThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfSucceededThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfInProgressThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfCanceledThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfTimedOutThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe Int
numberOfRejectedThings :: Prelude.Maybe Prelude.Int,
JobProcessDetails -> Maybe [Text]
processingTargets :: Prelude.Maybe [Prelude.Text]
}
deriving (JobProcessDetails -> JobProcessDetails -> Bool
(JobProcessDetails -> JobProcessDetails -> Bool)
-> (JobProcessDetails -> JobProcessDetails -> Bool)
-> Eq JobProcessDetails
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]
(Int -> ReadS JobProcessDetails)
-> ReadS [JobProcessDetails]
-> ReadPrec JobProcessDetails
-> ReadPrec [JobProcessDetails]
-> Read 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
(Int -> JobProcessDetails -> ShowS)
-> (JobProcessDetails -> String)
-> ([JobProcessDetails] -> ShowS)
-> Show JobProcessDetails
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. JobProcessDetails -> Rep JobProcessDetails x)
-> (forall x. Rep JobProcessDetails x -> JobProcessDetails)
-> Generic JobProcessDetails
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' :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails
JobProcessDetails'
{ $sel:numberOfRemovedThings:JobProcessDetails' :: Maybe Int
numberOfRemovedThings =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfQueuedThings:JobProcessDetails' :: Maybe Int
numberOfQueuedThings = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfFailedThings:JobProcessDetails' :: Maybe Int
numberOfFailedThings = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfSucceededThings:JobProcessDetails' :: Maybe Int
numberOfSucceededThings = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfInProgressThings:JobProcessDetails' :: Maybe Int
numberOfInProgressThings = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfCanceledThings:JobProcessDetails' :: Maybe Int
numberOfCanceledThings = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfTimedOutThings:JobProcessDetails' :: Maybe Int
numberOfTimedOutThings = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfRejectedThings:JobProcessDetails' :: Maybe Int
numberOfRejectedThings = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:processingTargets:JobProcessDetails' :: Maybe [Text]
processingTargets = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
jobProcessDetails_numberOfRemovedThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfRemovedThings :: (Maybe Int -> f (Maybe Int))
-> JobProcessDetails -> f JobProcessDetails
jobProcessDetails_numberOfRemovedThings = (JobProcessDetails -> Maybe Int)
-> (JobProcessDetails -> Maybe Int -> JobProcessDetails)
-> Lens JobProcessDetails JobProcessDetails (Maybe Int) (Maybe Int)
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_numberOfQueuedThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfQueuedThings :: (Maybe Int -> f (Maybe Int))
-> JobProcessDetails -> f JobProcessDetails
jobProcessDetails_numberOfQueuedThings = (JobProcessDetails -> Maybe Int)
-> (JobProcessDetails -> Maybe Int -> JobProcessDetails)
-> Lens JobProcessDetails JobProcessDetails (Maybe Int) (Maybe Int)
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_numberOfFailedThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfFailedThings :: (Maybe Int -> f (Maybe Int))
-> JobProcessDetails -> f JobProcessDetails
jobProcessDetails_numberOfFailedThings = (JobProcessDetails -> Maybe Int)
-> (JobProcessDetails -> Maybe Int -> JobProcessDetails)
-> Lens JobProcessDetails JobProcessDetails (Maybe Int) (Maybe Int)
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_numberOfSucceededThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfSucceededThings :: (Maybe Int -> f (Maybe Int))
-> JobProcessDetails -> f JobProcessDetails
jobProcessDetails_numberOfSucceededThings = (JobProcessDetails -> Maybe Int)
-> (JobProcessDetails -> Maybe Int -> JobProcessDetails)
-> Lens JobProcessDetails JobProcessDetails (Maybe Int) (Maybe Int)
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_numberOfInProgressThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfInProgressThings :: (Maybe Int -> f (Maybe Int))
-> JobProcessDetails -> f JobProcessDetails
jobProcessDetails_numberOfInProgressThings = (JobProcessDetails -> Maybe Int)
-> (JobProcessDetails -> Maybe Int -> JobProcessDetails)
-> Lens JobProcessDetails JobProcessDetails (Maybe Int) (Maybe Int)
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_numberOfCanceledThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfCanceledThings :: (Maybe Int -> f (Maybe Int))
-> JobProcessDetails -> f JobProcessDetails
jobProcessDetails_numberOfCanceledThings = (JobProcessDetails -> Maybe Int)
-> (JobProcessDetails -> Maybe Int -> JobProcessDetails)
-> Lens JobProcessDetails JobProcessDetails (Maybe Int) (Maybe Int)
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_numberOfTimedOutThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfTimedOutThings :: (Maybe Int -> f (Maybe Int))
-> JobProcessDetails -> f JobProcessDetails
jobProcessDetails_numberOfTimedOutThings = (JobProcessDetails -> Maybe Int)
-> (JobProcessDetails -> Maybe Int -> JobProcessDetails)
-> Lens JobProcessDetails JobProcessDetails (Maybe Int) (Maybe Int)
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_numberOfRejectedThings :: Lens.Lens' JobProcessDetails (Prelude.Maybe Prelude.Int)
jobProcessDetails_numberOfRejectedThings :: (Maybe Int -> f (Maybe Int))
-> JobProcessDetails -> f JobProcessDetails
jobProcessDetails_numberOfRejectedThings = (JobProcessDetails -> Maybe Int)
-> (JobProcessDetails -> Maybe Int -> JobProcessDetails)
-> Lens JobProcessDetails JobProcessDetails (Maybe Int) (Maybe Int)
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_processingTargets :: Lens.Lens' JobProcessDetails (Prelude.Maybe [Prelude.Text])
jobProcessDetails_processingTargets :: (Maybe [Text] -> f (Maybe [Text]))
-> JobProcessDetails -> f JobProcessDetails
jobProcessDetails_processingTargets = (JobProcessDetails -> Maybe [Text])
-> (JobProcessDetails -> Maybe [Text] -> JobProcessDetails)
-> Lens
JobProcessDetails JobProcessDetails (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
-> JobProcessDetails -> f JobProcessDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> JobProcessDetails
-> f JobProcessDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON JobProcessDetails where
parseJSON :: Value -> Parser JobProcessDetails
parseJSON =
String
-> (Object -> Parser JobProcessDetails)
-> Value
-> Parser JobProcessDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.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'
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfRemovedThings")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfQueuedThings")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfFailedThings")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfSucceededThings")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> JobProcessDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe [Text] -> JobProcessDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfInProgressThings")
Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe [Text] -> JobProcessDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe Int -> Maybe Int -> Maybe [Text] -> JobProcessDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfCanceledThings")
Parser
(Maybe Int -> Maybe Int -> Maybe [Text] -> JobProcessDetails)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe [Text] -> JobProcessDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfTimedOutThings")
Parser (Maybe Int -> Maybe [Text] -> JobProcessDetails)
-> Parser (Maybe Int) -> Parser (Maybe [Text] -> JobProcessDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfRejectedThings")
Parser (Maybe [Text] -> JobProcessDetails)
-> Parser (Maybe [Text]) -> Parser JobProcessDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"processingTargets"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable JobProcessDetails
instance Prelude.NFData JobProcessDetails