{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.DataBrew.Types.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.DataBrew.Types.Job where

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

-- | Represents all of the attributes of a DataBrew job.
--
-- /See:/ 'newJob' smart constructor.
data Job = Job'
  { -- | One or more artifacts that represent the Glue Data Catalog output from
    -- running the job.
    Job -> Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs :: Prelude.Maybe (Prelude.NonEmpty DataCatalogOutput),
    -- | The modification date and time of the job.
    Job -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time that the job was created.
    Job -> Maybe POSIX
createDate :: Prelude.Maybe Core.POSIX,
    -- | A set of steps that the job runs.
    Job -> Maybe RecipeReference
recipeReference :: Prelude.Maybe RecipeReference,
    -- | The Amazon Resource Name (ARN) of the user who created the job.
    Job -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | Represents a list of JDBC database output objects which defines the
    -- output destination for a DataBrew recipe job to write into.
    Job -> Maybe (NonEmpty DatabaseOutput)
databaseOutputs :: Prelude.Maybe (Prelude.NonEmpty DatabaseOutput),
    -- | The ID of the Amazon Web Services account that owns the job.
    Job -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | The encryption mode for the job, which can be one of the following:
    --
    -- -   @SSE-KMS@ - Server-side encryption with keys managed by KMS.
    --
    -- -   @SSE-S3@ - Server-side encryption with keys managed by Amazon S3.
    Job -> Maybe EncryptionMode
encryptionMode :: Prelude.Maybe EncryptionMode,
    -- | One or more artifacts that represent output from running the job.
    Job -> Maybe (NonEmpty Output)
outputs :: Prelude.Maybe (Prelude.NonEmpty Output),
    -- | The unique Amazon Resource Name (ARN) for the job.
    Job -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | The current status of Amazon CloudWatch logging for the job.
    Job -> Maybe LogSubscription
logSubscription :: Prelude.Maybe LogSubscription,
    -- | The name of the project that the job is associated with.
    Job -> Maybe Text
projectName :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of times to retry the job after a job run fails.
    Job -> Maybe Natural
maxRetries :: Prelude.Maybe Prelude.Natural,
    -- | A dataset that the job is to process.
    Job -> Maybe Text
datasetName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of an encryption key that is used to
    -- protect the job output. For more information, see
    -- <https://docs.aws.amazon.com/databrew/latest/dg/encryption-security-configuration.html Encrypting data written by DataBrew jobs>
    Job -> Maybe Text
encryptionKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of nodes that can be consumed when the job processes
    -- data.
    Job -> Maybe Int
maxCapacity :: Prelude.Maybe Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the user who last modified the job.
    Job -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | The job type of the job, which must be one of the following:
    --
    -- -   @PROFILE@ - A job to analyze a dataset, to determine its size, data
    --     types, data distribution, and more.
    --
    -- -   @RECIPE@ - A job to apply one or more transformations to a dataset.
    Job -> Maybe JobType
type' :: Prelude.Maybe JobType,
    -- | The job\'s timeout in minutes. A job that attempts to run longer than
    -- this timeout period ends with a status of @TIMEOUT@.
    Job -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
    -- | Metadata tags that have been applied to the job.
    Job -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the role to be assumed for this job.
    Job -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | A sample configuration for profile jobs only, which determines the
    -- number of rows on which the profile job is run. If a @JobSample@ value
    -- isn\'t provided, the default value is used. The default value is
    -- CUSTOM_ROWS for the mode parameter and 20,000 for the size parameter.
    Job -> Maybe JobSample
jobSample :: Prelude.Maybe JobSample,
    -- | The unique name of the job.
    Job -> Text
name :: Prelude.Text
  }
  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:
--
-- 'dataCatalogOutputs', 'job_dataCatalogOutputs' - One or more artifacts that represent the Glue Data Catalog output from
-- running the job.
--
-- 'lastModifiedDate', 'job_lastModifiedDate' - The modification date and time of the job.
--
-- 'createDate', 'job_createDate' - The date and time that the job was created.
--
-- 'recipeReference', 'job_recipeReference' - A set of steps that the job runs.
--
-- 'createdBy', 'job_createdBy' - The Amazon Resource Name (ARN) of the user who created the job.
--
-- 'databaseOutputs', 'job_databaseOutputs' - Represents a list of JDBC database output objects which defines the
-- output destination for a DataBrew recipe job to write into.
--
-- 'accountId', 'job_accountId' - The ID of the Amazon Web Services account that owns the job.
--
-- 'encryptionMode', 'job_encryptionMode' - The encryption mode for the job, which can be one of the following:
--
-- -   @SSE-KMS@ - Server-side encryption with keys managed by KMS.
--
-- -   @SSE-S3@ - Server-side encryption with keys managed by Amazon S3.
--
-- 'outputs', 'job_outputs' - One or more artifacts that represent output from running the job.
--
-- 'resourceArn', 'job_resourceArn' - The unique Amazon Resource Name (ARN) for the job.
--
-- 'logSubscription', 'job_logSubscription' - The current status of Amazon CloudWatch logging for the job.
--
-- 'projectName', 'job_projectName' - The name of the project that the job is associated with.
--
-- 'maxRetries', 'job_maxRetries' - The maximum number of times to retry the job after a job run fails.
--
-- 'datasetName', 'job_datasetName' - A dataset that the job is to process.
--
-- 'encryptionKeyArn', 'job_encryptionKeyArn' - The Amazon Resource Name (ARN) of an encryption key that is used to
-- protect the job output. For more information, see
-- <https://docs.aws.amazon.com/databrew/latest/dg/encryption-security-configuration.html Encrypting data written by DataBrew jobs>
--
-- 'maxCapacity', 'job_maxCapacity' - The maximum number of nodes that can be consumed when the job processes
-- data.
--
-- 'lastModifiedBy', 'job_lastModifiedBy' - The Amazon Resource Name (ARN) of the user who last modified the job.
--
-- 'type'', 'job_type' - The job type of the job, which must be one of the following:
--
-- -   @PROFILE@ - A job to analyze a dataset, to determine its size, data
--     types, data distribution, and more.
--
-- -   @RECIPE@ - A job to apply one or more transformations to a dataset.
--
-- 'timeout', 'job_timeout' - The job\'s timeout in minutes. A job that attempts to run longer than
-- this timeout period ends with a status of @TIMEOUT@.
--
-- 'tags', 'job_tags' - Metadata tags that have been applied to the job.
--
-- 'roleArn', 'job_roleArn' - The Amazon Resource Name (ARN) of the role to be assumed for this job.
--
-- 'jobSample', 'job_jobSample' - A sample configuration for profile jobs only, which determines the
-- number of rows on which the profile job is run. If a @JobSample@ value
-- isn\'t provided, the default value is used. The default value is
-- CUSTOM_ROWS for the mode parameter and 20,000 for the size parameter.
--
-- 'name', 'job_name' - The unique name of the job.
newJob ::
  -- | 'name'
  Prelude.Text ->
  Job
newJob :: Text -> Job
newJob Text
pName_ =
  Job' :: Maybe (NonEmpty DataCatalogOutput)
-> Maybe POSIX
-> Maybe POSIX
-> Maybe RecipeReference
-> Maybe Text
-> Maybe (NonEmpty DatabaseOutput)
-> Maybe Text
-> Maybe EncryptionMode
-> Maybe (NonEmpty Output)
-> Maybe Text
-> Maybe LogSubscription
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe JobType
-> Maybe Natural
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe JobSample
-> Text
-> Job
Job'
    { $sel:dataCatalogOutputs:Job' :: Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs = Maybe (NonEmpty DataCatalogOutput)
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:Job' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createDate:Job' :: Maybe POSIX
createDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:recipeReference:Job' :: Maybe RecipeReference
recipeReference = Maybe RecipeReference
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:Job' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseOutputs:Job' :: Maybe (NonEmpty DatabaseOutput)
databaseOutputs = Maybe (NonEmpty DatabaseOutput)
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:Job' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionMode:Job' :: Maybe EncryptionMode
encryptionMode = Maybe EncryptionMode
forall a. Maybe a
Prelude.Nothing,
      $sel:outputs:Job' :: Maybe (NonEmpty Output)
outputs = Maybe (NonEmpty Output)
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:Job' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logSubscription:Job' :: Maybe LogSubscription
logSubscription = Maybe LogSubscription
forall a. Maybe a
Prelude.Nothing,
      $sel:projectName:Job' :: Maybe Text
projectName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRetries:Job' :: Maybe Natural
maxRetries = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetName:Job' :: Maybe Text
datasetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionKeyArn:Job' :: Maybe Text
encryptionKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxCapacity:Job' :: Maybe Int
maxCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:Job' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Job' :: Maybe JobType
type' = Maybe JobType
forall a. Maybe a
Prelude.Nothing,
      $sel:timeout:Job' :: Maybe Natural
timeout = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Job' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:Job' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobSample:Job' :: Maybe JobSample
jobSample = Maybe JobSample
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Job' :: Text
name = Text
pName_
    }

-- | One or more artifacts that represent the Glue Data Catalog output from
-- running the job.
job_dataCatalogOutputs :: Lens.Lens' Job (Prelude.Maybe (Prelude.NonEmpty DataCatalogOutput))
job_dataCatalogOutputs :: (Maybe (NonEmpty DataCatalogOutput)
 -> f (Maybe (NonEmpty DataCatalogOutput)))
-> Job -> f Job
job_dataCatalogOutputs = (Job -> Maybe (NonEmpty DataCatalogOutput))
-> (Job -> Maybe (NonEmpty DataCatalogOutput) -> Job)
-> Lens
     Job
     Job
     (Maybe (NonEmpty DataCatalogOutput))
     (Maybe (NonEmpty DataCatalogOutput))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs :: Maybe (NonEmpty DataCatalogOutput)
$sel:dataCatalogOutputs:Job' :: Job -> Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs} -> Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs) (\s :: Job
s@Job' {} Maybe (NonEmpty DataCatalogOutput)
a -> Job
s {$sel:dataCatalogOutputs:Job' :: Maybe (NonEmpty DataCatalogOutput)
dataCatalogOutputs = Maybe (NonEmpty DataCatalogOutput)
a} :: Job) ((Maybe (NonEmpty DataCatalogOutput)
  -> f (Maybe (NonEmpty DataCatalogOutput)))
 -> Job -> f Job)
-> ((Maybe (NonEmpty DataCatalogOutput)
     -> f (Maybe (NonEmpty DataCatalogOutput)))
    -> Maybe (NonEmpty DataCatalogOutput)
    -> f (Maybe (NonEmpty DataCatalogOutput)))
-> (Maybe (NonEmpty DataCatalogOutput)
    -> f (Maybe (NonEmpty DataCatalogOutput)))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
-> Iso
     (Maybe (NonEmpty DataCatalogOutput))
     (Maybe (NonEmpty DataCatalogOutput))
     (Maybe (NonEmpty DataCatalogOutput))
     (Maybe (NonEmpty DataCatalogOutput))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
  (NonEmpty DataCatalogOutput)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The modification date and time of the job.
job_lastModifiedDate :: Lens.Lens' Job (Prelude.Maybe Prelude.UTCTime)
job_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Job -> f Job
job_lastModifiedDate = (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
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:Job' :: Job -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: Job
s@Job' {} Maybe POSIX
a -> Job
s {$sel:lastModifiedDate:Job' :: Maybe POSIX
lastModifiedDate = 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 date and time that the job was created.
job_createDate :: Lens.Lens' Job (Prelude.Maybe Prelude.UTCTime)
job_createDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Job -> f Job
job_createDate = (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
createDate :: Maybe POSIX
$sel:createDate:Job' :: Job -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: Job
s@Job' {} Maybe POSIX
a -> Job
s {$sel:createDate:Job' :: Maybe POSIX
createDate = 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

-- | A set of steps that the job runs.
job_recipeReference :: Lens.Lens' Job (Prelude.Maybe RecipeReference)
job_recipeReference :: (Maybe RecipeReference -> f (Maybe RecipeReference))
-> Job -> f Job
job_recipeReference = (Job -> Maybe RecipeReference)
-> (Job -> Maybe RecipeReference -> Job)
-> Lens Job Job (Maybe RecipeReference) (Maybe RecipeReference)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe RecipeReference
recipeReference :: Maybe RecipeReference
$sel:recipeReference:Job' :: Job -> Maybe RecipeReference
recipeReference} -> Maybe RecipeReference
recipeReference) (\s :: Job
s@Job' {} Maybe RecipeReference
a -> Job
s {$sel:recipeReference:Job' :: Maybe RecipeReference
recipeReference = Maybe RecipeReference
a} :: Job)

-- | The Amazon Resource Name (ARN) of the user who created the job.
job_createdBy :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_createdBy :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_createdBy = (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
createdBy :: Maybe Text
$sel:createdBy:Job' :: Job -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:createdBy:Job' :: Maybe Text
createdBy = Maybe Text
a} :: Job)

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

-- | The ID of the Amazon Web Services account that owns the job.
job_accountId :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_accountId :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_accountId = (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
accountId :: Maybe Text
$sel:accountId:Job' :: Job -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:accountId:Job' :: Maybe Text
accountId = Maybe Text
a} :: Job)

-- | The encryption mode for the job, which can be one of the following:
--
-- -   @SSE-KMS@ - Server-side encryption with keys managed by KMS.
--
-- -   @SSE-S3@ - Server-side encryption with keys managed by Amazon S3.
job_encryptionMode :: Lens.Lens' Job (Prelude.Maybe EncryptionMode)
job_encryptionMode :: (Maybe EncryptionMode -> f (Maybe EncryptionMode)) -> Job -> f Job
job_encryptionMode = (Job -> Maybe EncryptionMode)
-> (Job -> Maybe EncryptionMode -> Job)
-> Lens Job Job (Maybe EncryptionMode) (Maybe EncryptionMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe EncryptionMode
encryptionMode :: Maybe EncryptionMode
$sel:encryptionMode:Job' :: Job -> Maybe EncryptionMode
encryptionMode} -> Maybe EncryptionMode
encryptionMode) (\s :: Job
s@Job' {} Maybe EncryptionMode
a -> Job
s {$sel:encryptionMode:Job' :: Maybe EncryptionMode
encryptionMode = Maybe EncryptionMode
a} :: Job)

-- | One or more artifacts that represent output from running the job.
job_outputs :: Lens.Lens' Job (Prelude.Maybe (Prelude.NonEmpty Output))
job_outputs :: (Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
-> Job -> f Job
job_outputs = (Job -> Maybe (NonEmpty Output))
-> (Job -> Maybe (NonEmpty Output) -> Job)
-> Lens Job Job (Maybe (NonEmpty Output)) (Maybe (NonEmpty Output))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe (NonEmpty Output)
outputs :: Maybe (NonEmpty Output)
$sel:outputs:Job' :: Job -> Maybe (NonEmpty Output)
outputs} -> Maybe (NonEmpty Output)
outputs) (\s :: Job
s@Job' {} Maybe (NonEmpty Output)
a -> Job
s {$sel:outputs:Job' :: Maybe (NonEmpty Output)
outputs = Maybe (NonEmpty Output)
a} :: Job) ((Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
 -> Job -> f Job)
-> ((Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
    -> Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
-> (Maybe (NonEmpty Output) -> f (Maybe (NonEmpty Output)))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Output)
  (NonEmpty Output)
  (NonEmpty Output)
  (NonEmpty Output)
-> Iso
     (Maybe (NonEmpty Output))
     (Maybe (NonEmpty Output))
     (Maybe (NonEmpty Output))
     (Maybe (NonEmpty Output))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty Output)
  (NonEmpty Output)
  (NonEmpty Output)
  (NonEmpty Output)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique Amazon Resource Name (ARN) for the job.
job_resourceArn :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_resourceArn :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_resourceArn = (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
resourceArn :: Maybe Text
$sel:resourceArn:Job' :: Job -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:resourceArn:Job' :: Maybe Text
resourceArn = Maybe Text
a} :: Job)

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

-- | The name of the project that the job is associated with.
job_projectName :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_projectName :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_projectName = (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
projectName :: Maybe Text
$sel:projectName:Job' :: Job -> Maybe Text
projectName} -> Maybe Text
projectName) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:projectName:Job' :: Maybe Text
projectName = Maybe Text
a} :: Job)

-- | The maximum number of times to retry the job after a job run fails.
job_maxRetries :: Lens.Lens' Job (Prelude.Maybe Prelude.Natural)
job_maxRetries :: (Maybe Natural -> f (Maybe Natural)) -> Job -> f Job
job_maxRetries = (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
maxRetries :: Maybe Natural
$sel:maxRetries:Job' :: Job -> Maybe Natural
maxRetries} -> Maybe Natural
maxRetries) (\s :: Job
s@Job' {} Maybe Natural
a -> Job
s {$sel:maxRetries:Job' :: Maybe Natural
maxRetries = Maybe Natural
a} :: Job)

-- | A dataset that the job is to process.
job_datasetName :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_datasetName :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_datasetName = (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
datasetName :: Maybe Text
$sel:datasetName:Job' :: Job -> Maybe Text
datasetName} -> Maybe Text
datasetName) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:datasetName:Job' :: Maybe Text
datasetName = Maybe Text
a} :: Job)

-- | The Amazon Resource Name (ARN) of an encryption key that is used to
-- protect the job output. For more information, see
-- <https://docs.aws.amazon.com/databrew/latest/dg/encryption-security-configuration.html Encrypting data written by DataBrew jobs>
job_encryptionKeyArn :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_encryptionKeyArn :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_encryptionKeyArn = (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
encryptionKeyArn :: Maybe Text
$sel:encryptionKeyArn:Job' :: Job -> Maybe Text
encryptionKeyArn} -> Maybe Text
encryptionKeyArn) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:encryptionKeyArn:Job' :: Maybe Text
encryptionKeyArn = Maybe Text
a} :: Job)

-- | The maximum number of nodes that can be consumed when the job processes
-- data.
job_maxCapacity :: Lens.Lens' Job (Prelude.Maybe Prelude.Int)
job_maxCapacity :: (Maybe Int -> f (Maybe Int)) -> Job -> f Job
job_maxCapacity = (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
maxCapacity :: Maybe Int
$sel:maxCapacity:Job' :: Job -> Maybe Int
maxCapacity} -> Maybe Int
maxCapacity) (\s :: Job
s@Job' {} Maybe Int
a -> Job
s {$sel:maxCapacity:Job' :: Maybe Int
maxCapacity = Maybe Int
a} :: Job)

-- | The Amazon Resource Name (ARN) of the user who last modified the job.
job_lastModifiedBy :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_lastModifiedBy :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_lastModifiedBy = (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
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:Job' :: Job -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:lastModifiedBy:Job' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: Job)

-- | The job type of the job, which must be one of the following:
--
-- -   @PROFILE@ - A job to analyze a dataset, to determine its size, data
--     types, data distribution, and more.
--
-- -   @RECIPE@ - A job to apply one or more transformations to a dataset.
job_type :: Lens.Lens' Job (Prelude.Maybe JobType)
job_type :: (Maybe JobType -> f (Maybe JobType)) -> Job -> f Job
job_type = (Job -> Maybe JobType)
-> (Job -> Maybe JobType -> Job)
-> Lens Job Job (Maybe JobType) (Maybe JobType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobType
type' :: Maybe JobType
$sel:type':Job' :: Job -> Maybe JobType
type'} -> Maybe JobType
type') (\s :: Job
s@Job' {} Maybe JobType
a -> Job
s {$sel:type':Job' :: Maybe JobType
type' = Maybe JobType
a} :: Job)

-- | The job\'s timeout in minutes. A job that attempts to run longer than
-- this timeout period ends with a status of @TIMEOUT@.
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)

-- | Metadata tags that have been applied to the job.
job_tags :: Lens.Lens' Job (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
job_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job -> f Job
job_tags = (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)
tags :: Maybe (HashMap Text Text)
$sel:tags:Job' :: Job -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Job
s@Job' {} Maybe (HashMap Text Text)
a -> Job
s {$sel:tags:Job' :: Maybe (HashMap Text Text)
tags = 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 Amazon Resource Name (ARN) of the role to be assumed for this job.
job_roleArn :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_roleArn :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_roleArn = (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
roleArn :: Maybe Text
$sel:roleArn:Job' :: Job -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:roleArn:Job' :: Maybe Text
roleArn = Maybe Text
a} :: Job)

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

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

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 (NonEmpty DataCatalogOutput)
-> Maybe POSIX
-> Maybe POSIX
-> Maybe RecipeReference
-> Maybe Text
-> Maybe (NonEmpty DatabaseOutput)
-> Maybe Text
-> Maybe EncryptionMode
-> Maybe (NonEmpty Output)
-> Maybe Text
-> Maybe LogSubscription
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe JobType
-> Maybe Natural
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe JobSample
-> Text
-> Job
Job'
            (Maybe (NonEmpty DataCatalogOutput)
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe RecipeReference
 -> Maybe Text
 -> Maybe (NonEmpty DatabaseOutput)
 -> Maybe Text
 -> Maybe EncryptionMode
 -> Maybe (NonEmpty Output)
 -> Maybe Text
 -> Maybe LogSubscription
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe JobType
 -> Maybe Natural
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe JobSample
 -> Text
 -> Job)
-> Parser (Maybe (NonEmpty DataCatalogOutput))
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe RecipeReference
      -> Maybe Text
      -> Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe EncryptionMode
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> Job)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (NonEmpty DataCatalogOutput))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataCatalogOutputs")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe RecipeReference
   -> Maybe Text
   -> Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe EncryptionMode
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe RecipeReference
      -> Maybe Text
      -> Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe EncryptionMode
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"LastModifiedDate")
            Parser
  (Maybe POSIX
   -> Maybe RecipeReference
   -> Maybe Text
   -> Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe EncryptionMode
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe RecipeReference
      -> Maybe Text
      -> Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe EncryptionMode
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"CreateDate")
            Parser
  (Maybe RecipeReference
   -> Maybe Text
   -> Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe EncryptionMode
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe RecipeReference)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe EncryptionMode
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RecipeReference)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecipeReference")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe EncryptionMode
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty DatabaseOutput)
      -> Maybe Text
      -> Maybe EncryptionMode
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"CreatedBy")
            Parser
  (Maybe (NonEmpty DatabaseOutput)
   -> Maybe Text
   -> Maybe EncryptionMode
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe (NonEmpty DatabaseOutput))
-> Parser
     (Maybe Text
      -> Maybe EncryptionMode
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty DatabaseOutput))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DatabaseOutputs")
            Parser
  (Maybe Text
   -> Maybe EncryptionMode
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe EncryptionMode
      -> Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"AccountId")
            Parser
  (Maybe EncryptionMode
   -> Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe EncryptionMode)
-> Parser
     (Maybe (NonEmpty Output)
      -> Maybe Text
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EncryptionMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EncryptionMode")
            Parser
  (Maybe (NonEmpty Output)
   -> Maybe Text
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe (NonEmpty Output))
-> Parser
     (Maybe Text
      -> Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Output))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Outputs")
            Parser
  (Maybe Text
   -> Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe LogSubscription
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"ResourceArn")
            Parser
  (Maybe LogSubscription
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe LogSubscription)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LogSubscription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LogSubscription")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"ProjectName")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"MaxRetries")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"DatasetName")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"EncryptionKeyArn")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"MaxCapacity")
            Parser
  (Maybe Text
   -> Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe JobType
      -> Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> 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
"LastModifiedBy")
            Parser
  (Maybe JobType
   -> Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe JobType)
-> Parser
     (Maybe Natural
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe JobSample
      -> Text
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser
  (Maybe Natural
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe JobSample
   -> Text
   -> Job)
-> Parser (Maybe Natural)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text -> Maybe JobSample -> Text -> 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 JobSample -> Text -> Job)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Text -> Maybe JobSample -> Text -> 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
"Tags" 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 JobSample -> Text -> Job)
-> Parser (Maybe Text) -> Parser (Maybe JobSample -> Text -> 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
"RoleArn")
            Parser (Maybe JobSample -> Text -> Job)
-> Parser (Maybe JobSample) -> Parser (Text -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobSample)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobSample")
            Parser (Text -> Job) -> Parser Text -> Parser Job
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
      )

instance Prelude.Hashable Job

instance Prelude.NFData Job