{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Batch.Types.JobSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Batch.Types.JobSummary where

import Amazonka.Batch.Types.ArrayPropertiesSummary
import Amazonka.Batch.Types.ContainerSummary
import Amazonka.Batch.Types.JobStatus
import Amazonka.Batch.Types.NodePropertiesSummary
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | An object representing summary details of a job.
--
-- /See:/ 'newJobSummary' smart constructor.
data JobSummary = JobSummary'
  { -- | The Unix timestamp for when the job was stopped (when the job
    -- transitioned from the @RUNNING@ state to a terminal state, such as
    -- @SUCCEEDED@ or @FAILED@).
    JobSummary -> Maybe Integer
stoppedAt :: Prelude.Maybe Prelude.Integer,
    -- | The current status for the job.
    JobSummary -> Maybe JobStatus
status :: Prelude.Maybe JobStatus,
    -- | The Amazon Resource Name (ARN) of the job.
    JobSummary -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
    -- | The Unix timestamp for when the job was created. For non-array jobs and
    -- parent array jobs, this is when the job entered the @SUBMITTED@ state
    -- (at the time SubmitJob was called). For array child jobs, this is when
    -- the child job was spawned by its parent and entered the @PENDING@ state.
    JobSummary -> Maybe Integer
createdAt :: Prelude.Maybe Prelude.Integer,
    -- | The Unix timestamp for when the job was started (when the job
    -- transitioned from the @STARTING@ state to the @RUNNING@ state).
    JobSummary -> Maybe Integer
startedAt :: Prelude.Maybe Prelude.Integer,
    -- | An object representing the details of the container that\'s associated
    -- with the job.
    JobSummary -> Maybe ContainerSummary
container :: Prelude.Maybe ContainerSummary,
    -- | The Amazon Resource Name (ARN) of the job definition.
    JobSummary -> Maybe Text
jobDefinition :: Prelude.Maybe Prelude.Text,
    -- | A short, human-readable string to provide additional details about the
    -- current status of the job.
    JobSummary -> Maybe Text
statusReason :: Prelude.Maybe Prelude.Text,
    -- | The array properties of the job, if it is an array job.
    JobSummary -> Maybe ArrayPropertiesSummary
arrayProperties :: Prelude.Maybe ArrayPropertiesSummary,
    -- | The node properties for a single node in a job summary list.
    --
    -- This isn\'t applicable to jobs that are running on Fargate resources.
    JobSummary -> Maybe NodePropertiesSummary
nodeProperties :: Prelude.Maybe NodePropertiesSummary,
    -- | The ID of the job.
    JobSummary -> Text
jobId :: Prelude.Text,
    -- | The name of the job.
    JobSummary -> Text
jobName :: Prelude.Text
  }
  deriving (JobSummary -> JobSummary -> Bool
(JobSummary -> JobSummary -> Bool)
-> (JobSummary -> JobSummary -> Bool) -> Eq JobSummary
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]
(Int -> ReadS JobSummary)
-> ReadS [JobSummary]
-> ReadPrec JobSummary
-> ReadPrec [JobSummary]
-> Read 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
(Int -> JobSummary -> ShowS)
-> (JobSummary -> String)
-> ([JobSummary] -> ShowS)
-> Show JobSummary
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. JobSummary -> Rep JobSummary x)
-> (forall x. Rep JobSummary x -> JobSummary) -> Generic JobSummary
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)

-- |
-- Create a value of 'JobSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'stoppedAt', 'jobSummary_stoppedAt' - The Unix timestamp for when the job was stopped (when the job
-- transitioned from the @RUNNING@ state to a terminal state, such as
-- @SUCCEEDED@ or @FAILED@).
--
-- 'status', 'jobSummary_status' - The current status for the job.
--
-- 'jobArn', 'jobSummary_jobArn' - The Amazon Resource Name (ARN) of the job.
--
-- 'createdAt', 'jobSummary_createdAt' - The Unix timestamp for when the job was created. For non-array jobs and
-- parent array jobs, this is when the job entered the @SUBMITTED@ state
-- (at the time SubmitJob was called). For array child jobs, this is when
-- the child job was spawned by its parent and entered the @PENDING@ state.
--
-- 'startedAt', 'jobSummary_startedAt' - The Unix timestamp for when the job was started (when the job
-- transitioned from the @STARTING@ state to the @RUNNING@ state).
--
-- 'container', 'jobSummary_container' - An object representing the details of the container that\'s associated
-- with the job.
--
-- 'jobDefinition', 'jobSummary_jobDefinition' - The Amazon Resource Name (ARN) of the job definition.
--
-- 'statusReason', 'jobSummary_statusReason' - A short, human-readable string to provide additional details about the
-- current status of the job.
--
-- 'arrayProperties', 'jobSummary_arrayProperties' - The array properties of the job, if it is an array job.
--
-- 'nodeProperties', 'jobSummary_nodeProperties' - The node properties for a single node in a job summary list.
--
-- This isn\'t applicable to jobs that are running on Fargate resources.
--
-- 'jobId', 'jobSummary_jobId' - The ID of the job.
--
-- 'jobName', 'jobSummary_jobName' - The name of the job.
newJobSummary ::
  -- | 'jobId'
  Prelude.Text ->
  -- | 'jobName'
  Prelude.Text ->
  JobSummary
newJobSummary :: Text -> Text -> JobSummary
newJobSummary Text
pJobId_ Text
pJobName_ =
  JobSummary' :: Maybe Integer
-> Maybe JobStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe ContainerSummary
-> Maybe Text
-> Maybe Text
-> Maybe ArrayPropertiesSummary
-> Maybe NodePropertiesSummary
-> Text
-> Text
-> JobSummary
JobSummary'
    { $sel:stoppedAt:JobSummary' :: Maybe Integer
stoppedAt = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:status:JobSummary' :: Maybe JobStatus
status = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:jobArn:JobSummary' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:JobSummary' :: Maybe Integer
createdAt = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:JobSummary' :: Maybe Integer
startedAt = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:container:JobSummary' :: Maybe ContainerSummary
container = Maybe ContainerSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:jobDefinition:JobSummary' :: Maybe Text
jobDefinition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusReason:JobSummary' :: Maybe Text
statusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arrayProperties:JobSummary' :: Maybe ArrayPropertiesSummary
arrayProperties = Maybe ArrayPropertiesSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeProperties:JobSummary' :: Maybe NodePropertiesSummary
nodeProperties = Maybe NodePropertiesSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:JobSummary' :: Text
jobId = Text
pJobId_,
      $sel:jobName:JobSummary' :: Text
jobName = Text
pJobName_
    }

-- | The Unix timestamp for when the job was stopped (when the job
-- transitioned from the @RUNNING@ state to a terminal state, such as
-- @SUCCEEDED@ or @FAILED@).
jobSummary_stoppedAt :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.Integer)
jobSummary_stoppedAt :: (Maybe Integer -> f (Maybe Integer)) -> JobSummary -> f JobSummary
jobSummary_stoppedAt = (JobSummary -> Maybe Integer)
-> (JobSummary -> Maybe Integer -> JobSummary)
-> Lens JobSummary JobSummary (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe Integer
stoppedAt :: Maybe Integer
$sel:stoppedAt:JobSummary' :: JobSummary -> Maybe Integer
stoppedAt} -> Maybe Integer
stoppedAt) (\s :: JobSummary
s@JobSummary' {} Maybe Integer
a -> JobSummary
s {$sel:stoppedAt:JobSummary' :: Maybe Integer
stoppedAt = Maybe Integer
a} :: JobSummary)

-- | The current status for the job.
jobSummary_status :: Lens.Lens' JobSummary (Prelude.Maybe JobStatus)
jobSummary_status :: (Maybe JobStatus -> f (Maybe JobStatus))
-> JobSummary -> f JobSummary
jobSummary_status = (JobSummary -> Maybe JobStatus)
-> (JobSummary -> Maybe JobStatus -> JobSummary)
-> Lens JobSummary JobSummary (Maybe JobStatus) (Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe JobStatus
status :: Maybe JobStatus
$sel:status:JobSummary' :: JobSummary -> Maybe JobStatus
status} -> Maybe JobStatus
status) (\s :: JobSummary
s@JobSummary' {} Maybe JobStatus
a -> JobSummary
s {$sel:status:JobSummary' :: Maybe JobStatus
status = Maybe JobStatus
a} :: JobSummary)

-- | The Amazon Resource Name (ARN) of the job.
jobSummary_jobArn :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.Text)
jobSummary_jobArn :: (Maybe Text -> f (Maybe Text)) -> JobSummary -> f JobSummary
jobSummary_jobArn = (JobSummary -> Maybe Text)
-> (JobSummary -> Maybe Text -> JobSummary)
-> Lens JobSummary JobSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:JobSummary' :: JobSummary -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: JobSummary
s@JobSummary' {} Maybe Text
a -> JobSummary
s {$sel:jobArn:JobSummary' :: Maybe Text
jobArn = Maybe Text
a} :: JobSummary)

-- | The Unix timestamp for when the job was created. For non-array jobs and
-- parent array jobs, this is when the job entered the @SUBMITTED@ state
-- (at the time SubmitJob was called). For array child jobs, this is when
-- the child job was spawned by its parent and entered the @PENDING@ state.
jobSummary_createdAt :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.Integer)
jobSummary_createdAt :: (Maybe Integer -> f (Maybe Integer)) -> JobSummary -> f JobSummary
jobSummary_createdAt = (JobSummary -> Maybe Integer)
-> (JobSummary -> Maybe Integer -> JobSummary)
-> Lens JobSummary JobSummary (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe Integer
createdAt :: Maybe Integer
$sel:createdAt:JobSummary' :: JobSummary -> Maybe Integer
createdAt} -> Maybe Integer
createdAt) (\s :: JobSummary
s@JobSummary' {} Maybe Integer
a -> JobSummary
s {$sel:createdAt:JobSummary' :: Maybe Integer
createdAt = Maybe Integer
a} :: JobSummary)

-- | The Unix timestamp for when the job was started (when the job
-- transitioned from the @STARTING@ state to the @RUNNING@ state).
jobSummary_startedAt :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.Integer)
jobSummary_startedAt :: (Maybe Integer -> f (Maybe Integer)) -> JobSummary -> f JobSummary
jobSummary_startedAt = (JobSummary -> Maybe Integer)
-> (JobSummary -> Maybe Integer -> JobSummary)
-> Lens JobSummary JobSummary (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe Integer
startedAt :: Maybe Integer
$sel:startedAt:JobSummary' :: JobSummary -> Maybe Integer
startedAt} -> Maybe Integer
startedAt) (\s :: JobSummary
s@JobSummary' {} Maybe Integer
a -> JobSummary
s {$sel:startedAt:JobSummary' :: Maybe Integer
startedAt = Maybe Integer
a} :: JobSummary)

-- | An object representing the details of the container that\'s associated
-- with the job.
jobSummary_container :: Lens.Lens' JobSummary (Prelude.Maybe ContainerSummary)
jobSummary_container :: (Maybe ContainerSummary -> f (Maybe ContainerSummary))
-> JobSummary -> f JobSummary
jobSummary_container = (JobSummary -> Maybe ContainerSummary)
-> (JobSummary -> Maybe ContainerSummary -> JobSummary)
-> Lens
     JobSummary
     JobSummary
     (Maybe ContainerSummary)
     (Maybe ContainerSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe ContainerSummary
container :: Maybe ContainerSummary
$sel:container:JobSummary' :: JobSummary -> Maybe ContainerSummary
container} -> Maybe ContainerSummary
container) (\s :: JobSummary
s@JobSummary' {} Maybe ContainerSummary
a -> JobSummary
s {$sel:container:JobSummary' :: Maybe ContainerSummary
container = Maybe ContainerSummary
a} :: JobSummary)

-- | The Amazon Resource Name (ARN) of the job definition.
jobSummary_jobDefinition :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.Text)
jobSummary_jobDefinition :: (Maybe Text -> f (Maybe Text)) -> JobSummary -> f JobSummary
jobSummary_jobDefinition = (JobSummary -> Maybe Text)
-> (JobSummary -> Maybe Text -> JobSummary)
-> Lens JobSummary JobSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe Text
jobDefinition :: Maybe Text
$sel:jobDefinition:JobSummary' :: JobSummary -> Maybe Text
jobDefinition} -> Maybe Text
jobDefinition) (\s :: JobSummary
s@JobSummary' {} Maybe Text
a -> JobSummary
s {$sel:jobDefinition:JobSummary' :: Maybe Text
jobDefinition = Maybe Text
a} :: JobSummary)

-- | A short, human-readable string to provide additional details about the
-- current status of the job.
jobSummary_statusReason :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.Text)
jobSummary_statusReason :: (Maybe Text -> f (Maybe Text)) -> JobSummary -> f JobSummary
jobSummary_statusReason = (JobSummary -> Maybe Text)
-> (JobSummary -> Maybe Text -> JobSummary)
-> Lens JobSummary JobSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe Text
statusReason :: Maybe Text
$sel:statusReason:JobSummary' :: JobSummary -> Maybe Text
statusReason} -> Maybe Text
statusReason) (\s :: JobSummary
s@JobSummary' {} Maybe Text
a -> JobSummary
s {$sel:statusReason:JobSummary' :: Maybe Text
statusReason = Maybe Text
a} :: JobSummary)

-- | The array properties of the job, if it is an array job.
jobSummary_arrayProperties :: Lens.Lens' JobSummary (Prelude.Maybe ArrayPropertiesSummary)
jobSummary_arrayProperties :: (Maybe ArrayPropertiesSummary -> f (Maybe ArrayPropertiesSummary))
-> JobSummary -> f JobSummary
jobSummary_arrayProperties = (JobSummary -> Maybe ArrayPropertiesSummary)
-> (JobSummary -> Maybe ArrayPropertiesSummary -> JobSummary)
-> Lens
     JobSummary
     JobSummary
     (Maybe ArrayPropertiesSummary)
     (Maybe ArrayPropertiesSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe ArrayPropertiesSummary
arrayProperties :: Maybe ArrayPropertiesSummary
$sel:arrayProperties:JobSummary' :: JobSummary -> Maybe ArrayPropertiesSummary
arrayProperties} -> Maybe ArrayPropertiesSummary
arrayProperties) (\s :: JobSummary
s@JobSummary' {} Maybe ArrayPropertiesSummary
a -> JobSummary
s {$sel:arrayProperties:JobSummary' :: Maybe ArrayPropertiesSummary
arrayProperties = Maybe ArrayPropertiesSummary
a} :: JobSummary)

-- | The node properties for a single node in a job summary list.
--
-- This isn\'t applicable to jobs that are running on Fargate resources.
jobSummary_nodeProperties :: Lens.Lens' JobSummary (Prelude.Maybe NodePropertiesSummary)
jobSummary_nodeProperties :: (Maybe NodePropertiesSummary -> f (Maybe NodePropertiesSummary))
-> JobSummary -> f JobSummary
jobSummary_nodeProperties = (JobSummary -> Maybe NodePropertiesSummary)
-> (JobSummary -> Maybe NodePropertiesSummary -> JobSummary)
-> Lens
     JobSummary
     JobSummary
     (Maybe NodePropertiesSummary)
     (Maybe NodePropertiesSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe NodePropertiesSummary
nodeProperties :: Maybe NodePropertiesSummary
$sel:nodeProperties:JobSummary' :: JobSummary -> Maybe NodePropertiesSummary
nodeProperties} -> Maybe NodePropertiesSummary
nodeProperties) (\s :: JobSummary
s@JobSummary' {} Maybe NodePropertiesSummary
a -> JobSummary
s {$sel:nodeProperties:JobSummary' :: Maybe NodePropertiesSummary
nodeProperties = Maybe NodePropertiesSummary
a} :: JobSummary)

-- | The ID of the job.
jobSummary_jobId :: Lens.Lens' JobSummary Prelude.Text
jobSummary_jobId :: (Text -> f Text) -> JobSummary -> f JobSummary
jobSummary_jobId = (JobSummary -> Text)
-> (JobSummary -> Text -> JobSummary)
-> Lens JobSummary JobSummary Text Text
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)

-- | The name of the job.
jobSummary_jobName :: Lens.Lens' JobSummary Prelude.Text
jobSummary_jobName :: (Text -> f Text) -> JobSummary -> f JobSummary
jobSummary_jobName = (JobSummary -> Text)
-> (JobSummary -> Text -> JobSummary)
-> Lens JobSummary JobSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Text
jobName :: Text
$sel:jobName:JobSummary' :: JobSummary -> Text
jobName} -> Text
jobName) (\s :: JobSummary
s@JobSummary' {} Text
a -> JobSummary
s {$sel:jobName:JobSummary' :: Text
jobName = Text
a} :: JobSummary)

instance Core.FromJSON JobSummary where
  parseJSON :: Value -> Parser JobSummary
parseJSON =
    String
-> (Object -> Parser JobSummary) -> Value -> Parser JobSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"JobSummary"
      ( \Object
x ->
          Maybe Integer
-> Maybe JobStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe ContainerSummary
-> Maybe Text
-> Maybe Text
-> Maybe ArrayPropertiesSummary
-> Maybe NodePropertiesSummary
-> Text
-> Text
-> JobSummary
JobSummary'
            (Maybe Integer
 -> Maybe JobStatus
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Integer
 -> Maybe ContainerSummary
 -> Maybe Text
 -> Maybe Text
 -> Maybe ArrayPropertiesSummary
 -> Maybe NodePropertiesSummary
 -> Text
 -> Text
 -> JobSummary)
-> Parser (Maybe Integer)
-> Parser
     (Maybe JobStatus
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe ContainerSummary
      -> Maybe Text
      -> Maybe Text
      -> Maybe ArrayPropertiesSummary
      -> Maybe NodePropertiesSummary
      -> Text
      -> Text
      -> JobSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"stoppedAt")
            Parser
  (Maybe JobStatus
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe ContainerSummary
   -> Maybe Text
   -> Maybe Text
   -> Maybe ArrayPropertiesSummary
   -> Maybe NodePropertiesSummary
   -> Text
   -> Text
   -> JobSummary)
-> Parser (Maybe JobStatus)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe ContainerSummary
      -> Maybe Text
      -> Maybe Text
      -> Maybe ArrayPropertiesSummary
      -> Maybe NodePropertiesSummary
      -> Text
      -> Text
      -> JobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe ContainerSummary
   -> Maybe Text
   -> Maybe Text
   -> Maybe ArrayPropertiesSummary
   -> Maybe NodePropertiesSummary
   -> Text
   -> Text
   -> JobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Integer
      -> Maybe ContainerSummary
      -> Maybe Text
      -> Maybe Text
      -> Maybe ArrayPropertiesSummary
      -> Maybe NodePropertiesSummary
      -> Text
      -> Text
      -> JobSummary)
forall (f :: * -> *) a b. Applicative f => 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
"jobArn")
            Parser
  (Maybe Integer
   -> Maybe Integer
   -> Maybe ContainerSummary
   -> Maybe Text
   -> Maybe Text
   -> Maybe ArrayPropertiesSummary
   -> Maybe NodePropertiesSummary
   -> Text
   -> Text
   -> JobSummary)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Integer
      -> Maybe ContainerSummary
      -> Maybe Text
      -> Maybe Text
      -> Maybe ArrayPropertiesSummary
      -> Maybe NodePropertiesSummary
      -> Text
      -> Text
      -> JobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
            Parser
  (Maybe Integer
   -> Maybe ContainerSummary
   -> Maybe Text
   -> Maybe Text
   -> Maybe ArrayPropertiesSummary
   -> Maybe NodePropertiesSummary
   -> Text
   -> Text
   -> JobSummary)
-> Parser (Maybe Integer)
-> Parser
     (Maybe ContainerSummary
      -> Maybe Text
      -> Maybe Text
      -> Maybe ArrayPropertiesSummary
      -> Maybe NodePropertiesSummary
      -> Text
      -> Text
      -> JobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"startedAt")
            Parser
  (Maybe ContainerSummary
   -> Maybe Text
   -> Maybe Text
   -> Maybe ArrayPropertiesSummary
   -> Maybe NodePropertiesSummary
   -> Text
   -> Text
   -> JobSummary)
-> Parser (Maybe ContainerSummary)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ArrayPropertiesSummary
      -> Maybe NodePropertiesSummary
      -> Text
      -> Text
      -> JobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContainerSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"container")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ArrayPropertiesSummary
   -> Maybe NodePropertiesSummary
   -> Text
   -> Text
   -> JobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ArrayPropertiesSummary
      -> Maybe NodePropertiesSummary
      -> Text
      -> Text
      -> JobSummary)
forall (f :: * -> *) a b. Applicative f => 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
"jobDefinition")
            Parser
  (Maybe Text
   -> Maybe ArrayPropertiesSummary
   -> Maybe NodePropertiesSummary
   -> Text
   -> Text
   -> JobSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe ArrayPropertiesSummary
      -> Maybe NodePropertiesSummary -> Text -> Text -> JobSummary)
forall (f :: * -> *) a b. Applicative f => 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
"statusReason")
            Parser
  (Maybe ArrayPropertiesSummary
   -> Maybe NodePropertiesSummary -> Text -> Text -> JobSummary)
-> Parser (Maybe ArrayPropertiesSummary)
-> Parser
     (Maybe NodePropertiesSummary -> Text -> Text -> JobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ArrayPropertiesSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arrayProperties")
            Parser (Maybe NodePropertiesSummary -> Text -> Text -> JobSummary)
-> Parser (Maybe NodePropertiesSummary)
-> Parser (Text -> Text -> JobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NodePropertiesSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nodeProperties")
            Parser (Text -> Text -> JobSummary)
-> Parser Text -> Parser (Text -> JobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"jobId")
            Parser (Text -> JobSummary) -> Parser Text -> Parser JobSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"jobName")
      )

instance Prelude.Hashable JobSummary

instance Prelude.NFData JobSummary