{-# 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.Job
-- 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.Glue.Types.Job where

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.ConnectionsList
import Amazonka.Glue.Types.ExecutionProperty
import Amazonka.Glue.Types.JobCommand
import Amazonka.Glue.Types.NotificationProperty
import Amazonka.Glue.Types.WorkerType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Specifies a job definition.
--
-- /See:/ 'newJob' smart constructor.
data Job = Job'
  { -- | The number of workers of a defined @workerType@ that are allocated when
    -- a job runs.
    --
    -- The maximum number of workers you can define are 299 for @G.1X@, and 149
    -- for @G.2X@.
    Job -> Maybe Int
numberOfWorkers :: Prelude.Maybe Prelude.Int,
    -- | The @JobCommand@ that runs this job.
    Job -> Maybe JobCommand
command :: Prelude.Maybe JobCommand,
    -- | Specifies configuration properties of a job notification.
    Job -> Maybe NotificationProperty
notificationProperty :: Prelude.Maybe NotificationProperty,
    -- | The last point in time when this job definition was modified.
    Job -> Maybe POSIX
lastModifiedOn :: Prelude.Maybe Core.POSIX,
    -- | The connections used for this job.
    Job -> Maybe ConnectionsList
connections :: Prelude.Maybe ConnectionsList,
    -- | The type of predefined worker that is allocated when a job runs. Accepts
    -- a value of Standard, G.1X, or G.2X.
    --
    -- -   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 maps to 1 DPU (4 vCPU, 16 GB
    --     of memory, 64 GB disk), and provides 1 executor per worker. We
    --     recommend this worker type for memory-intensive jobs.
    --
    -- -   For the @G.2X@ worker type, each worker maps to 2 DPU (8 vCPU, 32 GB
    --     of memory, 128 GB disk), and provides 1 executor per worker. We
    --     recommend this worker type for memory-intensive jobs.
    Job -> Maybe WorkerType
workerType :: Prelude.Maybe WorkerType,
    -- | The name of the @SecurityConfiguration@ structure to be used with this
    -- job.
    Job -> Maybe Text
securityConfiguration :: Prelude.Maybe Prelude.Text,
    -- | 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.
    Job -> Maybe Text
glueVersion :: Prelude.Maybe Prelude.Text,
    -- | Non-overridable arguments for this job, specified as name-value pairs.
    Job -> Maybe (HashMap Text Text)
nonOverridableArguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name or Amazon Resource Name (ARN) of the IAM role associated with
    -- this job.
    Job -> Maybe Text
role' :: Prelude.Maybe Prelude.Text,
    -- | The name you assign to this job definition.
    Job -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | This field is reserved for future use.
    Job -> Maybe Text
logUri :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of times to retry this job after a JobRun fails.
    Job -> Maybe Int
maxRetries :: Prelude.Maybe Prelude.Int,
    -- | An @ExecutionProperty@ specifying the maximum number of concurrent runs
    -- allowed for this job.
    Job -> Maybe ExecutionProperty
executionProperty :: Prelude.Maybe ExecutionProperty,
    -- | This field is deprecated. Use @MaxCapacity@ instead.
    --
    -- The number of Glue data processing units (DPUs) allocated to runs of
    -- this job. You can allocate from 2 to 100 DPUs; 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>.
    Job -> Maybe Int
allocatedCapacity :: Prelude.Maybe Prelude.Int,
    -- | For Glue version 1.0 or earlier jobs, using the standard worker type,
    -- 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, an Apache Spark ETL job, or an Apache
    -- Spark streaming 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\") or Apache Spark streaming ETL job
    --     (@JobCommand.Name@=\"gluestreaming\"), you can allocate from 2 to
    --     100 DPUs. The default is 10 DPUs. This job type cannot have a
    --     fractional DPU allocation.
    --
    -- For Glue version 2.0 jobs, you cannot instead specify a
    -- @Maximum capacity@. Instead, you should specify a @Worker type@ and the
    -- @Number of workers@.
    Job -> Maybe Double
maxCapacity :: Prelude.Maybe Prelude.Double,
    -- | The job timeout in minutes. This is the maximum time that a job run can
    -- consume resources before it is terminated and enters @TIMEOUT@ status.
    -- The default is 2,880 minutes (48 hours).
    Job -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
    -- | The default arguments for this job, specified as name-value pairs.
    --
    -- 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.
    Job -> Maybe (HashMap Text Text)
defaultArguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A description of the job.
    Job -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The time and date that this job definition was created.
    Job -> Maybe POSIX
createdOn :: Prelude.Maybe Core.POSIX
  }
  deriving (Job -> Job -> Bool
(Job -> Job -> Bool) -> (Job -> Job -> Bool) -> Eq Job
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Job -> Job -> Bool
$c/= :: Job -> Job -> Bool
== :: Job -> Job -> Bool
$c== :: Job -> Job -> Bool
Prelude.Eq, ReadPrec [Job]
ReadPrec Job
Int -> ReadS Job
ReadS [Job]
(Int -> ReadS Job)
-> ReadS [Job] -> ReadPrec Job -> ReadPrec [Job] -> Read Job
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Job]
$creadListPrec :: ReadPrec [Job]
readPrec :: ReadPrec Job
$creadPrec :: ReadPrec Job
readList :: ReadS [Job]
$creadList :: ReadS [Job]
readsPrec :: Int -> ReadS Job
$creadsPrec :: Int -> ReadS Job
Prelude.Read, Int -> Job -> ShowS
[Job] -> ShowS
Job -> String
(Int -> Job -> ShowS)
-> (Job -> String) -> ([Job] -> ShowS) -> Show Job
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Job] -> ShowS
$cshowList :: [Job] -> ShowS
show :: Job -> String
$cshow :: Job -> String
showsPrec :: Int -> Job -> ShowS
$cshowsPrec :: Int -> Job -> ShowS
Prelude.Show, (forall x. Job -> Rep Job x)
-> (forall x. Rep Job x -> Job) -> Generic Job
forall x. Rep Job x -> Job
forall x. Job -> Rep Job x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Job x -> Job
$cfrom :: forall x. Job -> Rep Job x
Prelude.Generic)

-- |
-- Create a value of 'Job' 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:
--
-- 'numberOfWorkers', 'job_numberOfWorkers' - The number of workers of a defined @workerType@ that are allocated when
-- a job runs.
--
-- The maximum number of workers you can define are 299 for @G.1X@, and 149
-- for @G.2X@.
--
-- 'command', 'job_command' - The @JobCommand@ that runs this job.
--
-- 'notificationProperty', 'job_notificationProperty' - Specifies configuration properties of a job notification.
--
-- 'lastModifiedOn', 'job_lastModifiedOn' - The last point in time when this job definition was modified.
--
-- 'connections', 'job_connections' - The connections used for this job.
--
-- 'workerType', 'job_workerType' - The type of predefined worker that is allocated when a job runs. Accepts
-- a value of Standard, G.1X, or G.2X.
--
-- -   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 maps to 1 DPU (4 vCPU, 16 GB
--     of memory, 64 GB disk), and provides 1 executor per worker. We
--     recommend this worker type for memory-intensive jobs.
--
-- -   For the @G.2X@ worker type, each worker maps to 2 DPU (8 vCPU, 32 GB
--     of memory, 128 GB disk), and provides 1 executor per worker. We
--     recommend this worker type for memory-intensive jobs.
--
-- 'securityConfiguration', 'job_securityConfiguration' - The name of the @SecurityConfiguration@ structure to be used with this
-- job.
--
-- 'glueVersion', 'job_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.
--
-- 'nonOverridableArguments', 'job_nonOverridableArguments' - Non-overridable arguments for this job, specified as name-value pairs.
--
-- 'role'', 'job_role' - The name or Amazon Resource Name (ARN) of the IAM role associated with
-- this job.
--
-- 'name', 'job_name' - The name you assign to this job definition.
--
-- 'logUri', 'job_logUri' - This field is reserved for future use.
--
-- 'maxRetries', 'job_maxRetries' - The maximum number of times to retry this job after a JobRun fails.
--
-- 'executionProperty', 'job_executionProperty' - An @ExecutionProperty@ specifying the maximum number of concurrent runs
-- allowed for this job.
--
-- 'allocatedCapacity', 'job_allocatedCapacity' - This field is deprecated. Use @MaxCapacity@ instead.
--
-- The number of Glue data processing units (DPUs) allocated to runs of
-- this job. You can allocate from 2 to 100 DPUs; 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>.
--
-- 'maxCapacity', 'job_maxCapacity' - For Glue version 1.0 or earlier jobs, using the standard worker type,
-- 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, an Apache Spark ETL job, or an Apache
-- Spark streaming 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\") or Apache Spark streaming ETL job
--     (@JobCommand.Name@=\"gluestreaming\"), you can allocate from 2 to
--     100 DPUs. The default is 10 DPUs. This job type cannot have a
--     fractional DPU allocation.
--
-- For Glue version 2.0 jobs, you cannot instead specify a
-- @Maximum capacity@. Instead, you should specify a @Worker type@ and the
-- @Number of workers@.
--
-- 'timeout', 'job_timeout' - The job timeout in minutes. This is the maximum time that a job run can
-- consume resources before it is terminated and enters @TIMEOUT@ status.
-- The default is 2,880 minutes (48 hours).
--
-- 'defaultArguments', 'job_defaultArguments' - The default arguments for this job, specified as name-value pairs.
--
-- 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.
--
-- 'description', 'job_description' - A description of the job.
--
-- 'createdOn', 'job_createdOn' - The time and date that this job definition was created.
newJob ::
  Job
newJob :: Job
newJob =
  Job' :: Maybe Int
-> Maybe JobCommand
-> Maybe NotificationProperty
-> Maybe POSIX
-> Maybe ConnectionsList
-> Maybe WorkerType
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe ExecutionProperty
-> Maybe Int
-> Maybe Double
-> Maybe Natural
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe POSIX
-> Job
Job'
    { $sel:numberOfWorkers:Job' :: Maybe Int
numberOfWorkers = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:command:Job' :: Maybe JobCommand
command = Maybe JobCommand
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationProperty:Job' :: Maybe NotificationProperty
notificationProperty = Maybe NotificationProperty
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedOn:Job' :: Maybe POSIX
lastModifiedOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:connections:Job' :: Maybe ConnectionsList
connections = Maybe ConnectionsList
forall a. Maybe a
Prelude.Nothing,
      $sel:workerType:Job' :: Maybe WorkerType
workerType = Maybe WorkerType
forall a. Maybe a
Prelude.Nothing,
      $sel:securityConfiguration:Job' :: Maybe Text
securityConfiguration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:glueVersion:Job' :: Maybe Text
glueVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nonOverridableArguments:Job' :: Maybe (HashMap Text Text)
nonOverridableArguments = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:role':Job' :: Maybe Text
role' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Job' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logUri:Job' :: Maybe Text
logUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRetries:Job' :: Maybe Int
maxRetries = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:executionProperty:Job' :: Maybe ExecutionProperty
executionProperty = Maybe ExecutionProperty
forall a. Maybe a
Prelude.Nothing,
      $sel:allocatedCapacity:Job' :: Maybe Int
allocatedCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:maxCapacity:Job' :: Maybe Double
maxCapacity = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:timeout:Job' :: Maybe Natural
timeout = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultArguments:Job' :: Maybe (HashMap Text Text)
defaultArguments = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Job' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdOn:Job' :: Maybe POSIX
createdOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The number of workers of a defined @workerType@ that are allocated when
-- a job runs.
--
-- The maximum number of workers you can define are 299 for @G.1X@, and 149
-- for @G.2X@.
job_numberOfWorkers :: Lens.Lens' Job (Prelude.Maybe Prelude.Int)
job_numberOfWorkers :: (Maybe Int -> f (Maybe Int)) -> Job -> f Job
job_numberOfWorkers = (Job -> Maybe Int)
-> (Job -> Maybe Int -> Job)
-> Lens Job Job (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Int
numberOfWorkers :: Maybe Int
$sel:numberOfWorkers:Job' :: Job -> Maybe Int
numberOfWorkers} -> Maybe Int
numberOfWorkers) (\s :: Job
s@Job' {} Maybe Int
a -> Job
s {$sel:numberOfWorkers:Job' :: Maybe Int
numberOfWorkers = Maybe Int
a} :: Job)

-- | The @JobCommand@ that runs this job.
job_command :: Lens.Lens' Job (Prelude.Maybe JobCommand)
job_command :: (Maybe JobCommand -> f (Maybe JobCommand)) -> Job -> f Job
job_command = (Job -> Maybe JobCommand)
-> (Job -> Maybe JobCommand -> Job)
-> Lens Job Job (Maybe JobCommand) (Maybe JobCommand)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobCommand
command :: Maybe JobCommand
$sel:command:Job' :: Job -> Maybe JobCommand
command} -> Maybe JobCommand
command) (\s :: Job
s@Job' {} Maybe JobCommand
a -> Job
s {$sel:command:Job' :: Maybe JobCommand
command = Maybe JobCommand
a} :: Job)

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

-- | The last point in time when this job definition was modified.
job_lastModifiedOn :: Lens.Lens' Job (Prelude.Maybe Prelude.UTCTime)
job_lastModifiedOn :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Job -> f Job
job_lastModifiedOn = (Job -> Maybe POSIX)
-> (Job -> Maybe POSIX -> Job)
-> Lens Job Job (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe POSIX
lastModifiedOn :: Maybe POSIX
$sel:lastModifiedOn:Job' :: Job -> Maybe POSIX
lastModifiedOn} -> Maybe POSIX
lastModifiedOn) (\s :: Job
s@Job' {} Maybe POSIX
a -> Job
s {$sel:lastModifiedOn:Job' :: Maybe POSIX
lastModifiedOn = Maybe POSIX
a} :: Job) ((Maybe POSIX -> f (Maybe POSIX)) -> Job -> f Job)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Job
-> f Job
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 connections used for this job.
job_connections :: Lens.Lens' Job (Prelude.Maybe ConnectionsList)
job_connections :: (Maybe ConnectionsList -> f (Maybe ConnectionsList))
-> Job -> f Job
job_connections = (Job -> Maybe ConnectionsList)
-> (Job -> Maybe ConnectionsList -> Job)
-> Lens Job Job (Maybe ConnectionsList) (Maybe ConnectionsList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe ConnectionsList
connections :: Maybe ConnectionsList
$sel:connections:Job' :: Job -> Maybe ConnectionsList
connections} -> Maybe ConnectionsList
connections) (\s :: Job
s@Job' {} Maybe ConnectionsList
a -> Job
s {$sel:connections:Job' :: Maybe ConnectionsList
connections = Maybe ConnectionsList
a} :: Job)

-- | The type of predefined worker that is allocated when a job runs. Accepts
-- a value of Standard, G.1X, or G.2X.
--
-- -   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 maps to 1 DPU (4 vCPU, 16 GB
--     of memory, 64 GB disk), and provides 1 executor per worker. We
--     recommend this worker type for memory-intensive jobs.
--
-- -   For the @G.2X@ worker type, each worker maps to 2 DPU (8 vCPU, 32 GB
--     of memory, 128 GB disk), and provides 1 executor per worker. We
--     recommend this worker type for memory-intensive jobs.
job_workerType :: Lens.Lens' Job (Prelude.Maybe WorkerType)
job_workerType :: (Maybe WorkerType -> f (Maybe WorkerType)) -> Job -> f Job
job_workerType = (Job -> Maybe WorkerType)
-> (Job -> Maybe WorkerType -> Job)
-> Lens Job Job (Maybe WorkerType) (Maybe WorkerType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe WorkerType
workerType :: Maybe WorkerType
$sel:workerType:Job' :: Job -> Maybe WorkerType
workerType} -> Maybe WorkerType
workerType) (\s :: Job
s@Job' {} Maybe WorkerType
a -> Job
s {$sel:workerType:Job' :: Maybe WorkerType
workerType = Maybe WorkerType
a} :: Job)

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

-- | 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.
job_glueVersion :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_glueVersion :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_glueVersion = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
glueVersion :: Maybe Text
$sel:glueVersion:Job' :: Job -> Maybe Text
glueVersion} -> Maybe Text
glueVersion) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:glueVersion:Job' :: Maybe Text
glueVersion = Maybe Text
a} :: Job)

-- | Non-overridable arguments for this job, specified as name-value pairs.
job_nonOverridableArguments :: Lens.Lens' Job (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
job_nonOverridableArguments :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job -> f Job
job_nonOverridableArguments = (Job -> Maybe (HashMap Text Text))
-> (Job -> Maybe (HashMap Text Text) -> Job)
-> Lens
     Job Job (Maybe (HashMap Text Text)) (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe (HashMap Text Text)
nonOverridableArguments :: Maybe (HashMap Text Text)
$sel:nonOverridableArguments:Job' :: Job -> Maybe (HashMap Text Text)
nonOverridableArguments} -> Maybe (HashMap Text Text)
nonOverridableArguments) (\s :: Job
s@Job' {} Maybe (HashMap Text Text)
a -> Job
s {$sel:nonOverridableArguments:Job' :: Maybe (HashMap Text Text)
nonOverridableArguments = Maybe (HashMap Text Text)
a} :: Job) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Job -> f Job)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name or Amazon Resource Name (ARN) of the IAM role associated with
-- this job.
job_role :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_role :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_role = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
role' :: Maybe Text
$sel:role':Job' :: Job -> Maybe Text
role'} -> Maybe Text
role') (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:role':Job' :: Maybe Text
role' = Maybe Text
a} :: Job)

-- | The name you assign to this job definition.
job_name :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_name :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_name = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
name :: Maybe Text
$sel:name:Job' :: Job -> Maybe Text
name} -> Maybe Text
name) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:name:Job' :: Maybe Text
name = Maybe Text
a} :: Job)

-- | This field is reserved for future use.
job_logUri :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_logUri :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_logUri = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
logUri :: Maybe Text
$sel:logUri:Job' :: Job -> Maybe Text
logUri} -> Maybe Text
logUri) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:logUri:Job' :: Maybe Text
logUri = Maybe Text
a} :: Job)

-- | The maximum number of times to retry this job after a JobRun fails.
job_maxRetries :: Lens.Lens' Job (Prelude.Maybe Prelude.Int)
job_maxRetries :: (Maybe Int -> f (Maybe Int)) -> Job -> f Job
job_maxRetries = (Job -> Maybe Int)
-> (Job -> Maybe Int -> Job)
-> Lens Job Job (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Int
maxRetries :: Maybe Int
$sel:maxRetries:Job' :: Job -> Maybe Int
maxRetries} -> Maybe Int
maxRetries) (\s :: Job
s@Job' {} Maybe Int
a -> Job
s {$sel:maxRetries:Job' :: Maybe Int
maxRetries = Maybe Int
a} :: Job)

-- | An @ExecutionProperty@ specifying the maximum number of concurrent runs
-- allowed for this job.
job_executionProperty :: Lens.Lens' Job (Prelude.Maybe ExecutionProperty)
job_executionProperty :: (Maybe ExecutionProperty -> f (Maybe ExecutionProperty))
-> Job -> f Job
job_executionProperty = (Job -> Maybe ExecutionProperty)
-> (Job -> Maybe ExecutionProperty -> Job)
-> Lens Job Job (Maybe ExecutionProperty) (Maybe ExecutionProperty)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe ExecutionProperty
executionProperty :: Maybe ExecutionProperty
$sel:executionProperty:Job' :: Job -> Maybe ExecutionProperty
executionProperty} -> Maybe ExecutionProperty
executionProperty) (\s :: Job
s@Job' {} Maybe ExecutionProperty
a -> Job
s {$sel:executionProperty:Job' :: Maybe ExecutionProperty
executionProperty = Maybe ExecutionProperty
a} :: Job)

-- | This field is deprecated. Use @MaxCapacity@ instead.
--
-- The number of Glue data processing units (DPUs) allocated to runs of
-- this job. You can allocate from 2 to 100 DPUs; 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>.
job_allocatedCapacity :: Lens.Lens' Job (Prelude.Maybe Prelude.Int)
job_allocatedCapacity :: (Maybe Int -> f (Maybe Int)) -> Job -> f Job
job_allocatedCapacity = (Job -> Maybe Int)
-> (Job -> Maybe Int -> Job)
-> Lens Job Job (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Int
allocatedCapacity :: Maybe Int
$sel:allocatedCapacity:Job' :: Job -> Maybe Int
allocatedCapacity} -> Maybe Int
allocatedCapacity) (\s :: Job
s@Job' {} Maybe Int
a -> Job
s {$sel:allocatedCapacity:Job' :: Maybe Int
allocatedCapacity = Maybe Int
a} :: Job)

-- | For Glue version 1.0 or earlier jobs, using the standard worker type,
-- 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, an Apache Spark ETL job, or an Apache
-- Spark streaming 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\") or Apache Spark streaming ETL job
--     (@JobCommand.Name@=\"gluestreaming\"), you can allocate from 2 to
--     100 DPUs. The default is 10 DPUs. This job type cannot have a
--     fractional DPU allocation.
--
-- For Glue version 2.0 jobs, you cannot instead specify a
-- @Maximum capacity@. Instead, you should specify a @Worker type@ and the
-- @Number of workers@.
job_maxCapacity :: Lens.Lens' Job (Prelude.Maybe Prelude.Double)
job_maxCapacity :: (Maybe Double -> f (Maybe Double)) -> Job -> f Job
job_maxCapacity = (Job -> Maybe Double)
-> (Job -> Maybe Double -> Job)
-> Lens Job Job (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Double
maxCapacity :: Maybe Double
$sel:maxCapacity:Job' :: Job -> Maybe Double
maxCapacity} -> Maybe Double
maxCapacity) (\s :: Job
s@Job' {} Maybe Double
a -> Job
s {$sel:maxCapacity:Job' :: Maybe Double
maxCapacity = Maybe Double
a} :: Job)

-- | The job timeout in minutes. This is the maximum time that a job run can
-- consume resources before it is terminated and enters @TIMEOUT@ status.
-- The default is 2,880 minutes (48 hours).
job_timeout :: Lens.Lens' Job (Prelude.Maybe Prelude.Natural)
job_timeout :: (Maybe Natural -> f (Maybe Natural)) -> Job -> f Job
job_timeout = (Job -> Maybe Natural)
-> (Job -> Maybe Natural -> Job)
-> Lens Job Job (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Natural
timeout :: Maybe Natural
$sel:timeout:Job' :: Job -> Maybe Natural
timeout} -> Maybe Natural
timeout) (\s :: Job
s@Job' {} Maybe Natural
a -> Job
s {$sel:timeout:Job' :: Maybe Natural
timeout = Maybe Natural
a} :: Job)

-- | The default arguments for this job, specified as name-value pairs.
--
-- 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.
job_defaultArguments :: Lens.Lens' Job (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
job_defaultArguments :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job -> f Job
job_defaultArguments = (Job -> Maybe (HashMap Text Text))
-> (Job -> Maybe (HashMap Text Text) -> Job)
-> Lens
     Job Job (Maybe (HashMap Text Text)) (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe (HashMap Text Text)
defaultArguments :: Maybe (HashMap Text Text)
$sel:defaultArguments:Job' :: Job -> Maybe (HashMap Text Text)
defaultArguments} -> Maybe (HashMap Text Text)
defaultArguments) (\s :: Job
s@Job' {} Maybe (HashMap Text Text)
a -> Job
s {$sel:defaultArguments:Job' :: Maybe (HashMap Text Text)
defaultArguments = Maybe (HashMap Text Text)
a} :: Job) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Job -> f Job)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A description of the job.
job_description :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_description :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_description = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
description :: Maybe Text
$sel:description:Job' :: Job -> Maybe Text
description} -> Maybe Text
description) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:description:Job' :: Maybe Text
description = Maybe Text
a} :: Job)

-- | The time and date that this job definition was created.
job_createdOn :: Lens.Lens' Job (Prelude.Maybe Prelude.UTCTime)
job_createdOn :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Job -> f Job
job_createdOn = (Job -> Maybe POSIX)
-> (Job -> Maybe POSIX -> Job)
-> Lens Job Job (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe POSIX
createdOn :: Maybe POSIX
$sel:createdOn:Job' :: Job -> Maybe POSIX
createdOn} -> Maybe POSIX
createdOn) (\s :: Job
s@Job' {} Maybe POSIX
a -> Job
s {$sel:createdOn:Job' :: Maybe POSIX
createdOn = Maybe POSIX
a} :: Job) ((Maybe POSIX -> f (Maybe POSIX)) -> Job -> f Job)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Job
-> f Job
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

instance Core.FromJSON Job where
  parseJSON :: Value -> Parser Job
parseJSON =
    String -> (Object -> Parser Job) -> Value -> Parser Job
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Job"
      ( \Object
x ->
          Maybe Int
-> Maybe JobCommand
-> Maybe NotificationProperty
-> Maybe POSIX
-> Maybe ConnectionsList
-> Maybe WorkerType
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe ExecutionProperty
-> Maybe Int
-> Maybe Double
-> Maybe Natural
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe POSIX
-> Job
Job'
            (Maybe Int
 -> Maybe JobCommand
 -> Maybe NotificationProperty
 -> Maybe POSIX
 -> Maybe ConnectionsList
 -> Maybe WorkerType
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe ExecutionProperty
 -> Maybe Int
 -> Maybe Double
 -> Maybe Natural
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe POSIX
 -> Job)
-> Parser (Maybe Int)
-> Parser
     (Maybe JobCommand
      -> Maybe NotificationProperty
      -> Maybe POSIX
      -> Maybe ConnectionsList
      -> Maybe WorkerType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
forall (f :: * -> *) a b. Functor 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
"NumberOfWorkers")
            Parser
  (Maybe JobCommand
   -> Maybe NotificationProperty
   -> Maybe POSIX
   -> Maybe ConnectionsList
   -> Maybe WorkerType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe JobCommand)
-> Parser
     (Maybe NotificationProperty
      -> Maybe POSIX
      -> Maybe ConnectionsList
      -> Maybe WorkerType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobCommand)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Command")
            Parser
  (Maybe NotificationProperty
   -> Maybe POSIX
   -> Maybe ConnectionsList
   -> Maybe WorkerType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe NotificationProperty)
-> Parser
     (Maybe POSIX
      -> Maybe ConnectionsList
      -> Maybe WorkerType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NotificationProperty)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotificationProperty")
            Parser
  (Maybe POSIX
   -> Maybe ConnectionsList
   -> Maybe WorkerType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ConnectionsList
      -> Maybe WorkerType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
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
"LastModifiedOn")
            Parser
  (Maybe ConnectionsList
   -> Maybe WorkerType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe ConnectionsList)
-> Parser
     (Maybe WorkerType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConnectionsList)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Connections")
            Parser
  (Maybe WorkerType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe WorkerType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe WorkerType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WorkerType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
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
"SecurityConfiguration")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
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
"GlueVersion")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NonOverridableArguments"
                            Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
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
"Role")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
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
"Name")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
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
"LogUri")
            Parser
  (Maybe Int
   -> Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe Int)
-> Parser
     (Maybe ExecutionProperty
      -> Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
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
"MaxRetries")
            Parser
  (Maybe ExecutionProperty
   -> Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe ExecutionProperty)
-> Parser
     (Maybe Int
      -> Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExecutionProperty)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExecutionProperty")
            Parser
  (Maybe Int
   -> Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe Int)
-> Parser
     (Maybe Double
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Job)
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
"AllocatedCapacity")
            Parser
  (Maybe Double
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Job)
-> Parser (Maybe Double)
-> Parser
     (Maybe Natural
      -> Maybe (HashMap Text Text) -> Maybe Text -> Maybe POSIX -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxCapacity")
            Parser
  (Maybe Natural
   -> Maybe (HashMap Text Text) -> Maybe Text -> Maybe POSIX -> Job)
-> Parser (Maybe Natural)
-> Parser
     (Maybe (HashMap Text Text) -> Maybe Text -> Maybe POSIX -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Timeout")
            Parser
  (Maybe (HashMap Text Text) -> Maybe Text -> Maybe POSIX -> Job)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Text -> Maybe POSIX -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultArguments"
                            Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe Text -> Maybe POSIX -> Job)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> Job)
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
"Description")
            Parser (Maybe POSIX -> Job) -> Parser (Maybe POSIX) -> Parser Job
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
"CreatedOn")
      )

instance Prelude.Hashable Job

instance Prelude.NFData Job