{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.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
data Job = Job'
{
Job -> Maybe Int
numberOfWorkers :: Prelude.Maybe Prelude.Int,
Job -> Maybe JobCommand
command :: Prelude.Maybe JobCommand,
Job -> Maybe NotificationProperty
notificationProperty :: Prelude.Maybe NotificationProperty,
Job -> Maybe POSIX
lastModifiedOn :: Prelude.Maybe Core.POSIX,
Job -> Maybe ConnectionsList
connections :: Prelude.Maybe ConnectionsList,
Job -> Maybe WorkerType
workerType :: Prelude.Maybe WorkerType,
Job -> Maybe Text
securityConfiguration :: Prelude.Maybe Prelude.Text,
Job -> Maybe Text
glueVersion :: Prelude.Maybe Prelude.Text,
Job -> Maybe (HashMap Text Text)
nonOverridableArguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Job -> Maybe Text
role' :: Prelude.Maybe Prelude.Text,
Job -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Job -> Maybe Text
logUri :: Prelude.Maybe Prelude.Text,
Job -> Maybe Int
maxRetries :: Prelude.Maybe Prelude.Int,
Job -> Maybe ExecutionProperty
executionProperty :: Prelude.Maybe ExecutionProperty,
Job -> Maybe Int
allocatedCapacity :: Prelude.Maybe Prelude.Int,
Job -> Maybe Double
maxCapacity :: Prelude.Maybe Prelude.Double,
Job -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
Job -> Maybe (HashMap Text Text)
defaultArguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Job -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
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)
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
}
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)
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)
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)
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
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)
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)
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)
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)
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
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)
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)
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)
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)
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)
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)
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)
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)
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
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)
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