{-# 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.Amplify.Types.JobSummary where
import Amazonka.Amplify.Types.JobStatus
import Amazonka.Amplify.Types.JobType
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 JobSummary = JobSummary'
{
JobSummary -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
JobSummary -> Text
jobArn :: Prelude.Text,
JobSummary -> Text
jobId :: Prelude.Text,
JobSummary -> Text
commitId :: Prelude.Text,
JobSummary -> Text
commitMessage :: Prelude.Text,
JobSummary -> POSIX
commitTime :: Data.POSIX,
JobSummary -> POSIX
startTime :: Data.POSIX,
JobSummary -> JobStatus
status :: JobStatus,
JobSummary -> JobType
jobType :: JobType
}
deriving (JobSummary -> JobSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobSummary -> JobSummary -> Bool
$c/= :: JobSummary -> JobSummary -> Bool
== :: JobSummary -> JobSummary -> Bool
$c== :: JobSummary -> JobSummary -> Bool
Prelude.Eq, ReadPrec [JobSummary]
ReadPrec JobSummary
Int -> ReadS JobSummary
ReadS [JobSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobSummary]
$creadListPrec :: ReadPrec [JobSummary]
readPrec :: ReadPrec JobSummary
$creadPrec :: ReadPrec JobSummary
readList :: ReadS [JobSummary]
$creadList :: ReadS [JobSummary]
readsPrec :: Int -> ReadS JobSummary
$creadsPrec :: Int -> ReadS JobSummary
Prelude.Read, Int -> JobSummary -> ShowS
[JobSummary] -> ShowS
JobSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobSummary] -> ShowS
$cshowList :: [JobSummary] -> ShowS
show :: JobSummary -> String
$cshow :: JobSummary -> String
showsPrec :: Int -> JobSummary -> ShowS
$cshowsPrec :: Int -> JobSummary -> ShowS
Prelude.Show, forall x. Rep JobSummary x -> JobSummary
forall x. JobSummary -> Rep JobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobSummary x -> JobSummary
$cfrom :: forall x. JobSummary -> Rep JobSummary x
Prelude.Generic)
newJobSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
JobStatus ->
JobType ->
JobSummary
newJobSummary :: Text
-> Text
-> Text
-> Text
-> UTCTime
-> UTCTime
-> JobStatus
-> JobType
-> JobSummary
newJobSummary
Text
pJobArn_
Text
pJobId_
Text
pCommitId_
Text
pCommitMessage_
UTCTime
pCommitTime_
UTCTime
pStartTime_
JobStatus
pStatus_
JobType
pJobType_ =
JobSummary'
{ $sel:endTime:JobSummary' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:JobSummary' :: Text
jobArn = Text
pJobArn_,
$sel:jobId:JobSummary' :: Text
jobId = Text
pJobId_,
$sel:commitId:JobSummary' :: Text
commitId = Text
pCommitId_,
$sel:commitMessage:JobSummary' :: Text
commitMessage = Text
pCommitMessage_,
$sel:commitTime:JobSummary' :: POSIX
commitTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCommitTime_,
$sel:startTime:JobSummary' :: POSIX
startTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:status:JobSummary' :: JobStatus
status = JobStatus
pStatus_,
$sel:jobType:JobSummary' :: JobType
jobType = JobType
pJobType_
}
jobSummary_endTime :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.UTCTime)
jobSummary_endTime :: Lens' JobSummary (Maybe UTCTime)
jobSummary_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:JobSummary' :: JobSummary -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: JobSummary
s@JobSummary' {} Maybe POSIX
a -> JobSummary
s {$sel:endTime:JobSummary' :: Maybe POSIX
endTime = Maybe POSIX
a} :: JobSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
jobSummary_jobArn :: Lens.Lens' JobSummary Prelude.Text
jobSummary_jobArn :: Lens' JobSummary Text
jobSummary_jobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Text
jobArn :: Text
$sel:jobArn:JobSummary' :: JobSummary -> Text
jobArn} -> Text
jobArn) (\s :: JobSummary
s@JobSummary' {} Text
a -> JobSummary
s {$sel:jobArn:JobSummary' :: Text
jobArn = Text
a} :: JobSummary)
jobSummary_jobId :: Lens.Lens' JobSummary Prelude.Text
jobSummary_jobId :: Lens' JobSummary Text
jobSummary_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Text
jobId :: Text
$sel:jobId:JobSummary' :: JobSummary -> Text
jobId} -> Text
jobId) (\s :: JobSummary
s@JobSummary' {} Text
a -> JobSummary
s {$sel:jobId:JobSummary' :: Text
jobId = Text
a} :: JobSummary)
jobSummary_commitId :: Lens.Lens' JobSummary Prelude.Text
jobSummary_commitId :: Lens' JobSummary Text
jobSummary_commitId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Text
commitId :: Text
$sel:commitId:JobSummary' :: JobSummary -> Text
commitId} -> Text
commitId) (\s :: JobSummary
s@JobSummary' {} Text
a -> JobSummary
s {$sel:commitId:JobSummary' :: Text
commitId = Text
a} :: JobSummary)
jobSummary_commitMessage :: Lens.Lens' JobSummary Prelude.Text
jobSummary_commitMessage :: Lens' JobSummary Text
jobSummary_commitMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Text
commitMessage :: Text
$sel:commitMessage:JobSummary' :: JobSummary -> Text
commitMessage} -> Text
commitMessage) (\s :: JobSummary
s@JobSummary' {} Text
a -> JobSummary
s {$sel:commitMessage:JobSummary' :: Text
commitMessage = Text
a} :: JobSummary)
jobSummary_commitTime :: Lens.Lens' JobSummary Prelude.UTCTime
jobSummary_commitTime :: Lens' JobSummary UTCTime
jobSummary_commitTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {POSIX
commitTime :: POSIX
$sel:commitTime:JobSummary' :: JobSummary -> POSIX
commitTime} -> POSIX
commitTime) (\s :: JobSummary
s@JobSummary' {} POSIX
a -> JobSummary
s {$sel:commitTime:JobSummary' :: POSIX
commitTime = POSIX
a} :: JobSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
jobSummary_startTime :: Lens.Lens' JobSummary Prelude.UTCTime
jobSummary_startTime :: Lens' JobSummary UTCTime
jobSummary_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {POSIX
startTime :: POSIX
$sel:startTime:JobSummary' :: JobSummary -> POSIX
startTime} -> POSIX
startTime) (\s :: JobSummary
s@JobSummary' {} POSIX
a -> JobSummary
s {$sel:startTime:JobSummary' :: POSIX
startTime = POSIX
a} :: JobSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
jobSummary_status :: Lens.Lens' JobSummary JobStatus
jobSummary_status :: Lens' JobSummary JobStatus
jobSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {JobStatus
status :: JobStatus
$sel:status:JobSummary' :: JobSummary -> JobStatus
status} -> JobStatus
status) (\s :: JobSummary
s@JobSummary' {} JobStatus
a -> JobSummary
s {$sel:status:JobSummary' :: JobStatus
status = JobStatus
a} :: JobSummary)
jobSummary_jobType :: Lens.Lens' JobSummary JobType
jobSummary_jobType :: Lens' JobSummary JobType
jobSummary_jobType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {JobType
jobType :: JobType
$sel:jobType:JobSummary' :: JobSummary -> JobType
jobType} -> JobType
jobType) (\s :: JobSummary
s@JobSummary' {} JobType
a -> JobSummary
s {$sel:jobType:JobSummary' :: JobType
jobType = JobType
a} :: JobSummary)
instance Data.FromJSON JobSummary where
parseJSON :: Value -> Parser JobSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"JobSummary"
( \Object
x ->
Maybe POSIX
-> Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> JobStatus
-> JobType
-> JobSummary
JobSummary'
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
"endTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"jobArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser 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 a
Data..: Key
"commitId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"commitMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"commitTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"startTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"jobType")
)
instance Prelude.Hashable JobSummary where
hashWithSalt :: Int -> JobSummary -> Int
hashWithSalt Int
_salt JobSummary' {Maybe POSIX
Text
POSIX
JobStatus
JobType
jobType :: JobType
status :: JobStatus
startTime :: POSIX
commitTime :: POSIX
commitMessage :: Text
commitId :: Text
jobId :: Text
jobArn :: Text
endTime :: Maybe POSIX
$sel:jobType:JobSummary' :: JobSummary -> JobType
$sel:status:JobSummary' :: JobSummary -> JobStatus
$sel:startTime:JobSummary' :: JobSummary -> POSIX
$sel:commitTime:JobSummary' :: JobSummary -> POSIX
$sel:commitMessage:JobSummary' :: JobSummary -> Text
$sel:commitId:JobSummary' :: JobSummary -> Text
$sel:jobId:JobSummary' :: JobSummary -> Text
$sel:jobArn:JobSummary' :: JobSummary -> Text
$sel:endTime:JobSummary' :: JobSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
endTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
commitId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
commitMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
commitTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
startTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobType
jobType
instance Prelude.NFData JobSummary where
rnf :: JobSummary -> ()
rnf JobSummary' {Maybe POSIX
Text
POSIX
JobStatus
JobType
jobType :: JobType
status :: JobStatus
startTime :: POSIX
commitTime :: POSIX
commitMessage :: Text
commitId :: Text
jobId :: Text
jobArn :: Text
endTime :: Maybe POSIX
$sel:jobType:JobSummary' :: JobSummary -> JobType
$sel:status:JobSummary' :: JobSummary -> JobStatus
$sel:startTime:JobSummary' :: JobSummary -> POSIX
$sel:commitTime:JobSummary' :: JobSummary -> POSIX
$sel:commitMessage:JobSummary' :: JobSummary -> Text
$sel:commitId:JobSummary' :: JobSummary -> Text
$sel:jobId:JobSummary' :: JobSummary -> Text
$sel:jobArn:JobSummary' :: JobSummary -> Text
$sel:endTime:JobSummary' :: JobSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
endTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jobArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
commitId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
commitMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
commitTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
startTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf JobStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf JobType
jobType