{-# 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.Glue.Types.JobRun
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Glue.Types.JobRun where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types.ExecutionClass
import Amazonka.Glue.Types.JobRunState
import Amazonka.Glue.Types.NotificationProperty
import Amazonka.Glue.Types.Predecessor
import Amazonka.Glue.Types.WorkerType
import qualified Amazonka.Prelude as Prelude

-- | Contains information about a job run.
--
-- /See:/ 'newJobRun' smart constructor.
data JobRun = JobRun'
  { -- | This field is deprecated. Use @MaxCapacity@ instead.
    --
    -- The number of Glue data processing units (DPUs) allocated to this
    -- JobRun. From 2 to 100 DPUs can be allocated; the default is 10. A DPU is
    -- a relative measure of processing power that consists of 4 vCPUs of
    -- compute capacity and 16 GB of memory. For more information, see the
    -- <https://aws.amazon.com/glue/pricing/ Glue pricing page>.
    JobRun -> Maybe Int
allocatedCapacity :: Prelude.Maybe Prelude.Int,
    -- | The job arguments associated with this run. For this job run, they
    -- replace the default arguments set in the job definition itself.
    --
    -- You can specify arguments here that your own job-execution script
    -- consumes, as well as arguments that Glue itself consumes.
    --
    -- For information about how to specify and consume your own job arguments,
    -- see the
    -- <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html Calling Glue APIs in Python>
    -- topic in the developer guide.
    --
    -- For information about the key-value pairs that Glue consumes to set up
    -- your job, see the
    -- <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html Special Parameters Used by Glue>
    -- topic in the developer guide.
    JobRun -> Maybe (HashMap Text Text)
arguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The number of the attempt to run this job.
    JobRun -> Maybe Int
attempt :: Prelude.Maybe Prelude.Int,
    -- | The date and time that this job run completed.
    JobRun -> Maybe POSIX
completedOn :: Prelude.Maybe Data.POSIX,
    -- | This field populates only for Auto Scaling job runs, and represents the
    -- total time each executor ran during the lifecycle of a job run in
    -- seconds, multiplied by a DPU factor (1 for @G.1X@, 2 for @G.2X@, or 0.25
    -- for @G.025X@ workers). This value may be different than the
    -- @executionEngineRuntime@ * @MaxCapacity@ as in the case of Auto Scaling
    -- jobs, as the number of executors running at a given time may be less
    -- than the @MaxCapacity@. Therefore, it is possible that the value of
    -- @DPUSeconds@ is less than @executionEngineRuntime@ * @MaxCapacity@.
    JobRun -> Maybe Double
dPUSeconds :: Prelude.Maybe Prelude.Double,
    -- | An error message associated with this job run.
    JobRun -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the job is run with a standard or flexible execution
    -- class. The standard execution-class is ideal for time-sensitive
    -- workloads that require fast job startup and dedicated resources.
    --
    -- The flexible execution class is appropriate for time-insensitive jobs
    -- whose start and completion times may vary.
    --
    -- Only jobs with Glue version 3.0 and above and command type @glueetl@
    -- will be allowed to set @ExecutionClass@ to @FLEX@. The flexible
    -- execution class is available for Spark jobs.
    JobRun -> Maybe ExecutionClass
executionClass :: Prelude.Maybe ExecutionClass,
    -- | The amount of time (in seconds) that the job run consumed resources.
    JobRun -> Maybe Int
executionTime :: Prelude.Maybe Prelude.Int,
    -- | Glue version determines the versions of Apache Spark and Python that
    -- Glue supports. The Python version indicates the version supported for
    -- jobs of type Spark.
    --
    -- For more information about the available Glue versions and corresponding
    -- Spark and Python versions, see
    -- <https://docs.aws.amazon.com/glue/latest/dg/add-job.html Glue version>
    -- in the developer guide.
    --
    -- Jobs that are created without specifying a Glue version default to Glue
    -- 0.9.
    JobRun -> Maybe Text
glueVersion :: Prelude.Maybe Prelude.Text,
    -- | The ID of this job run.
    JobRun -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The name of the job definition being used in this run.
    JobRun -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | The current state of the job run. For more information about the
    -- statuses of jobs that have terminated abnormally, see
    -- <https://docs.aws.amazon.com/glue/latest/dg/job-run-statuses.html Glue Job Run Statuses>.
    JobRun -> Maybe JobRunState
jobRunState :: Prelude.Maybe JobRunState,
    -- | The last time that this job run was modified.
    JobRun -> Maybe POSIX
lastModifiedOn :: Prelude.Maybe Data.POSIX,
    -- | The name of the log group for secure logging that can be server-side
    -- encrypted in Amazon CloudWatch using KMS. This name can be
    -- @\/aws-glue\/jobs\/@, in which case the default encryption is @NONE@. If
    -- you add a role name and @SecurityConfiguration@ name (in other words,
    -- @\/aws-glue\/jobs-yourRoleName-yourSecurityConfigurationName\/@), then
    -- that security configuration is used to encrypt the log group.
    JobRun -> Maybe Text
logGroupName :: Prelude.Maybe Prelude.Text,
    -- | The number of Glue data processing units (DPUs) that can be allocated
    -- when this job runs. A DPU is a relative measure of processing power that
    -- consists of 4 vCPUs of compute capacity and 16 GB of memory. For more
    -- information, see the
    -- <https://aws.amazon.com/glue/pricing/ Glue pricing page>.
    --
    -- Do not set @Max Capacity@ if using @WorkerType@ and @NumberOfWorkers@.
    --
    -- The value that can be allocated for @MaxCapacity@ depends on whether you
    -- are running a Python shell job or an Apache Spark ETL job:
    --
    -- -   When you specify a Python shell job
    --     (@JobCommand.Name@=\"pythonshell\"), you can allocate either 0.0625
    --     or 1 DPU. The default is 0.0625 DPU.
    --
    -- -   When you specify an Apache Spark ETL job
    --     (@JobCommand.Name@=\"glueetl\"), you can allocate a minimum of 2
    --     DPUs. The default is 10 DPUs. This job type cannot have a fractional
    --     DPU allocation.
    JobRun -> Maybe Double
maxCapacity :: Prelude.Maybe Prelude.Double,
    -- | Specifies configuration properties of a job run notification.
    JobRun -> Maybe NotificationProperty
notificationProperty :: Prelude.Maybe NotificationProperty,
    -- | The number of workers of a defined @workerType@ that are allocated when
    -- a job runs.
    JobRun -> Maybe Int
numberOfWorkers :: Prelude.Maybe Prelude.Int,
    -- | A list of predecessors to this job run.
    JobRun -> Maybe [Predecessor]
predecessorRuns :: Prelude.Maybe [Predecessor],
    -- | The ID of the previous run of this job. For example, the @JobRunId@
    -- specified in the @StartJobRun@ action.
    JobRun -> Maybe Text
previousRunId :: Prelude.Maybe Prelude.Text,
    -- | The name of the @SecurityConfiguration@ structure to be used with this
    -- job run.
    JobRun -> Maybe Text
securityConfiguration :: Prelude.Maybe Prelude.Text,
    -- | The date and time at which this job run was started.
    JobRun -> Maybe POSIX
startedOn :: Prelude.Maybe Data.POSIX,
    -- | The @JobRun@ timeout in minutes. This is the maximum time that a job run
    -- can consume resources before it is terminated and enters @TIMEOUT@
    -- status. This value overrides the timeout value set in the parent job.
    --
    -- Streaming jobs do not have a timeout. The default for non-streaming jobs
    -- is 2,880 minutes (48 hours).
    JobRun -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
    -- | The name of the trigger that started this job run.
    JobRun -> Maybe Text
triggerName :: Prelude.Maybe Prelude.Text,
    -- | The type of predefined worker that is allocated when a job runs. Accepts
    -- a value of Standard, G.1X, G.2X, or G.025X.
    --
    -- -   For the @Standard@ worker type, each worker provides 4 vCPU, 16 GB
    --     of memory and a 50GB disk, and 2 executors per worker.
    --
    -- -   For the @G.1X@ worker type, each worker provides 4 vCPU, 16 GB of
    --     memory and a 64GB disk, and 1 executor per worker.
    --
    -- -   For the @G.2X@ worker type, each worker provides 8 vCPU, 32 GB of
    --     memory and a 128GB disk, and 1 executor per worker.
    --
    -- -   For the @G.025X@ worker type, each worker maps to 0.25 DPU (2 vCPU,
    --     4 GB of memory, 64 GB disk), and provides 1 executor per worker. We
    --     recommend this worker type for low volume streaming jobs. This
    --     worker type is only available for Glue version 3.0 streaming jobs.
    JobRun -> Maybe WorkerType
workerType :: Prelude.Maybe WorkerType
  }
  deriving (JobRun -> JobRun -> Bool
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]
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
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. 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:
--
-- 'allocatedCapacity', 'jobRun_allocatedCapacity' - This field is deprecated. Use @MaxCapacity@ instead.
--
-- The number of Glue data processing units (DPUs) allocated to this
-- JobRun. From 2 to 100 DPUs can be allocated; the default is 10. A DPU is
-- a relative measure of processing power that consists of 4 vCPUs of
-- compute capacity and 16 GB of memory. For more information, see the
-- <https://aws.amazon.com/glue/pricing/ Glue pricing page>.
--
-- 'arguments', 'jobRun_arguments' - The job arguments associated with this run. For this job run, they
-- replace the default arguments set in the job definition itself.
--
-- You can specify arguments here that your own job-execution script
-- consumes, as well as arguments that Glue itself consumes.
--
-- For information about how to specify and consume your own job arguments,
-- see the
-- <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html Calling Glue APIs in Python>
-- topic in the developer guide.
--
-- For information about the key-value pairs that Glue consumes to set up
-- your job, see the
-- <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html Special Parameters Used by Glue>
-- topic in the developer guide.
--
-- 'attempt', 'jobRun_attempt' - The number of the attempt to run this job.
--
-- 'completedOn', 'jobRun_completedOn' - The date and time that this job run completed.
--
-- 'dPUSeconds', 'jobRun_dPUSeconds' - This field populates only for Auto Scaling job runs, and represents the
-- total time each executor ran during the lifecycle of a job run in
-- seconds, multiplied by a DPU factor (1 for @G.1X@, 2 for @G.2X@, or 0.25
-- for @G.025X@ workers). This value may be different than the
-- @executionEngineRuntime@ * @MaxCapacity@ as in the case of Auto Scaling
-- jobs, as the number of executors running at a given time may be less
-- than the @MaxCapacity@. Therefore, it is possible that the value of
-- @DPUSeconds@ is less than @executionEngineRuntime@ * @MaxCapacity@.
--
-- 'errorMessage', 'jobRun_errorMessage' - An error message associated with this job run.
--
-- 'executionClass', 'jobRun_executionClass' - Indicates whether the job is run with a standard or flexible execution
-- class. The standard execution-class is ideal for time-sensitive
-- workloads that require fast job startup and dedicated resources.
--
-- The flexible execution class is appropriate for time-insensitive jobs
-- whose start and completion times may vary.
--
-- Only jobs with Glue version 3.0 and above and command type @glueetl@
-- will be allowed to set @ExecutionClass@ to @FLEX@. The flexible
-- execution class is available for Spark jobs.
--
-- 'executionTime', 'jobRun_executionTime' - The amount of time (in seconds) that the job run consumed resources.
--
-- 'glueVersion', 'jobRun_glueVersion' - Glue version determines the versions of Apache Spark and Python that
-- Glue supports. The Python version indicates the version supported for
-- jobs of type Spark.
--
-- For more information about the available Glue versions and corresponding
-- Spark and Python versions, see
-- <https://docs.aws.amazon.com/glue/latest/dg/add-job.html Glue version>
-- in the developer guide.
--
-- Jobs that are created without specifying a Glue version default to Glue
-- 0.9.
--
-- 'id', 'jobRun_id' - The ID of this job run.
--
-- 'jobName', 'jobRun_jobName' - The name of the job definition being used in this run.
--
-- 'jobRunState', 'jobRun_jobRunState' - The current state of the job run. For more information about the
-- statuses of jobs that have terminated abnormally, see
-- <https://docs.aws.amazon.com/glue/latest/dg/job-run-statuses.html Glue Job Run Statuses>.
--
-- 'lastModifiedOn', 'jobRun_lastModifiedOn' - The last time that this job run was modified.
--
-- 'logGroupName', 'jobRun_logGroupName' - The name of the log group for secure logging that can be server-side
-- encrypted in Amazon CloudWatch using KMS. This name can be
-- @\/aws-glue\/jobs\/@, in which case the default encryption is @NONE@. If
-- you add a role name and @SecurityConfiguration@ name (in other words,
-- @\/aws-glue\/jobs-yourRoleName-yourSecurityConfigurationName\/@), then
-- that security configuration is used to encrypt the log group.
--
-- 'maxCapacity', 'jobRun_maxCapacity' - The number of Glue data processing units (DPUs) that can be allocated
-- when this job runs. A DPU is a relative measure of processing power that
-- consists of 4 vCPUs of compute capacity and 16 GB of memory. For more
-- information, see the
-- <https://aws.amazon.com/glue/pricing/ Glue pricing page>.
--
-- Do not set @Max Capacity@ if using @WorkerType@ and @NumberOfWorkers@.
--
-- The value that can be allocated for @MaxCapacity@ depends on whether you
-- are running a Python shell job or an Apache Spark ETL job:
--
-- -   When you specify a Python shell job
--     (@JobCommand.Name@=\"pythonshell\"), you can allocate either 0.0625
--     or 1 DPU. The default is 0.0625 DPU.
--
-- -   When you specify an Apache Spark ETL job
--     (@JobCommand.Name@=\"glueetl\"), you can allocate a minimum of 2
--     DPUs. The default is 10 DPUs. This job type cannot have a fractional
--     DPU allocation.
--
-- 'notificationProperty', 'jobRun_notificationProperty' - Specifies configuration properties of a job run notification.
--
-- 'numberOfWorkers', 'jobRun_numberOfWorkers' - The number of workers of a defined @workerType@ that are allocated when
-- a job runs.
--
-- 'predecessorRuns', 'jobRun_predecessorRuns' - A list of predecessors to this job run.
--
-- 'previousRunId', 'jobRun_previousRunId' - The ID of the previous run of this job. For example, the @JobRunId@
-- specified in the @StartJobRun@ action.
--
-- 'securityConfiguration', 'jobRun_securityConfiguration' - The name of the @SecurityConfiguration@ structure to be used with this
-- job run.
--
-- 'startedOn', 'jobRun_startedOn' - The date and time at which this job run was started.
--
-- 'timeout', 'jobRun_timeout' - The @JobRun@ timeout in minutes. This is the maximum time that a job run
-- can consume resources before it is terminated and enters @TIMEOUT@
-- status. This value overrides the timeout value set in the parent job.
--
-- Streaming jobs do not have a timeout. The default for non-streaming jobs
-- is 2,880 minutes (48 hours).
--
-- 'triggerName', 'jobRun_triggerName' - The name of the trigger that started this job run.
--
-- 'workerType', 'jobRun_workerType' - The type of predefined worker that is allocated when a job runs. Accepts
-- a value of Standard, G.1X, G.2X, or G.025X.
--
-- -   For the @Standard@ worker type, each worker provides 4 vCPU, 16 GB
--     of memory and a 50GB disk, and 2 executors per worker.
--
-- -   For the @G.1X@ worker type, each worker provides 4 vCPU, 16 GB of
--     memory and a 64GB disk, and 1 executor per worker.
--
-- -   For the @G.2X@ worker type, each worker provides 8 vCPU, 32 GB of
--     memory and a 128GB disk, and 1 executor per worker.
--
-- -   For the @G.025X@ worker type, each worker maps to 0.25 DPU (2 vCPU,
--     4 GB of memory, 64 GB disk), and provides 1 executor per worker. We
--     recommend this worker type for low volume streaming jobs. This
--     worker type is only available for Glue version 3.0 streaming jobs.
newJobRun ::
  JobRun
newJobRun :: JobRun
newJobRun =
  JobRun'
    { $sel:allocatedCapacity:JobRun' :: Maybe Int
allocatedCapacity = forall a. Maybe a
Prelude.Nothing,
      $sel:arguments:JobRun' :: Maybe (HashMap Text Text)
arguments = forall a. Maybe a
Prelude.Nothing,
      $sel:attempt:JobRun' :: Maybe Int
attempt = forall a. Maybe a
Prelude.Nothing,
      $sel:completedOn:JobRun' :: Maybe POSIX
completedOn = forall a. Maybe a
Prelude.Nothing,
      $sel:dPUSeconds:JobRun' :: Maybe Double
dPUSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:JobRun' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:executionClass:JobRun' :: Maybe ExecutionClass
executionClass = forall a. Maybe a
Prelude.Nothing,
      $sel:executionTime:JobRun' :: Maybe Int
executionTime = forall a. Maybe a
Prelude.Nothing,
      $sel:glueVersion:JobRun' :: Maybe Text
glueVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:id:JobRun' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:JobRun' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
      $sel:jobRunState:JobRun' :: Maybe JobRunState
jobRunState = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedOn:JobRun' :: Maybe POSIX
lastModifiedOn = forall a. Maybe a
Prelude.Nothing,
      $sel:logGroupName:JobRun' :: Maybe Text
logGroupName = forall a. Maybe a
Prelude.Nothing,
      $sel:maxCapacity:JobRun' :: Maybe Double
maxCapacity = forall a. Maybe a
Prelude.Nothing,
      $sel:notificationProperty:JobRun' :: Maybe NotificationProperty
notificationProperty = forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfWorkers:JobRun' :: Maybe Int
numberOfWorkers = forall a. Maybe a
Prelude.Nothing,
      $sel:predecessorRuns:JobRun' :: Maybe [Predecessor]
predecessorRuns = forall a. Maybe a
Prelude.Nothing,
      $sel:previousRunId:JobRun' :: Maybe Text
previousRunId = forall a. Maybe a
Prelude.Nothing,
      $sel:securityConfiguration:JobRun' :: Maybe Text
securityConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:startedOn:JobRun' :: Maybe POSIX
startedOn = forall a. Maybe a
Prelude.Nothing,
      $sel:timeout:JobRun' :: Maybe Natural
timeout = forall a. Maybe a
Prelude.Nothing,
      $sel:triggerName:JobRun' :: Maybe Text
triggerName = forall a. Maybe a
Prelude.Nothing,
      $sel:workerType:JobRun' :: Maybe WorkerType
workerType = forall a. Maybe a
Prelude.Nothing
    }

-- | This field is deprecated. Use @MaxCapacity@ instead.
--
-- The number of Glue data processing units (DPUs) allocated to this
-- JobRun. From 2 to 100 DPUs can be allocated; the default is 10. A DPU is
-- a relative measure of processing power that consists of 4 vCPUs of
-- compute capacity and 16 GB of memory. For more information, see the
-- <https://aws.amazon.com/glue/pricing/ Glue pricing page>.
jobRun_allocatedCapacity :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Int)
jobRun_allocatedCapacity :: Lens' JobRun (Maybe Int)
jobRun_allocatedCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Int
allocatedCapacity :: Maybe Int
$sel:allocatedCapacity:JobRun' :: JobRun -> Maybe Int
allocatedCapacity} -> Maybe Int
allocatedCapacity) (\s :: JobRun
s@JobRun' {} Maybe Int
a -> JobRun
s {$sel:allocatedCapacity:JobRun' :: Maybe Int
allocatedCapacity = Maybe Int
a} :: JobRun)

-- | The job arguments associated with this run. For this job run, they
-- replace the default arguments set in the job definition itself.
--
-- You can specify arguments here that your own job-execution script
-- consumes, as well as arguments that Glue itself consumes.
--
-- For information about how to specify and consume your own job arguments,
-- see the
-- <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html Calling Glue APIs in Python>
-- topic in the developer guide.
--
-- For information about the key-value pairs that Glue consumes to set up
-- your job, see the
-- <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html Special Parameters Used by Glue>
-- topic in the developer guide.
jobRun_arguments :: Lens.Lens' JobRun (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
jobRun_arguments :: Lens' JobRun (Maybe (HashMap Text Text))
jobRun_arguments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe (HashMap Text Text)
arguments :: Maybe (HashMap Text Text)
$sel:arguments:JobRun' :: JobRun -> Maybe (HashMap Text Text)
arguments} -> Maybe (HashMap Text Text)
arguments) (\s :: JobRun
s@JobRun' {} Maybe (HashMap Text Text)
a -> JobRun
s {$sel:arguments:JobRun' :: Maybe (HashMap Text Text)
arguments = Maybe (HashMap Text Text)
a} :: JobRun) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of the attempt to run this job.
jobRun_attempt :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Int)
jobRun_attempt :: Lens' JobRun (Maybe Int)
jobRun_attempt = 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)

-- | The date and time that this job run completed.
jobRun_completedOn :: Lens.Lens' JobRun (Prelude.Maybe Prelude.UTCTime)
jobRun_completedOn :: Lens' JobRun (Maybe UTCTime)
jobRun_completedOn = 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) 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

-- | This field populates only for Auto Scaling job runs, and represents the
-- total time each executor ran during the lifecycle of a job run in
-- seconds, multiplied by a DPU factor (1 for @G.1X@, 2 for @G.2X@, or 0.25
-- for @G.025X@ workers). This value may be different than the
-- @executionEngineRuntime@ * @MaxCapacity@ as in the case of Auto Scaling
-- jobs, as the number of executors running at a given time may be less
-- than the @MaxCapacity@. Therefore, it is possible that the value of
-- @DPUSeconds@ is less than @executionEngineRuntime@ * @MaxCapacity@.
jobRun_dPUSeconds :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Double)
jobRun_dPUSeconds :: Lens' JobRun (Maybe Double)
jobRun_dPUSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Double
dPUSeconds :: Maybe Double
$sel:dPUSeconds:JobRun' :: JobRun -> Maybe Double
dPUSeconds} -> Maybe Double
dPUSeconds) (\s :: JobRun
s@JobRun' {} Maybe Double
a -> JobRun
s {$sel:dPUSeconds:JobRun' :: Maybe Double
dPUSeconds = Maybe Double
a} :: JobRun)

-- | An error message associated with this job run.
jobRun_errorMessage :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_errorMessage :: Lens' JobRun (Maybe Text)
jobRun_errorMessage = 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)

-- | Indicates whether the job is run with a standard or flexible execution
-- class. The standard execution-class is ideal for time-sensitive
-- workloads that require fast job startup and dedicated resources.
--
-- The flexible execution class is appropriate for time-insensitive jobs
-- whose start and completion times may vary.
--
-- Only jobs with Glue version 3.0 and above and command type @glueetl@
-- will be allowed to set @ExecutionClass@ to @FLEX@. The flexible
-- execution class is available for Spark jobs.
jobRun_executionClass :: Lens.Lens' JobRun (Prelude.Maybe ExecutionClass)
jobRun_executionClass :: Lens' JobRun (Maybe ExecutionClass)
jobRun_executionClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe ExecutionClass
executionClass :: Maybe ExecutionClass
$sel:executionClass:JobRun' :: JobRun -> Maybe ExecutionClass
executionClass} -> Maybe ExecutionClass
executionClass) (\s :: JobRun
s@JobRun' {} Maybe ExecutionClass
a -> JobRun
s {$sel:executionClass:JobRun' :: Maybe ExecutionClass
executionClass = Maybe ExecutionClass
a} :: JobRun)

-- | The amount of time (in seconds) that the job run consumed resources.
jobRun_executionTime :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Int)
jobRun_executionTime :: Lens' JobRun (Maybe Int)
jobRun_executionTime = 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)

-- | Glue version determines the versions of Apache Spark and Python that
-- Glue supports. The Python version indicates the version supported for
-- jobs of type Spark.
--
-- For more information about the available Glue versions and corresponding
-- Spark and Python versions, see
-- <https://docs.aws.amazon.com/glue/latest/dg/add-job.html Glue version>
-- in the developer guide.
--
-- Jobs that are created without specifying a Glue version default to Glue
-- 0.9.
jobRun_glueVersion :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_glueVersion :: Lens' JobRun (Maybe Text)
jobRun_glueVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
glueVersion :: Maybe Text
$sel:glueVersion:JobRun' :: JobRun -> Maybe Text
glueVersion} -> Maybe Text
glueVersion) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:glueVersion:JobRun' :: Maybe Text
glueVersion = Maybe Text
a} :: JobRun)

-- | The ID of this job run.
jobRun_id :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_id :: Lens' JobRun (Maybe Text)
jobRun_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
id :: Maybe Text
$sel:id:JobRun' :: JobRun -> Maybe Text
id} -> Maybe Text
id) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:id:JobRun' :: Maybe Text
id = Maybe Text
a} :: JobRun)

-- | The name of the job definition being used in this run.
jobRun_jobName :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_jobName :: Lens' JobRun (Maybe Text)
jobRun_jobName = 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 current state of the job run. For more information about the
-- statuses of jobs that have terminated abnormally, see
-- <https://docs.aws.amazon.com/glue/latest/dg/job-run-statuses.html Glue Job Run Statuses>.
jobRun_jobRunState :: Lens.Lens' JobRun (Prelude.Maybe JobRunState)
jobRun_jobRunState :: Lens' JobRun (Maybe JobRunState)
jobRun_jobRunState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe JobRunState
jobRunState :: Maybe JobRunState
$sel:jobRunState:JobRun' :: JobRun -> Maybe JobRunState
jobRunState} -> Maybe JobRunState
jobRunState) (\s :: JobRun
s@JobRun' {} Maybe JobRunState
a -> JobRun
s {$sel:jobRunState:JobRun' :: Maybe JobRunState
jobRunState = Maybe JobRunState
a} :: JobRun)

-- | The last time that this job run was modified.
jobRun_lastModifiedOn :: Lens.Lens' JobRun (Prelude.Maybe Prelude.UTCTime)
jobRun_lastModifiedOn :: Lens' JobRun (Maybe UTCTime)
jobRun_lastModifiedOn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe POSIX
lastModifiedOn :: Maybe POSIX
$sel:lastModifiedOn:JobRun' :: JobRun -> Maybe POSIX
lastModifiedOn} -> Maybe POSIX
lastModifiedOn) (\s :: JobRun
s@JobRun' {} Maybe POSIX
a -> JobRun
s {$sel:lastModifiedOn:JobRun' :: Maybe POSIX
lastModifiedOn = Maybe POSIX
a} :: JobRun) 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

-- | The name of the log group for secure logging that can be server-side
-- encrypted in Amazon CloudWatch using KMS. This name can be
-- @\/aws-glue\/jobs\/@, in which case the default encryption is @NONE@. If
-- you add a role name and @SecurityConfiguration@ name (in other words,
-- @\/aws-glue\/jobs-yourRoleName-yourSecurityConfigurationName\/@), then
-- that security configuration is used to encrypt the log group.
jobRun_logGroupName :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_logGroupName :: Lens' JobRun (Maybe Text)
jobRun_logGroupName = 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)

-- | The number of Glue data processing units (DPUs) that can be allocated
-- when this job runs. A DPU is a relative measure of processing power that
-- consists of 4 vCPUs of compute capacity and 16 GB of memory. For more
-- information, see the
-- <https://aws.amazon.com/glue/pricing/ Glue pricing page>.
--
-- Do not set @Max Capacity@ if using @WorkerType@ and @NumberOfWorkers@.
--
-- The value that can be allocated for @MaxCapacity@ depends on whether you
-- are running a Python shell job or an Apache Spark ETL job:
--
-- -   When you specify a Python shell job
--     (@JobCommand.Name@=\"pythonshell\"), you can allocate either 0.0625
--     or 1 DPU. The default is 0.0625 DPU.
--
-- -   When you specify an Apache Spark ETL job
--     (@JobCommand.Name@=\"glueetl\"), you can allocate a minimum of 2
--     DPUs. The default is 10 DPUs. This job type cannot have a fractional
--     DPU allocation.
jobRun_maxCapacity :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Double)
jobRun_maxCapacity :: Lens' JobRun (Maybe Double)
jobRun_maxCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Double
maxCapacity :: Maybe Double
$sel:maxCapacity:JobRun' :: JobRun -> Maybe Double
maxCapacity} -> Maybe Double
maxCapacity) (\s :: JobRun
s@JobRun' {} Maybe Double
a -> JobRun
s {$sel:maxCapacity:JobRun' :: Maybe Double
maxCapacity = Maybe Double
a} :: JobRun)

-- | Specifies configuration properties of a job run notification.
jobRun_notificationProperty :: Lens.Lens' JobRun (Prelude.Maybe NotificationProperty)
jobRun_notificationProperty :: Lens' JobRun (Maybe NotificationProperty)
jobRun_notificationProperty = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe NotificationProperty
notificationProperty :: Maybe NotificationProperty
$sel:notificationProperty:JobRun' :: JobRun -> Maybe NotificationProperty
notificationProperty} -> Maybe NotificationProperty
notificationProperty) (\s :: JobRun
s@JobRun' {} Maybe NotificationProperty
a -> JobRun
s {$sel:notificationProperty:JobRun' :: Maybe NotificationProperty
notificationProperty = Maybe NotificationProperty
a} :: JobRun)

-- | The number of workers of a defined @workerType@ that are allocated when
-- a job runs.
jobRun_numberOfWorkers :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Int)
jobRun_numberOfWorkers :: Lens' JobRun (Maybe Int)
jobRun_numberOfWorkers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Int
numberOfWorkers :: Maybe Int
$sel:numberOfWorkers:JobRun' :: JobRun -> Maybe Int
numberOfWorkers} -> Maybe Int
numberOfWorkers) (\s :: JobRun
s@JobRun' {} Maybe Int
a -> JobRun
s {$sel:numberOfWorkers:JobRun' :: Maybe Int
numberOfWorkers = Maybe Int
a} :: JobRun)

-- | A list of predecessors to this job run.
jobRun_predecessorRuns :: Lens.Lens' JobRun (Prelude.Maybe [Predecessor])
jobRun_predecessorRuns :: Lens' JobRun (Maybe [Predecessor])
jobRun_predecessorRuns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe [Predecessor]
predecessorRuns :: Maybe [Predecessor]
$sel:predecessorRuns:JobRun' :: JobRun -> Maybe [Predecessor]
predecessorRuns} -> Maybe [Predecessor]
predecessorRuns) (\s :: JobRun
s@JobRun' {} Maybe [Predecessor]
a -> JobRun
s {$sel:predecessorRuns:JobRun' :: Maybe [Predecessor]
predecessorRuns = Maybe [Predecessor]
a} :: JobRun) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the previous run of this job. For example, the @JobRunId@
-- specified in the @StartJobRun@ action.
jobRun_previousRunId :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_previousRunId :: Lens' JobRun (Maybe Text)
jobRun_previousRunId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
previousRunId :: Maybe Text
$sel:previousRunId:JobRun' :: JobRun -> Maybe Text
previousRunId} -> Maybe Text
previousRunId) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:previousRunId:JobRun' :: Maybe Text
previousRunId = Maybe Text
a} :: JobRun)

-- | The name of the @SecurityConfiguration@ structure to be used with this
-- job run.
jobRun_securityConfiguration :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_securityConfiguration :: Lens' JobRun (Maybe Text)
jobRun_securityConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
securityConfiguration :: Maybe Text
$sel:securityConfiguration:JobRun' :: JobRun -> Maybe Text
securityConfiguration} -> Maybe Text
securityConfiguration) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:securityConfiguration:JobRun' :: Maybe Text
securityConfiguration = Maybe Text
a} :: JobRun)

-- | The date and time at which this job run was started.
jobRun_startedOn :: Lens.Lens' JobRun (Prelude.Maybe Prelude.UTCTime)
jobRun_startedOn :: Lens' JobRun (Maybe UTCTime)
jobRun_startedOn = 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) 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

-- | The @JobRun@ timeout in minutes. This is the maximum time that a job run
-- can consume resources before it is terminated and enters @TIMEOUT@
-- status. This value overrides the timeout value set in the parent job.
--
-- Streaming jobs do not have a timeout. The default for non-streaming jobs
-- is 2,880 minutes (48 hours).
jobRun_timeout :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Natural)
jobRun_timeout :: Lens' JobRun (Maybe Natural)
jobRun_timeout = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Natural
timeout :: Maybe Natural
$sel:timeout:JobRun' :: JobRun -> Maybe Natural
timeout} -> Maybe Natural
timeout) (\s :: JobRun
s@JobRun' {} Maybe Natural
a -> JobRun
s {$sel:timeout:JobRun' :: Maybe Natural
timeout = Maybe Natural
a} :: JobRun)

-- | The name of the trigger that started this job run.
jobRun_triggerName :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_triggerName :: Lens' JobRun (Maybe Text)
jobRun_triggerName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
triggerName :: Maybe Text
$sel:triggerName:JobRun' :: JobRun -> Maybe Text
triggerName} -> Maybe Text
triggerName) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:triggerName:JobRun' :: Maybe Text
triggerName = Maybe Text
a} :: JobRun)

-- | The type of predefined worker that is allocated when a job runs. Accepts
-- a value of Standard, G.1X, G.2X, or G.025X.
--
-- -   For the @Standard@ worker type, each worker provides 4 vCPU, 16 GB
--     of memory and a 50GB disk, and 2 executors per worker.
--
-- -   For the @G.1X@ worker type, each worker provides 4 vCPU, 16 GB of
--     memory and a 64GB disk, and 1 executor per worker.
--
-- -   For the @G.2X@ worker type, each worker provides 8 vCPU, 32 GB of
--     memory and a 128GB disk, and 1 executor per worker.
--
-- -   For the @G.025X@ worker type, each worker maps to 0.25 DPU (2 vCPU,
--     4 GB of memory, 64 GB disk), and provides 1 executor per worker. We
--     recommend this worker type for low volume streaming jobs. This
--     worker type is only available for Glue version 3.0 streaming jobs.
jobRun_workerType :: Lens.Lens' JobRun (Prelude.Maybe WorkerType)
jobRun_workerType :: Lens' JobRun (Maybe WorkerType)
jobRun_workerType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe WorkerType
workerType :: Maybe WorkerType
$sel:workerType:JobRun' :: JobRun -> Maybe WorkerType
workerType} -> Maybe WorkerType
workerType) (\s :: JobRun
s@JobRun' {} Maybe WorkerType
a -> JobRun
s {$sel:workerType:JobRun' :: Maybe WorkerType
workerType = Maybe WorkerType
a} :: JobRun)

instance Data.FromJSON JobRun where
  parseJSON :: Value -> Parser JobRun
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"JobRun"
      ( \Object
x ->
          Maybe Int
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Maybe POSIX
-> Maybe Double
-> Maybe Text
-> Maybe ExecutionClass
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JobRunState
-> Maybe POSIX
-> Maybe Text
-> Maybe Double
-> Maybe NotificationProperty
-> Maybe Int
-> Maybe [Predecessor]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe WorkerType
-> JobRun
JobRun'
            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
"AllocatedCapacity")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arguments" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Attempt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CompletedOn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DPUSeconds")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorMessage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ExecutionClass")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ExecutionTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GlueVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"JobName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"JobRunState")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedOn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LogGroupName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MaxCapacity")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NotificationProperty")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NumberOfWorkers")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PredecessorRuns"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PreviousRunId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecurityConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StartedOn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Timeout")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TriggerName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WorkerType")
      )

instance Prelude.Hashable JobRun where
  hashWithSalt :: Int -> JobRun -> Int
hashWithSalt Int
_salt JobRun' {Maybe Double
Maybe Int
Maybe Natural
Maybe [Predecessor]
Maybe Text
Maybe (HashMap Text Text)
Maybe POSIX
Maybe ExecutionClass
Maybe JobRunState
Maybe NotificationProperty
Maybe WorkerType
workerType :: Maybe WorkerType
triggerName :: Maybe Text
timeout :: Maybe Natural
startedOn :: Maybe POSIX
securityConfiguration :: Maybe Text
previousRunId :: Maybe Text
predecessorRuns :: Maybe [Predecessor]
numberOfWorkers :: Maybe Int
notificationProperty :: Maybe NotificationProperty
maxCapacity :: Maybe Double
logGroupName :: Maybe Text
lastModifiedOn :: Maybe POSIX
jobRunState :: Maybe JobRunState
jobName :: Maybe Text
id :: Maybe Text
glueVersion :: Maybe Text
executionTime :: Maybe Int
executionClass :: Maybe ExecutionClass
errorMessage :: Maybe Text
dPUSeconds :: Maybe Double
completedOn :: Maybe POSIX
attempt :: Maybe Int
arguments :: Maybe (HashMap Text Text)
allocatedCapacity :: Maybe Int
$sel:workerType:JobRun' :: JobRun -> Maybe WorkerType
$sel:triggerName:JobRun' :: JobRun -> Maybe Text
$sel:timeout:JobRun' :: JobRun -> Maybe Natural
$sel:startedOn:JobRun' :: JobRun -> Maybe POSIX
$sel:securityConfiguration:JobRun' :: JobRun -> Maybe Text
$sel:previousRunId:JobRun' :: JobRun -> Maybe Text
$sel:predecessorRuns:JobRun' :: JobRun -> Maybe [Predecessor]
$sel:numberOfWorkers:JobRun' :: JobRun -> Maybe Int
$sel:notificationProperty:JobRun' :: JobRun -> Maybe NotificationProperty
$sel:maxCapacity:JobRun' :: JobRun -> Maybe Double
$sel:logGroupName:JobRun' :: JobRun -> Maybe Text
$sel:lastModifiedOn:JobRun' :: JobRun -> Maybe POSIX
$sel:jobRunState:JobRun' :: JobRun -> Maybe JobRunState
$sel:jobName:JobRun' :: JobRun -> Maybe Text
$sel:id:JobRun' :: JobRun -> Maybe Text
$sel:glueVersion:JobRun' :: JobRun -> Maybe Text
$sel:executionTime:JobRun' :: JobRun -> Maybe Int
$sel:executionClass:JobRun' :: JobRun -> Maybe ExecutionClass
$sel:errorMessage:JobRun' :: JobRun -> Maybe Text
$sel:dPUSeconds:JobRun' :: JobRun -> Maybe Double
$sel:completedOn:JobRun' :: JobRun -> Maybe POSIX
$sel:attempt:JobRun' :: JobRun -> Maybe Int
$sel:arguments:JobRun' :: JobRun -> Maybe (HashMap Text Text)
$sel:allocatedCapacity:JobRun' :: JobRun -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
allocatedCapacity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
arguments
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
attempt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
completedOn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
dPUSeconds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExecutionClass
executionClass
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
executionTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
glueVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobRunState
jobRunState
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedOn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
maxCapacity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NotificationProperty
notificationProperty
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfWorkers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Predecessor]
predecessorRuns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
previousRunId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
securityConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startedOn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeout
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
triggerName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkerType
workerType

instance Prelude.NFData JobRun where
  rnf :: JobRun -> ()
rnf JobRun' {Maybe Double
Maybe Int
Maybe Natural
Maybe [Predecessor]
Maybe Text
Maybe (HashMap Text Text)
Maybe POSIX
Maybe ExecutionClass
Maybe JobRunState
Maybe NotificationProperty
Maybe WorkerType
workerType :: Maybe WorkerType
triggerName :: Maybe Text
timeout :: Maybe Natural
startedOn :: Maybe POSIX
securityConfiguration :: Maybe Text
previousRunId :: Maybe Text
predecessorRuns :: Maybe [Predecessor]
numberOfWorkers :: Maybe Int
notificationProperty :: Maybe NotificationProperty
maxCapacity :: Maybe Double
logGroupName :: Maybe Text
lastModifiedOn :: Maybe POSIX
jobRunState :: Maybe JobRunState
jobName :: Maybe Text
id :: Maybe Text
glueVersion :: Maybe Text
executionTime :: Maybe Int
executionClass :: Maybe ExecutionClass
errorMessage :: Maybe Text
dPUSeconds :: Maybe Double
completedOn :: Maybe POSIX
attempt :: Maybe Int
arguments :: Maybe (HashMap Text Text)
allocatedCapacity :: Maybe Int
$sel:workerType:JobRun' :: JobRun -> Maybe WorkerType
$sel:triggerName:JobRun' :: JobRun -> Maybe Text
$sel:timeout:JobRun' :: JobRun -> Maybe Natural
$sel:startedOn:JobRun' :: JobRun -> Maybe POSIX
$sel:securityConfiguration:JobRun' :: JobRun -> Maybe Text
$sel:previousRunId:JobRun' :: JobRun -> Maybe Text
$sel:predecessorRuns:JobRun' :: JobRun -> Maybe [Predecessor]
$sel:numberOfWorkers:JobRun' :: JobRun -> Maybe Int
$sel:notificationProperty:JobRun' :: JobRun -> Maybe NotificationProperty
$sel:maxCapacity:JobRun' :: JobRun -> Maybe Double
$sel:logGroupName:JobRun' :: JobRun -> Maybe Text
$sel:lastModifiedOn:JobRun' :: JobRun -> Maybe POSIX
$sel:jobRunState:JobRun' :: JobRun -> Maybe JobRunState
$sel:jobName:JobRun' :: JobRun -> Maybe Text
$sel:id:JobRun' :: JobRun -> Maybe Text
$sel:glueVersion:JobRun' :: JobRun -> Maybe Text
$sel:executionTime:JobRun' :: JobRun -> Maybe Int
$sel:executionClass:JobRun' :: JobRun -> Maybe ExecutionClass
$sel:errorMessage:JobRun' :: JobRun -> Maybe Text
$sel:dPUSeconds:JobRun' :: JobRun -> Maybe Double
$sel:completedOn:JobRun' :: JobRun -> Maybe POSIX
$sel:attempt:JobRun' :: JobRun -> Maybe Int
$sel:arguments:JobRun' :: JobRun -> Maybe (HashMap Text Text)
$sel:allocatedCapacity:JobRun' :: JobRun -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
allocatedCapacity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
arguments
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
attempt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
completedOn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
dPUSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExecutionClass
executionClass
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
executionTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
glueVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobRunState
jobRunState
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedOn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
maxCapacity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NotificationProperty
notificationProperty
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfWorkers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Predecessor]
predecessorRuns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
previousRunId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
securityConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startedOn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeout
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
triggerName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkerType
workerType