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