{-# 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.DataBrew.Types.JobRun
-- 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.DataBrew.Types.JobRun where

import qualified Amazonka.Core as Core
import Amazonka.DataBrew.Types.DataCatalogOutput
import Amazonka.DataBrew.Types.DatabaseOutput
import Amazonka.DataBrew.Types.JobRunState
import Amazonka.DataBrew.Types.JobSample
import Amazonka.DataBrew.Types.LogSubscription
import Amazonka.DataBrew.Types.Output
import Amazonka.DataBrew.Types.RecipeReference
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents one run of a DataBrew job.
--
-- /See:/ 'newJobRun' smart constructor.
data JobRun = JobRun'
  { -- | The date and time when the job completed processing.
    JobRun -> Maybe POSIX
completedOn :: Prelude.Maybe Core.POSIX,
    -- | The current state of the job run entity itself.
    JobRun -> Maybe JobRunState
state :: Prelude.Maybe JobRunState,
    -- | One or more artifacts that represent the Glue Data Catalog output from
    -- running the job.
    JobRun -> Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs :: Prelude.Maybe (Prelude.NonEmpty DataCatalogOutput),
    -- | The name of the job being processed during this run.
    JobRun -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the job run began.
    JobRun -> Maybe POSIX
startedOn :: Prelude.Maybe Core.POSIX,
    -- | The set of steps processed by the job.
    JobRun -> Maybe RecipeReference
recipeReference :: Prelude.Maybe RecipeReference,
    -- | Represents a list of JDBC database output objects which defines the
    -- output destination for a DataBrew recipe job to write into.
    JobRun -> Maybe (NonEmpty DatabaseOutput)
databaseOutputs :: Prelude.Maybe (Prelude.NonEmpty DatabaseOutput),
    -- | The name of an Amazon CloudWatch log group, where the job writes
    -- diagnostic messages when it runs.
    JobRun -> Maybe Text
logGroupName :: Prelude.Maybe Prelude.Text,
    -- | One or more output artifacts from a job run.
    JobRun -> Maybe (NonEmpty Output)
outputs :: Prelude.Maybe (Prelude.NonEmpty Output),
    -- | The unique identifier of the job run.
    JobRun -> Maybe Text
runId :: Prelude.Maybe Prelude.Text,
    -- | The amount of time, in seconds, during which a job run consumed
    -- resources.
    JobRun -> Maybe Int
executionTime :: Prelude.Maybe Prelude.Int,
    -- | The current status of Amazon CloudWatch logging for the job run.
    JobRun -> Maybe LogSubscription
logSubscription :: Prelude.Maybe LogSubscription,
    -- | The Amazon Resource Name (ARN) of the user who initiated the job run.
    JobRun -> Maybe Text
startedBy :: Prelude.Maybe Prelude.Text,
    -- | The name of the dataset for the job to process.
    JobRun -> Maybe Text
datasetName :: Prelude.Maybe Prelude.Text,
    -- | The number of times that DataBrew has attempted to run the job.
    JobRun -> Maybe Int
attempt :: Prelude.Maybe Prelude.Int,
    -- | A message indicating an error (if any) that was encountered when the job
    -- ran.
    JobRun -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | A sample configuration for profile jobs only, which determines the
    -- number of rows on which the profile job is run. If a @JobSample@ value
    -- isn\'t provided, the default is used. The default value is CUSTOM_ROWS
    -- for the mode parameter and 20,000 for the size parameter.
    JobRun -> Maybe JobSample
jobSample :: Prelude.Maybe JobSample
  }
  deriving (JobRun -> JobRun -> Bool
(JobRun -> JobRun -> Bool)
-> (JobRun -> JobRun -> Bool) -> Eq JobRun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobRun -> JobRun -> Bool
$c/= :: JobRun -> JobRun -> Bool
== :: JobRun -> JobRun -> Bool
$c== :: JobRun -> JobRun -> Bool
Prelude.Eq, ReadPrec [JobRun]
ReadPrec JobRun
Int -> ReadS JobRun
ReadS [JobRun]
(Int -> ReadS JobRun)
-> ReadS [JobRun]
-> ReadPrec JobRun
-> ReadPrec [JobRun]
-> Read JobRun
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobRun]
$creadListPrec :: ReadPrec [JobRun]
readPrec :: ReadPrec JobRun
$creadPrec :: ReadPrec JobRun
readList :: ReadS [JobRun]
$creadList :: ReadS [JobRun]
readsPrec :: Int -> ReadS JobRun
$creadsPrec :: Int -> ReadS JobRun
Prelude.Read, Int -> JobRun -> ShowS
[JobRun] -> ShowS
JobRun -> String
(Int -> JobRun -> ShowS)
-> (JobRun -> String) -> ([JobRun] -> ShowS) -> Show JobRun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobRun] -> ShowS
$cshowList :: [JobRun] -> ShowS
show :: JobRun -> String
$cshow :: JobRun -> String
showsPrec :: Int -> JobRun -> ShowS
$cshowsPrec :: Int -> JobRun -> ShowS
Prelude.Show, (forall x. JobRun -> Rep JobRun x)
-> (forall x. Rep JobRun x -> JobRun) -> Generic JobRun
forall x. Rep JobRun x -> JobRun
forall x. JobRun -> Rep JobRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobRun x -> JobRun
$cfrom :: forall x. JobRun -> Rep JobRun x
Prelude.Generic)

-- |
-- Create a value of 'JobRun' 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:
--
-- 'completedOn', 'jobRun_completedOn' - The date and time when the job completed processing.
--
-- 'state', 'jobRun_state' - The current state of the job run entity itself.
--
-- 'dataCatalogOutputs', 'jobRun_dataCatalogOutputs' - One or more artifacts that represent the Glue Data Catalog output from
-- running the job.
--
-- 'jobName', 'jobRun_jobName' - The name of the job being processed during this run.
--
-- 'startedOn', 'jobRun_startedOn' - The date and time when the job run began.
--
-- 'recipeReference', 'jobRun_recipeReference' - The set of steps processed by the job.
--
-- 'databaseOutputs', 'jobRun_databaseOutputs' - Represents a list of JDBC database output objects which defines the
-- output destination for a DataBrew recipe job to write into.
--
-- 'logGroupName', 'jobRun_logGroupName' - The name of an Amazon CloudWatch log group, where the job writes
-- diagnostic messages when it runs.
--
-- 'outputs', 'jobRun_outputs' - One or more output artifacts from a job run.
--
-- 'runId', 'jobRun_runId' - The unique identifier of the job run.
--
-- 'executionTime', 'jobRun_executionTime' - The amount of time, in seconds, during which a job run consumed
-- resources.
--
-- 'logSubscription', 'jobRun_logSubscription' - The current status of Amazon CloudWatch logging for the job run.
--
-- 'startedBy', 'jobRun_startedBy' - The Amazon Resource Name (ARN) of the user who initiated the job run.
--
-- 'datasetName', 'jobRun_datasetName' - The name of the dataset for the job to process.
--
-- 'attempt', 'jobRun_attempt' - The number of times that DataBrew has attempted to run the job.
--
-- 'errorMessage', 'jobRun_errorMessage' - A message indicating an error (if any) that was encountered when the job
-- ran.
--
-- 'jobSample', 'jobRun_jobSample' - A sample configuration for profile jobs only, which determines the
-- number of rows on which the profile job is run. If a @JobSample@ value
-- isn\'t provided, the default is used. The default value is CUSTOM_ROWS
-- for the mode parameter and 20,000 for the size parameter.
newJobRun ::
  JobRun
newJobRun :: JobRun
newJobRun =
  JobRun' :: Maybe POSIX
-> Maybe JobRunState
-> Maybe (NonEmpty DataCatalogOutput)
-> Maybe Text
-> Maybe POSIX
-> Maybe RecipeReference
-> Maybe (NonEmpty DatabaseOutput)
-> Maybe Text
-> Maybe (NonEmpty Output)
-> Maybe Text
-> Maybe Int
-> Maybe LogSubscription
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe JobSample
-> JobRun
JobRun'
    { $sel:completedOn:JobRun' :: Maybe POSIX
completedOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:state:JobRun' :: Maybe JobRunState
state = Maybe JobRunState
forall a. Maybe a
Prelude.Nothing,
      $sel:dataCatalogOutputs:JobRun' :: Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs = Maybe (NonEmpty DataCatalogOutput)
forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:JobRun' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startedOn:JobRun' :: Maybe POSIX
startedOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:recipeReference:JobRun' :: Maybe RecipeReference
recipeReference = Maybe RecipeReference
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseOutputs:JobRun' :: Maybe (NonEmpty DatabaseOutput)
databaseOutputs = Maybe (NonEmpty DatabaseOutput)
forall a. Maybe a
Prelude.Nothing,
      $sel:logGroupName:JobRun' :: Maybe Text
logGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputs:JobRun' :: Maybe (NonEmpty Output)
outputs = Maybe (NonEmpty Output)
forall a. Maybe a
Prelude.Nothing,
      $sel:runId:JobRun' :: Maybe Text
runId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:executionTime:JobRun' :: Maybe Int
executionTime = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:logSubscription:JobRun' :: Maybe LogSubscription
logSubscription = Maybe LogSubscription
forall a. Maybe a
Prelude.Nothing,
      $sel:startedBy:JobRun' :: Maybe Text
startedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetName:JobRun' :: Maybe Text
datasetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:attempt:JobRun' :: Maybe Int
attempt = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:JobRun' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobSample:JobRun' :: Maybe JobSample
jobSample = Maybe JobSample
forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time when the job completed processing.
jobRun_completedOn :: Lens.Lens' JobRun (Prelude.Maybe Prelude.UTCTime)
jobRun_completedOn :: (Maybe UTCTime -> f (Maybe UTCTime)) -> JobRun -> f JobRun
jobRun_completedOn = (JobRun -> Maybe POSIX)
-> (JobRun -> Maybe POSIX -> JobRun)
-> Lens JobRun JobRun (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe POSIX
completedOn :: Maybe POSIX
$sel:completedOn:JobRun' :: JobRun -> Maybe POSIX
completedOn} -> Maybe POSIX
completedOn) (\s :: JobRun
s@JobRun' {} Maybe POSIX
a -> JobRun
s {$sel:completedOn:JobRun' :: Maybe POSIX
completedOn = Maybe POSIX
a} :: JobRun) ((Maybe POSIX -> f (Maybe POSIX)) -> JobRun -> f JobRun)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> JobRun
-> f JobRun
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The current state of the job run entity itself.
jobRun_state :: Lens.Lens' JobRun (Prelude.Maybe JobRunState)
jobRun_state :: (Maybe JobRunState -> f (Maybe JobRunState)) -> JobRun -> f JobRun
jobRun_state = (JobRun -> Maybe JobRunState)
-> (JobRun -> Maybe JobRunState -> JobRun)
-> Lens JobRun JobRun (Maybe JobRunState) (Maybe JobRunState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe JobRunState
state :: Maybe JobRunState
$sel:state:JobRun' :: JobRun -> Maybe JobRunState
state} -> Maybe JobRunState
state) (\s :: JobRun
s@JobRun' {} Maybe JobRunState
a -> JobRun
s {$sel:state:JobRun' :: Maybe JobRunState
state = Maybe JobRunState
a} :: JobRun)

-- | One or more artifacts that represent the Glue Data Catalog output from
-- running the job.
jobRun_dataCatalogOutputs :: Lens.Lens' JobRun (Prelude.Maybe (Prelude.NonEmpty DataCatalogOutput))
jobRun_dataCatalogOutputs :: (Maybe (NonEmpty DataCatalogOutput)
 -> f (Maybe (NonEmpty DataCatalogOutput)))
-> JobRun -> f JobRun
jobRun_dataCatalogOutputs = (JobRun -> Maybe (NonEmpty DataCatalogOutput))
-> (JobRun -> Maybe (NonEmpty DataCatalogOutput) -> JobRun)
-> Lens
     JobRun
     JobRun
     (Maybe (NonEmpty DataCatalogOutput))
     (Maybe (NonEmpty DataCatalogOutput))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs :: Maybe (NonEmpty DataCatalogOutput)
$sel:dataCatalogOutputs:JobRun' :: JobRun -> Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs} -> Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs) (\s :: JobRun
s@JobRun' {} Maybe (NonEmpty DataCatalogOutput)
a -> JobRun
s {$sel:dataCatalogOutputs:JobRun' :: Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs = Maybe (NonEmpty DataCatalogOutput)
a} :: JobRun) ((Maybe (NonEmpty DataCatalogOutput)
  -> f (Maybe (NonEmpty DataCatalogOutput)))
 -> JobRun -> f JobRun)
-> ((Maybe (NonEmpty DataCatalogOutput)
     -> f (Maybe (NonEmpty DataCatalogOutput)))
    -> Maybe (NonEmpty DataCatalogOutput)
    -> f (Maybe (NonEmpty DataCatalogOutput)))
-> (Maybe (NonEmpty DataCatalogOutput)
    -> f (Maybe (NonEmpty DataCatalogOutput)))
-> JobRun
-> f JobRun
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
-> Iso
     (Maybe (NonEmpty DataCatalogOutput))
     (Maybe (NonEmpty DataCatalogOutput))
     (Maybe (NonEmpty DataCatalogOutput))
     (Maybe (NonEmpty DataCatalogOutput))
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
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the job being processed during this run.
jobRun_jobName :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_jobName :: (Maybe Text -> f (Maybe Text)) -> JobRun -> f JobRun
jobRun_jobName = (JobRun -> Maybe Text)
-> (JobRun -> Maybe Text -> JobRun)
-> Lens JobRun JobRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
jobName :: Maybe Text
$sel:jobName:JobRun' :: JobRun -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:jobName:JobRun' :: Maybe Text
jobName = Maybe Text
a} :: JobRun)

-- | The date and time when the job run began.
jobRun_startedOn :: Lens.Lens' JobRun (Prelude.Maybe Prelude.UTCTime)
jobRun_startedOn :: (Maybe UTCTime -> f (Maybe UTCTime)) -> JobRun -> f JobRun
jobRun_startedOn = (JobRun -> Maybe POSIX)
-> (JobRun -> Maybe POSIX -> JobRun)
-> Lens JobRun JobRun (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe POSIX
startedOn :: Maybe POSIX
$sel:startedOn:JobRun' :: JobRun -> Maybe POSIX
startedOn} -> Maybe POSIX
startedOn) (\s :: JobRun
s@JobRun' {} Maybe POSIX
a -> JobRun
s {$sel:startedOn:JobRun' :: Maybe POSIX
startedOn = Maybe POSIX
a} :: JobRun) ((Maybe POSIX -> f (Maybe POSIX)) -> JobRun -> f JobRun)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> JobRun
-> f JobRun
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The set of steps processed by the job.
jobRun_recipeReference :: Lens.Lens' JobRun (Prelude.Maybe RecipeReference)
jobRun_recipeReference :: (Maybe RecipeReference -> f (Maybe RecipeReference))
-> JobRun -> f JobRun
jobRun_recipeReference = (JobRun -> Maybe RecipeReference)
-> (JobRun -> Maybe RecipeReference -> JobRun)
-> Lens
     JobRun JobRun (Maybe RecipeReference) (Maybe RecipeReference)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe RecipeReference
recipeReference :: Maybe RecipeReference
$sel:recipeReference:JobRun' :: JobRun -> Maybe RecipeReference
recipeReference} -> Maybe RecipeReference
recipeReference) (\s :: JobRun
s@JobRun' {} Maybe RecipeReference
a -> JobRun
s {$sel:recipeReference:JobRun' :: Maybe RecipeReference
recipeReference = Maybe RecipeReference
a} :: JobRun)

-- | Represents a list of JDBC database output objects which defines the
-- output destination for a DataBrew recipe job to write into.
jobRun_databaseOutputs :: Lens.Lens' JobRun (Prelude.Maybe (Prelude.NonEmpty DatabaseOutput))
jobRun_databaseOutputs :: (Maybe (NonEmpty DatabaseOutput)
 -> f (Maybe (NonEmpty DatabaseOutput)))
-> JobRun -> f JobRun
jobRun_databaseOutputs = (JobRun -> Maybe (NonEmpty DatabaseOutput))
-> (JobRun -> Maybe (NonEmpty DatabaseOutput) -> JobRun)
-> Lens
     JobRun
     JobRun
     (Maybe (NonEmpty DatabaseOutput))
     (Maybe (NonEmpty DatabaseOutput))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe (NonEmpty DatabaseOutput)
databaseOutputs :: Maybe (NonEmpty DatabaseOutput)
$sel:databaseOutputs:JobRun' :: JobRun -> Maybe (NonEmpty DatabaseOutput)
databaseOutputs} -> Maybe (NonEmpty DatabaseOutput)
databaseOutputs) (\s :: JobRun
s@JobRun' {} Maybe (NonEmpty DatabaseOutput)
a -> JobRun
s {$sel:databaseOutputs:JobRun' :: Maybe (NonEmpty DatabaseOutput)
databaseOutputs = Maybe (NonEmpty DatabaseOutput)
a} :: JobRun) ((Maybe (NonEmpty DatabaseOutput)
  -> f (Maybe (NonEmpty DatabaseOutput)))
 -> JobRun -> f JobRun)
-> ((Maybe (NonEmpty DatabaseOutput)
     -> f (Maybe (NonEmpty DatabaseOutput)))
    -> Maybe (NonEmpty DatabaseOutput)
    -> f (Maybe (NonEmpty DatabaseOutput)))
-> (Maybe (NonEmpty DatabaseOutput)
    -> f (Maybe (NonEmpty DatabaseOutput)))
-> JobRun
-> f JobRun
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty DatabaseOutput)
  (NonEmpty DatabaseOutput)
  (NonEmpty DatabaseOutput)
  (NonEmpty DatabaseOutput)
-> Iso
     (Maybe (NonEmpty DatabaseOutput))
     (Maybe (NonEmpty DatabaseOutput))
     (Maybe (NonEmpty DatabaseOutput))
     (Maybe (NonEmpty DatabaseOutput))
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
  (NonEmpty DatabaseOutput)
  (NonEmpty DatabaseOutput)
  (NonEmpty DatabaseOutput)
  (NonEmpty DatabaseOutput)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of an Amazon CloudWatch log group, where the job writes
-- diagnostic messages when it runs.
jobRun_logGroupName :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_logGroupName :: (Maybe Text -> f (Maybe Text)) -> JobRun -> f JobRun
jobRun_logGroupName = (JobRun -> Maybe Text)
-> (JobRun -> Maybe Text -> JobRun)
-> Lens JobRun JobRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
logGroupName :: Maybe Text
$sel:logGroupName:JobRun' :: JobRun -> Maybe Text
logGroupName} -> Maybe Text
logGroupName) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:logGroupName:JobRun' :: Maybe Text
logGroupName = Maybe Text
a} :: JobRun)

-- | One or more output artifacts from a job run.
jobRun_outputs :: Lens.Lens' JobRun (Prelude.Maybe (Prelude.NonEmpty Output))
jobRun_outputs :: (Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
-> JobRun -> f JobRun
jobRun_outputs = (JobRun -> Maybe (NonEmpty Output))
-> (JobRun -> Maybe (NonEmpty Output) -> JobRun)
-> Lens
     JobRun JobRun (Maybe (NonEmpty Output)) (Maybe (NonEmpty Output))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe (NonEmpty Output)
outputs :: Maybe (NonEmpty Output)
$sel:outputs:JobRun' :: JobRun -> Maybe (NonEmpty Output)
outputs} -> Maybe (NonEmpty Output)
outputs) (\s :: JobRun
s@JobRun' {} Maybe (NonEmpty Output)
a -> JobRun
s {$sel:outputs:JobRun' :: Maybe (NonEmpty Output)
outputs = Maybe (NonEmpty Output)
a} :: JobRun) ((Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
 -> JobRun -> f JobRun)
-> ((Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
    -> Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
-> (Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
-> JobRun
-> f JobRun
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Output)
  (NonEmpty Output)
  (NonEmpty Output)
  (NonEmpty Output)
-> Iso
     (Maybe (NonEmpty Output))
     (Maybe (NonEmpty Output))
     (Maybe (NonEmpty Output))
     (Maybe (NonEmpty Output))
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
  (NonEmpty Output)
  (NonEmpty Output)
  (NonEmpty Output)
  (NonEmpty Output)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique identifier of the job run.
jobRun_runId :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_runId :: (Maybe Text -> f (Maybe Text)) -> JobRun -> f JobRun
jobRun_runId = (JobRun -> Maybe Text)
-> (JobRun -> Maybe Text -> JobRun)
-> Lens JobRun JobRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
runId :: Maybe Text
$sel:runId:JobRun' :: JobRun -> Maybe Text
runId} -> Maybe Text
runId) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:runId:JobRun' :: Maybe Text
runId = Maybe Text
a} :: JobRun)

-- | The amount of time, in seconds, during which a job run consumed
-- resources.
jobRun_executionTime :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Int)
jobRun_executionTime :: (Maybe Int -> f (Maybe Int)) -> JobRun -> f JobRun
jobRun_executionTime = (JobRun -> Maybe Int)
-> (JobRun -> Maybe Int -> JobRun)
-> Lens JobRun JobRun (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Int
executionTime :: Maybe Int
$sel:executionTime:JobRun' :: JobRun -> Maybe Int
executionTime} -> Maybe Int
executionTime) (\s :: JobRun
s@JobRun' {} Maybe Int
a -> JobRun
s {$sel:executionTime:JobRun' :: Maybe Int
executionTime = Maybe Int
a} :: JobRun)

-- | The current status of Amazon CloudWatch logging for the job run.
jobRun_logSubscription :: Lens.Lens' JobRun (Prelude.Maybe LogSubscription)
jobRun_logSubscription :: (Maybe LogSubscription -> f (Maybe LogSubscription))
-> JobRun -> f JobRun
jobRun_logSubscription = (JobRun -> Maybe LogSubscription)
-> (JobRun -> Maybe LogSubscription -> JobRun)
-> Lens
     JobRun JobRun (Maybe LogSubscription) (Maybe LogSubscription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe LogSubscription
logSubscription :: Maybe LogSubscription
$sel:logSubscription:JobRun' :: JobRun -> Maybe LogSubscription
logSubscription} -> Maybe LogSubscription
logSubscription) (\s :: JobRun
s@JobRun' {} Maybe LogSubscription
a -> JobRun
s {$sel:logSubscription:JobRun' :: Maybe LogSubscription
logSubscription = Maybe LogSubscription
a} :: JobRun)

-- | The Amazon Resource Name (ARN) of the user who initiated the job run.
jobRun_startedBy :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_startedBy :: (Maybe Text -> f (Maybe Text)) -> JobRun -> f JobRun
jobRun_startedBy = (JobRun -> Maybe Text)
-> (JobRun -> Maybe Text -> JobRun)
-> Lens JobRun JobRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
startedBy :: Maybe Text
$sel:startedBy:JobRun' :: JobRun -> Maybe Text
startedBy} -> Maybe Text
startedBy) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:startedBy:JobRun' :: Maybe Text
startedBy = Maybe Text
a} :: JobRun)

-- | The name of the dataset for the job to process.
jobRun_datasetName :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_datasetName :: (Maybe Text -> f (Maybe Text)) -> JobRun -> f JobRun
jobRun_datasetName = (JobRun -> Maybe Text)
-> (JobRun -> Maybe Text -> JobRun)
-> Lens JobRun JobRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
datasetName :: Maybe Text
$sel:datasetName:JobRun' :: JobRun -> Maybe Text
datasetName} -> Maybe Text
datasetName) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:datasetName:JobRun' :: Maybe Text
datasetName = Maybe Text
a} :: JobRun)

-- | The number of times that DataBrew has attempted to run the job.
jobRun_attempt :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Int)
jobRun_attempt :: (Maybe Int -> f (Maybe Int)) -> JobRun -> f JobRun
jobRun_attempt = (JobRun -> Maybe Int)
-> (JobRun -> Maybe Int -> JobRun)
-> Lens JobRun JobRun (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Int
attempt :: Maybe Int
$sel:attempt:JobRun' :: JobRun -> Maybe Int
attempt} -> Maybe Int
attempt) (\s :: JobRun
s@JobRun' {} Maybe Int
a -> JobRun
s {$sel:attempt:JobRun' :: Maybe Int
attempt = Maybe Int
a} :: JobRun)

-- | A message indicating an error (if any) that was encountered when the job
-- ran.
jobRun_errorMessage :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_errorMessage :: (Maybe Text -> f (Maybe Text)) -> JobRun -> f JobRun
jobRun_errorMessage = (JobRun -> Maybe Text)
-> (JobRun -> Maybe Text -> JobRun)
-> Lens JobRun JobRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:JobRun' :: JobRun -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:errorMessage:JobRun' :: Maybe Text
errorMessage = Maybe Text
a} :: JobRun)

-- | A sample configuration for profile jobs only, which determines the
-- number of rows on which the profile job is run. If a @JobSample@ value
-- isn\'t provided, the default is used. The default value is CUSTOM_ROWS
-- for the mode parameter and 20,000 for the size parameter.
jobRun_jobSample :: Lens.Lens' JobRun (Prelude.Maybe JobSample)
jobRun_jobSample :: (Maybe JobSample -> f (Maybe JobSample)) -> JobRun -> f JobRun
jobRun_jobSample = (JobRun -> Maybe JobSample)
-> (JobRun -> Maybe JobSample -> JobRun)
-> Lens JobRun JobRun (Maybe JobSample) (Maybe JobSample)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe JobSample
jobSample :: Maybe JobSample
$sel:jobSample:JobRun' :: JobRun -> Maybe JobSample
jobSample} -> Maybe JobSample
jobSample) (\s :: JobRun
s@JobRun' {} Maybe JobSample
a -> JobRun
s {$sel:jobSample:JobRun' :: Maybe JobSample
jobSample = Maybe JobSample
a} :: JobRun)

instance Core.FromJSON JobRun where
  parseJSON :: Value -> Parser JobRun
parseJSON =
    String -> (Object -> Parser JobRun) -> Value -> Parser JobRun
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"JobRun"
      ( \Object
x ->
          Maybe POSIX
-> Maybe JobRunState
-> Maybe (NonEmpty DataCatalogOutput)
-> Maybe Text
-> Maybe POSIX
-> Maybe RecipeReference
-> Maybe (NonEmpty DatabaseOutput)
-> Maybe Text
-> Maybe (NonEmpty Output)
-> Maybe Text
-> Maybe Int
-> Maybe LogSubscription
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe JobSample
-> JobRun
JobRun'
            (Maybe POSIX
 -> Maybe JobRunState
 -> Maybe (NonEmpty DataCatalogOutput)
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe RecipeReference
 -> Maybe (NonEmpty DatabaseOutput)
 -> Maybe Text
 -> Maybe (NonEmpty Output)
 -> Maybe Text
 -> Maybe Int
 -> Maybe LogSubscription
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe JobSample
 -> JobRun)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe JobRunState
      -> Maybe (NonEmpty DataCatalogOutput)
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe RecipeReference
      -> Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompletedOn")
            Parser
  (Maybe JobRunState
   -> Maybe (NonEmpty DataCatalogOutput)
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe RecipeReference
   -> Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe JobRunState)
-> Parser
     (Maybe (NonEmpty DataCatalogOutput)
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe RecipeReference
      -> Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobRunState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
            Parser
  (Maybe (NonEmpty DataCatalogOutput)
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe RecipeReference
   -> Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe (NonEmpty DataCatalogOutput))
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe RecipeReference
      -> Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty DataCatalogOutput))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataCatalogOutputs")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe RecipeReference
   -> Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe RecipeReference
      -> Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
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
"JobName")
            Parser
  (Maybe POSIX
   -> Maybe RecipeReference
   -> Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe RecipeReference
      -> Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartedOn")
            Parser
  (Maybe RecipeReference
   -> Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe RecipeReference)
-> Parser
     (Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RecipeReference)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecipeReference")
            Parser
  (Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe (NonEmpty DatabaseOutput))
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty DatabaseOutput))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DatabaseOutputs")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
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
"LogGroupName")
            Parser
  (Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe (NonEmpty Output))
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Output))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Outputs")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
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
"RunId")
            Parser
  (Maybe Int
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe Int)
-> Parser
     (Maybe LogSubscription
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
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
"ExecutionTime")
            Parser
  (Maybe LogSubscription
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe LogSubscription)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobSample
      -> JobRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LogSubscription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LogSubscription")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobSample
   -> JobRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int -> Maybe Text -> Maybe JobSample -> JobRun)
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
"StartedBy")
            Parser
  (Maybe Text
   -> Maybe Int -> Maybe Text -> Maybe JobSample -> JobRun)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe Text -> Maybe JobSample -> JobRun)
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
"DatasetName")
            Parser (Maybe Int -> Maybe Text -> Maybe JobSample -> JobRun)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> Maybe JobSample -> JobRun)
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
"Attempt")
            Parser (Maybe Text -> Maybe JobSample -> JobRun)
-> Parser (Maybe Text) -> Parser (Maybe JobSample -> JobRun)
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
"ErrorMessage")
            Parser (Maybe JobSample -> JobRun)
-> Parser (Maybe JobSample) -> Parser JobRun
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobSample)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobSample")
      )

instance Prelude.Hashable JobRun

instance Prelude.NFData JobRun