{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.CreateJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new job definition.
module Amazonka.Glue.CreateJob
  ( -- * Creating a Request
    CreateJob (..),
    newCreateJob,

    -- * Request Lenses
    createJob_allocatedCapacity,
    createJob_codeGenConfigurationNodes,
    createJob_connections,
    createJob_defaultArguments,
    createJob_description,
    createJob_executionClass,
    createJob_executionProperty,
    createJob_glueVersion,
    createJob_logUri,
    createJob_maxCapacity,
    createJob_maxRetries,
    createJob_nonOverridableArguments,
    createJob_notificationProperty,
    createJob_numberOfWorkers,
    createJob_securityConfiguration,
    createJob_sourceControlDetails,
    createJob_tags,
    createJob_timeout,
    createJob_workerType,
    createJob_name,
    createJob_role,
    createJob_command,

    -- * Destructuring the Response
    CreateJobResponse (..),
    newCreateJobResponse,

    -- * Response Lenses
    createJobResponse_name,
    createJobResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateJob' smart constructor.
data CreateJob = CreateJob'
  { -- | This parameter is deprecated. Use @MaxCapacity@ instead.
    --
    -- The number of Glue data processing units (DPUs) to allocate to this Job.
    -- You can allocate a minimum of 2 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>.
    CreateJob -> Maybe Int
allocatedCapacity :: Prelude.Maybe Prelude.Int,
    -- | The representation of a directed acyclic graph on which both the Glue
    -- Studio visual component and Glue Studio code generation is based.
    CreateJob
-> Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
codeGenConfigurationNodes :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text CodeGenConfigurationNode)),
    -- | The connections used for this job.
    CreateJob -> Maybe ConnectionsList
connections :: Prelude.Maybe ConnectionsList,
    -- | The default arguments for this job.
    --
    -- You can specify arguments here that your own job-execution script
    -- consumes, as well as arguments that Glue itself consumes.
    --
    -- Job arguments may be logged. Do not pass plaintext secrets as arguments.
    -- Retrieve secrets from a Glue Connection, Secrets Manager or other secret
    -- management mechanism if you intend to keep them within the Job.
    --
    -- 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.
    CreateJob -> Maybe (HashMap Text Text)
defaultArguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Description of the job being defined.
    CreateJob -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the job is run with a standard or flexible execution
    -- class. The standard execution-class is ideal for time-sensitive
    -- workloads that require fast job startup and dedicated resources.
    --
    -- The flexible execution class is appropriate for time-insensitive jobs
    -- whose start and completion times may vary.
    --
    -- Only jobs with Glue version 3.0 and above and command type @glueetl@
    -- will be allowed to set @ExecutionClass@ to @FLEX@. The flexible
    -- execution class is available for Spark jobs.
    CreateJob -> Maybe ExecutionClass
executionClass :: Prelude.Maybe ExecutionClass,
    -- | An @ExecutionProperty@ specifying the maximum number of concurrent runs
    -- allowed for this job.
    CreateJob -> Maybe ExecutionProperty
executionProperty :: Prelude.Maybe ExecutionProperty,
    -- | 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.
    CreateJob -> Maybe Text
glueVersion :: Prelude.Maybe Prelude.Text,
    -- | This field is reserved for future use.
    CreateJob -> Maybe Text
logUri :: Prelude.Maybe Prelude.Text,
    -- | 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 or an Apache Spark ETL job:
    --
    -- -   When you specify a Python shell job
    --     (@JobCommand.Name@=\"pythonshell\"), you can allocate either 0.0625
    --     or 1 DPU. The default is 0.0625 DPU.
    --
    -- -   When you specify an Apache Spark ETL job
    --     (@JobCommand.Name@=\"glueetl\") or Apache Spark streaming ETL job
    --     (@JobCommand.Name@=\"gluestreaming\"), you can allocate a minimum of
    --     2 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@.
    CreateJob -> Maybe Double
maxCapacity :: Prelude.Maybe Prelude.Double,
    -- | The maximum number of times to retry this job if it fails.
    CreateJob -> Maybe Int
maxRetries :: Prelude.Maybe Prelude.Int,
    -- | Non-overridable arguments for this job, specified as name-value pairs.
    CreateJob -> Maybe (HashMap Text Text)
nonOverridableArguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Specifies configuration properties of a job notification.
    CreateJob -> Maybe NotificationProperty
notificationProperty :: Prelude.Maybe NotificationProperty,
    -- | The number of workers of a defined @workerType@ that are allocated when
    -- a job runs.
    CreateJob -> Maybe Int
numberOfWorkers :: Prelude.Maybe Prelude.Int,
    -- | The name of the @SecurityConfiguration@ structure to be used with this
    -- job.
    CreateJob -> Maybe Text
securityConfiguration :: Prelude.Maybe Prelude.Text,
    -- | The details for a source control configuration for a job, allowing
    -- synchronization of job artifacts to or from a remote repository.
    CreateJob -> Maybe SourceControlDetails
sourceControlDetails :: Prelude.Maybe SourceControlDetails,
    -- | The tags to use with this job. You may use tags to limit access to the
    -- job. For more information about tags in Glue, see
    -- <https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html Amazon Web Services Tags in Glue>
    -- in the developer guide.
    CreateJob -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | 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).
    CreateJob -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
    -- | The type of predefined worker that is allocated when a job runs. Accepts
    -- a value of Standard, G.1X, G.2X, or G.025X.
    --
    -- -   For the @Standard@ worker type, each worker provides 4 vCPU, 16 GB
    --     of memory and a 50GB disk, and 2 executors per worker.
    --
    -- -   For the @G.1X@ worker type, each worker 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.
    --
    -- -   For the @G.025X@ worker type, each worker maps to 0.25 DPU (2 vCPU,
    --     4 GB of memory, 64 GB disk), and provides 1 executor per worker. We
    --     recommend this worker type for low volume streaming jobs. This
    --     worker type is only available for Glue version 3.0 streaming jobs.
    CreateJob -> Maybe WorkerType
workerType :: Prelude.Maybe WorkerType,
    -- | The name you assign to this job definition. It must be unique in your
    -- account.
    CreateJob -> Text
name :: Prelude.Text,
    -- | The name or Amazon Resource Name (ARN) of the IAM role associated with
    -- this job.
    CreateJob -> Text
role' :: Prelude.Text,
    -- | The @JobCommand@ that runs this job.
    CreateJob -> JobCommand
command :: JobCommand
  }
  deriving (CreateJob -> CreateJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJob -> CreateJob -> Bool
$c/= :: CreateJob -> CreateJob -> Bool
== :: CreateJob -> CreateJob -> Bool
$c== :: CreateJob -> CreateJob -> Bool
Prelude.Eq, Int -> CreateJob -> ShowS
[CreateJob] -> ShowS
CreateJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJob] -> ShowS
$cshowList :: [CreateJob] -> ShowS
show :: CreateJob -> String
$cshow :: CreateJob -> String
showsPrec :: Int -> CreateJob -> ShowS
$cshowsPrec :: Int -> CreateJob -> ShowS
Prelude.Show, forall x. Rep CreateJob x -> CreateJob
forall x. CreateJob -> Rep CreateJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJob x -> CreateJob
$cfrom :: forall x. CreateJob -> Rep CreateJob x
Prelude.Generic)

-- |
-- Create a value of 'CreateJob' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'allocatedCapacity', 'createJob_allocatedCapacity' - This parameter is deprecated. Use @MaxCapacity@ instead.
--
-- The number of Glue data processing units (DPUs) to allocate to this Job.
-- You can allocate a minimum of 2 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>.
--
-- 'codeGenConfigurationNodes', 'createJob_codeGenConfigurationNodes' - The representation of a directed acyclic graph on which both the Glue
-- Studio visual component and Glue Studio code generation is based.
--
-- 'connections', 'createJob_connections' - The connections used for this job.
--
-- 'defaultArguments', 'createJob_defaultArguments' - The default arguments for this job.
--
-- You can specify arguments here that your own job-execution script
-- consumes, as well as arguments that Glue itself consumes.
--
-- Job arguments may be logged. Do not pass plaintext secrets as arguments.
-- Retrieve secrets from a Glue Connection, Secrets Manager or other secret
-- management mechanism if you intend to keep them within the Job.
--
-- 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', 'createJob_description' - Description of the job being defined.
--
-- 'executionClass', 'createJob_executionClass' - Indicates whether the job is run with a standard or flexible execution
-- class. The standard execution-class is ideal for time-sensitive
-- workloads that require fast job startup and dedicated resources.
--
-- The flexible execution class is appropriate for time-insensitive jobs
-- whose start and completion times may vary.
--
-- Only jobs with Glue version 3.0 and above and command type @glueetl@
-- will be allowed to set @ExecutionClass@ to @FLEX@. The flexible
-- execution class is available for Spark jobs.
--
-- 'executionProperty', 'createJob_executionProperty' - An @ExecutionProperty@ specifying the maximum number of concurrent runs
-- allowed for this job.
--
-- 'glueVersion', 'createJob_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.
--
-- 'logUri', 'createJob_logUri' - This field is reserved for future use.
--
-- 'maxCapacity', 'createJob_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 or an Apache Spark ETL job:
--
-- -   When you specify a Python shell job
--     (@JobCommand.Name@=\"pythonshell\"), you can allocate either 0.0625
--     or 1 DPU. The default is 0.0625 DPU.
--
-- -   When you specify an Apache Spark ETL job
--     (@JobCommand.Name@=\"glueetl\") or Apache Spark streaming ETL job
--     (@JobCommand.Name@=\"gluestreaming\"), you can allocate a minimum of
--     2 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@.
--
-- 'maxRetries', 'createJob_maxRetries' - The maximum number of times to retry this job if it fails.
--
-- 'nonOverridableArguments', 'createJob_nonOverridableArguments' - Non-overridable arguments for this job, specified as name-value pairs.
--
-- 'notificationProperty', 'createJob_notificationProperty' - Specifies configuration properties of a job notification.
--
-- 'numberOfWorkers', 'createJob_numberOfWorkers' - The number of workers of a defined @workerType@ that are allocated when
-- a job runs.
--
-- 'securityConfiguration', 'createJob_securityConfiguration' - The name of the @SecurityConfiguration@ structure to be used with this
-- job.
--
-- 'sourceControlDetails', 'createJob_sourceControlDetails' - The details for a source control configuration for a job, allowing
-- synchronization of job artifacts to or from a remote repository.
--
-- 'tags', 'createJob_tags' - The tags to use with this job. You may use tags to limit access to the
-- job. For more information about tags in Glue, see
-- <https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html Amazon Web Services Tags in Glue>
-- in the developer guide.
--
-- 'timeout', 'createJob_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).
--
-- 'workerType', 'createJob_workerType' - The type of predefined worker that is allocated when a job runs. Accepts
-- a value of Standard, G.1X, G.2X, or G.025X.
--
-- -   For the @Standard@ worker type, each worker provides 4 vCPU, 16 GB
--     of memory and a 50GB disk, and 2 executors per worker.
--
-- -   For the @G.1X@ worker type, each worker 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.
--
-- -   For the @G.025X@ worker type, each worker maps to 0.25 DPU (2 vCPU,
--     4 GB of memory, 64 GB disk), and provides 1 executor per worker. We
--     recommend this worker type for low volume streaming jobs. This
--     worker type is only available for Glue version 3.0 streaming jobs.
--
-- 'name', 'createJob_name' - The name you assign to this job definition. It must be unique in your
-- account.
--
-- 'role'', 'createJob_role' - The name or Amazon Resource Name (ARN) of the IAM role associated with
-- this job.
--
-- 'command', 'createJob_command' - The @JobCommand@ that runs this job.
newCreateJob ::
  -- | 'name'
  Prelude.Text ->
  -- | 'role''
  Prelude.Text ->
  -- | 'command'
  JobCommand ->
  CreateJob
newCreateJob :: Text -> Text -> JobCommand -> CreateJob
newCreateJob Text
pName_ Text
pRole_ JobCommand
pCommand_ =
  CreateJob'
    { $sel:allocatedCapacity:CreateJob' :: Maybe Int
allocatedCapacity = forall a. Maybe a
Prelude.Nothing,
      $sel:codeGenConfigurationNodes:CreateJob' :: Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
codeGenConfigurationNodes = forall a. Maybe a
Prelude.Nothing,
      $sel:connections:CreateJob' :: Maybe ConnectionsList
connections = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultArguments:CreateJob' :: Maybe (HashMap Text Text)
defaultArguments = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateJob' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:executionClass:CreateJob' :: Maybe ExecutionClass
executionClass = forall a. Maybe a
Prelude.Nothing,
      $sel:executionProperty:CreateJob' :: Maybe ExecutionProperty
executionProperty = forall a. Maybe a
Prelude.Nothing,
      $sel:glueVersion:CreateJob' :: Maybe Text
glueVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:logUri:CreateJob' :: Maybe Text
logUri = forall a. Maybe a
Prelude.Nothing,
      $sel:maxCapacity:CreateJob' :: Maybe Double
maxCapacity = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRetries:CreateJob' :: Maybe Int
maxRetries = forall a. Maybe a
Prelude.Nothing,
      $sel:nonOverridableArguments:CreateJob' :: Maybe (HashMap Text Text)
nonOverridableArguments = forall a. Maybe a
Prelude.Nothing,
      $sel:notificationProperty:CreateJob' :: Maybe NotificationProperty
notificationProperty = forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfWorkers:CreateJob' :: Maybe Int
numberOfWorkers = forall a. Maybe a
Prelude.Nothing,
      $sel:securityConfiguration:CreateJob' :: Maybe Text
securityConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceControlDetails:CreateJob' :: Maybe SourceControlDetails
sourceControlDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateJob' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:timeout:CreateJob' :: Maybe Natural
timeout = forall a. Maybe a
Prelude.Nothing,
      $sel:workerType:CreateJob' :: Maybe WorkerType
workerType = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateJob' :: Text
name = Text
pName_,
      $sel:role':CreateJob' :: Text
role' = Text
pRole_,
      $sel:command:CreateJob' :: JobCommand
command = JobCommand
pCommand_
    }

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

-- | The representation of a directed acyclic graph on which both the Glue
-- Studio visual component and Glue Studio code generation is based.
createJob_codeGenConfigurationNodes :: Lens.Lens' CreateJob (Prelude.Maybe (Prelude.HashMap Prelude.Text CodeGenConfigurationNode))
createJob_codeGenConfigurationNodes :: Lens' CreateJob (Maybe (HashMap Text CodeGenConfigurationNode))
createJob_codeGenConfigurationNodes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
codeGenConfigurationNodes :: Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
$sel:codeGenConfigurationNodes:CreateJob' :: CreateJob
-> Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
codeGenConfigurationNodes} -> Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
codeGenConfigurationNodes) (\s :: CreateJob
s@CreateJob' {} Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
a -> CreateJob
s {$sel:codeGenConfigurationNodes:CreateJob' :: Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
codeGenConfigurationNodes = Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
a} :: CreateJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | The connections used for this job.
createJob_connections :: Lens.Lens' CreateJob (Prelude.Maybe ConnectionsList)
createJob_connections :: Lens' CreateJob (Maybe ConnectionsList)
createJob_connections = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe ConnectionsList
connections :: Maybe ConnectionsList
$sel:connections:CreateJob' :: CreateJob -> Maybe ConnectionsList
connections} -> Maybe ConnectionsList
connections) (\s :: CreateJob
s@CreateJob' {} Maybe ConnectionsList
a -> CreateJob
s {$sel:connections:CreateJob' :: Maybe ConnectionsList
connections = Maybe ConnectionsList
a} :: CreateJob)

-- | The default arguments for this job.
--
-- You can specify arguments here that your own job-execution script
-- consumes, as well as arguments that Glue itself consumes.
--
-- Job arguments may be logged. Do not pass plaintext secrets as arguments.
-- Retrieve secrets from a Glue Connection, Secrets Manager or other secret
-- management mechanism if you intend to keep them within the Job.
--
-- 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.
createJob_defaultArguments :: Lens.Lens' CreateJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createJob_defaultArguments :: Lens' CreateJob (Maybe (HashMap Text Text))
createJob_defaultArguments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe (HashMap Text Text)
defaultArguments :: Maybe (HashMap Text Text)
$sel:defaultArguments:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
defaultArguments} -> Maybe (HashMap Text Text)
defaultArguments) (\s :: CreateJob
s@CreateJob' {} Maybe (HashMap Text Text)
a -> CreateJob
s {$sel:defaultArguments:CreateJob' :: Maybe (HashMap Text Text)
defaultArguments = Maybe (HashMap Text Text)
a} :: CreateJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Description of the job being defined.
createJob_description :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_description :: Lens' CreateJob (Maybe Text)
createJob_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
description :: Maybe Text
$sel:description:CreateJob' :: CreateJob -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:description:CreateJob' :: Maybe Text
description = Maybe Text
a} :: CreateJob)

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

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

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

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

-- | 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 or an Apache Spark ETL job:
--
-- -   When you specify a Python shell job
--     (@JobCommand.Name@=\"pythonshell\"), you can allocate either 0.0625
--     or 1 DPU. The default is 0.0625 DPU.
--
-- -   When you specify an Apache Spark ETL job
--     (@JobCommand.Name@=\"glueetl\") or Apache Spark streaming ETL job
--     (@JobCommand.Name@=\"gluestreaming\"), you can allocate a minimum of
--     2 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@.
createJob_maxCapacity :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Double)
createJob_maxCapacity :: Lens' CreateJob (Maybe Double)
createJob_maxCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Double
maxCapacity :: Maybe Double
$sel:maxCapacity:CreateJob' :: CreateJob -> Maybe Double
maxCapacity} -> Maybe Double
maxCapacity) (\s :: CreateJob
s@CreateJob' {} Maybe Double
a -> CreateJob
s {$sel:maxCapacity:CreateJob' :: Maybe Double
maxCapacity = Maybe Double
a} :: CreateJob)

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

-- | Non-overridable arguments for this job, specified as name-value pairs.
createJob_nonOverridableArguments :: Lens.Lens' CreateJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createJob_nonOverridableArguments :: Lens' CreateJob (Maybe (HashMap Text Text))
createJob_nonOverridableArguments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe (HashMap Text Text)
nonOverridableArguments :: Maybe (HashMap Text Text)
$sel:nonOverridableArguments:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
nonOverridableArguments} -> Maybe (HashMap Text Text)
nonOverridableArguments) (\s :: CreateJob
s@CreateJob' {} Maybe (HashMap Text Text)
a -> CreateJob
s {$sel:nonOverridableArguments:CreateJob' :: Maybe (HashMap Text Text)
nonOverridableArguments = Maybe (HashMap Text Text)
a} :: CreateJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

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

-- | The details for a source control configuration for a job, allowing
-- synchronization of job artifacts to or from a remote repository.
createJob_sourceControlDetails :: Lens.Lens' CreateJob (Prelude.Maybe SourceControlDetails)
createJob_sourceControlDetails :: Lens' CreateJob (Maybe SourceControlDetails)
createJob_sourceControlDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe SourceControlDetails
sourceControlDetails :: Maybe SourceControlDetails
$sel:sourceControlDetails:CreateJob' :: CreateJob -> Maybe SourceControlDetails
sourceControlDetails} -> Maybe SourceControlDetails
sourceControlDetails) (\s :: CreateJob
s@CreateJob' {} Maybe SourceControlDetails
a -> CreateJob
s {$sel:sourceControlDetails:CreateJob' :: Maybe SourceControlDetails
sourceControlDetails = Maybe SourceControlDetails
a} :: CreateJob)

-- | The tags to use with this job. You may use tags to limit access to the
-- job. For more information about tags in Glue, see
-- <https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html Amazon Web Services Tags in Glue>
-- in the developer guide.
createJob_tags :: Lens.Lens' CreateJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createJob_tags :: Lens' CreateJob (Maybe (HashMap Text Text))
createJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateJob
s@CreateJob' {} Maybe (HashMap Text Text)
a -> CreateJob
s {$sel:tags:CreateJob' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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).
createJob_timeout :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Natural)
createJob_timeout :: Lens' CreateJob (Maybe Natural)
createJob_timeout = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Natural
timeout :: Maybe Natural
$sel:timeout:CreateJob' :: CreateJob -> Maybe Natural
timeout} -> Maybe Natural
timeout) (\s :: CreateJob
s@CreateJob' {} Maybe Natural
a -> CreateJob
s {$sel:timeout:CreateJob' :: Maybe Natural
timeout = Maybe Natural
a} :: CreateJob)

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

-- | The name you assign to this job definition. It must be unique in your
-- account.
createJob_name :: Lens.Lens' CreateJob Prelude.Text
createJob_name :: Lens' CreateJob Text
createJob_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Text
name :: Text
$sel:name:CreateJob' :: CreateJob -> Text
name} -> Text
name) (\s :: CreateJob
s@CreateJob' {} Text
a -> CreateJob
s {$sel:name:CreateJob' :: Text
name = Text
a} :: CreateJob)

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

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

instance Core.AWSRequest CreateJob where
  type AWSResponse CreateJob = CreateJobResponse
  request :: (Service -> Service) -> CreateJob -> Request CreateJob
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateJob)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateJobResponse
CreateJobResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateJob where
  hashWithSalt :: Int -> CreateJob -> Int
hashWithSalt Int
_salt CreateJob' {Maybe Double
Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
Maybe ConnectionsList
Maybe ExecutionClass
Maybe ExecutionProperty
Maybe NotificationProperty
Maybe SourceControlDetails
Maybe WorkerType
Text
JobCommand
command :: JobCommand
role' :: Text
name :: Text
workerType :: Maybe WorkerType
timeout :: Maybe Natural
tags :: Maybe (HashMap Text Text)
sourceControlDetails :: Maybe SourceControlDetails
securityConfiguration :: Maybe Text
numberOfWorkers :: Maybe Int
notificationProperty :: Maybe NotificationProperty
nonOverridableArguments :: Maybe (HashMap Text Text)
maxRetries :: Maybe Int
maxCapacity :: Maybe Double
logUri :: Maybe Text
glueVersion :: Maybe Text
executionProperty :: Maybe ExecutionProperty
executionClass :: Maybe ExecutionClass
description :: Maybe Text
defaultArguments :: Maybe (HashMap Text Text)
connections :: Maybe ConnectionsList
codeGenConfigurationNodes :: Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
allocatedCapacity :: Maybe Int
$sel:command:CreateJob' :: CreateJob -> JobCommand
$sel:role':CreateJob' :: CreateJob -> Text
$sel:name:CreateJob' :: CreateJob -> Text
$sel:workerType:CreateJob' :: CreateJob -> Maybe WorkerType
$sel:timeout:CreateJob' :: CreateJob -> Maybe Natural
$sel:tags:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:sourceControlDetails:CreateJob' :: CreateJob -> Maybe SourceControlDetails
$sel:securityConfiguration:CreateJob' :: CreateJob -> Maybe Text
$sel:numberOfWorkers:CreateJob' :: CreateJob -> Maybe Int
$sel:notificationProperty:CreateJob' :: CreateJob -> Maybe NotificationProperty
$sel:nonOverridableArguments:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:maxRetries:CreateJob' :: CreateJob -> Maybe Int
$sel:maxCapacity:CreateJob' :: CreateJob -> Maybe Double
$sel:logUri:CreateJob' :: CreateJob -> Maybe Text
$sel:glueVersion:CreateJob' :: CreateJob -> Maybe Text
$sel:executionProperty:CreateJob' :: CreateJob -> Maybe ExecutionProperty
$sel:executionClass:CreateJob' :: CreateJob -> Maybe ExecutionClass
$sel:description:CreateJob' :: CreateJob -> Maybe Text
$sel:defaultArguments:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:connections:CreateJob' :: CreateJob -> Maybe ConnectionsList
$sel:codeGenConfigurationNodes:CreateJob' :: CreateJob
-> Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
$sel:allocatedCapacity:CreateJob' :: CreateJob -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
allocatedCapacity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
codeGenConfigurationNodes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectionsList
connections
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
defaultArguments
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExecutionClass
executionClass
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExecutionProperty
executionProperty
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
glueVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logUri
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
maxCapacity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRetries
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
nonOverridableArguments
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NotificationProperty
notificationProperty
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfWorkers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
securityConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SourceControlDetails
sourceControlDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeout
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkerType
workerType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
role'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobCommand
command

instance Prelude.NFData CreateJob where
  rnf :: CreateJob -> ()
rnf CreateJob' {Maybe Double
Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
Maybe ConnectionsList
Maybe ExecutionClass
Maybe ExecutionProperty
Maybe NotificationProperty
Maybe SourceControlDetails
Maybe WorkerType
Text
JobCommand
command :: JobCommand
role' :: Text
name :: Text
workerType :: Maybe WorkerType
timeout :: Maybe Natural
tags :: Maybe (HashMap Text Text)
sourceControlDetails :: Maybe SourceControlDetails
securityConfiguration :: Maybe Text
numberOfWorkers :: Maybe Int
notificationProperty :: Maybe NotificationProperty
nonOverridableArguments :: Maybe (HashMap Text Text)
maxRetries :: Maybe Int
maxCapacity :: Maybe Double
logUri :: Maybe Text
glueVersion :: Maybe Text
executionProperty :: Maybe ExecutionProperty
executionClass :: Maybe ExecutionClass
description :: Maybe Text
defaultArguments :: Maybe (HashMap Text Text)
connections :: Maybe ConnectionsList
codeGenConfigurationNodes :: Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
allocatedCapacity :: Maybe Int
$sel:command:CreateJob' :: CreateJob -> JobCommand
$sel:role':CreateJob' :: CreateJob -> Text
$sel:name:CreateJob' :: CreateJob -> Text
$sel:workerType:CreateJob' :: CreateJob -> Maybe WorkerType
$sel:timeout:CreateJob' :: CreateJob -> Maybe Natural
$sel:tags:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:sourceControlDetails:CreateJob' :: CreateJob -> Maybe SourceControlDetails
$sel:securityConfiguration:CreateJob' :: CreateJob -> Maybe Text
$sel:numberOfWorkers:CreateJob' :: CreateJob -> Maybe Int
$sel:notificationProperty:CreateJob' :: CreateJob -> Maybe NotificationProperty
$sel:nonOverridableArguments:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:maxRetries:CreateJob' :: CreateJob -> Maybe Int
$sel:maxCapacity:CreateJob' :: CreateJob -> Maybe Double
$sel:logUri:CreateJob' :: CreateJob -> Maybe Text
$sel:glueVersion:CreateJob' :: CreateJob -> Maybe Text
$sel:executionProperty:CreateJob' :: CreateJob -> Maybe ExecutionProperty
$sel:executionClass:CreateJob' :: CreateJob -> Maybe ExecutionClass
$sel:description:CreateJob' :: CreateJob -> Maybe Text
$sel:defaultArguments:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:connections:CreateJob' :: CreateJob -> Maybe ConnectionsList
$sel:codeGenConfigurationNodes:CreateJob' :: CreateJob
-> Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
$sel:allocatedCapacity:CreateJob' :: CreateJob -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
allocatedCapacity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
codeGenConfigurationNodes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectionsList
connections
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
defaultArguments
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExecutionClass
executionClass
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExecutionProperty
executionProperty
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
glueVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
maxCapacity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRetries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
nonOverridableArguments
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NotificationProperty
notificationProperty
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfWorkers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
securityConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SourceControlDetails
sourceControlDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeout
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkerType
workerType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
role'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf JobCommand
command

instance Data.ToHeaders CreateJob where
  toHeaders :: CreateJob -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"AWSGlue.CreateJob" :: Prelude.ByteString),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateJob where
  toJSON :: CreateJob -> Value
toJSON CreateJob' {Maybe Double
Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
Maybe ConnectionsList
Maybe ExecutionClass
Maybe ExecutionProperty
Maybe NotificationProperty
Maybe SourceControlDetails
Maybe WorkerType
Text
JobCommand
command :: JobCommand
role' :: Text
name :: Text
workerType :: Maybe WorkerType
timeout :: Maybe Natural
tags :: Maybe (HashMap Text Text)
sourceControlDetails :: Maybe SourceControlDetails
securityConfiguration :: Maybe Text
numberOfWorkers :: Maybe Int
notificationProperty :: Maybe NotificationProperty
nonOverridableArguments :: Maybe (HashMap Text Text)
maxRetries :: Maybe Int
maxCapacity :: Maybe Double
logUri :: Maybe Text
glueVersion :: Maybe Text
executionProperty :: Maybe ExecutionProperty
executionClass :: Maybe ExecutionClass
description :: Maybe Text
defaultArguments :: Maybe (HashMap Text Text)
connections :: Maybe ConnectionsList
codeGenConfigurationNodes :: Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
allocatedCapacity :: Maybe Int
$sel:command:CreateJob' :: CreateJob -> JobCommand
$sel:role':CreateJob' :: CreateJob -> Text
$sel:name:CreateJob' :: CreateJob -> Text
$sel:workerType:CreateJob' :: CreateJob -> Maybe WorkerType
$sel:timeout:CreateJob' :: CreateJob -> Maybe Natural
$sel:tags:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:sourceControlDetails:CreateJob' :: CreateJob -> Maybe SourceControlDetails
$sel:securityConfiguration:CreateJob' :: CreateJob -> Maybe Text
$sel:numberOfWorkers:CreateJob' :: CreateJob -> Maybe Int
$sel:notificationProperty:CreateJob' :: CreateJob -> Maybe NotificationProperty
$sel:nonOverridableArguments:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:maxRetries:CreateJob' :: CreateJob -> Maybe Int
$sel:maxCapacity:CreateJob' :: CreateJob -> Maybe Double
$sel:logUri:CreateJob' :: CreateJob -> Maybe Text
$sel:glueVersion:CreateJob' :: CreateJob -> Maybe Text
$sel:executionProperty:CreateJob' :: CreateJob -> Maybe ExecutionProperty
$sel:executionClass:CreateJob' :: CreateJob -> Maybe ExecutionClass
$sel:description:CreateJob' :: CreateJob -> Maybe Text
$sel:defaultArguments:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:connections:CreateJob' :: CreateJob -> Maybe ConnectionsList
$sel:codeGenConfigurationNodes:CreateJob' :: CreateJob
-> Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
$sel:allocatedCapacity:CreateJob' :: CreateJob -> Maybe Int
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AllocatedCapacity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
allocatedCapacity,
            (Key
"CodeGenConfigurationNodes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text CodeGenConfigurationNode))
codeGenConfigurationNodes,
            (Key
"Connections" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionsList
connections,
            (Key
"DefaultArguments" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
defaultArguments,
            (Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"ExecutionClass" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExecutionClass
executionClass,
            (Key
"ExecutionProperty" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExecutionProperty
executionProperty,
            (Key
"GlueVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
glueVersion,
            (Key
"LogUri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
logUri,
            (Key
"MaxCapacity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
maxCapacity,
            (Key
"MaxRetries" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxRetries,
            (Key
"NonOverridableArguments" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
nonOverridableArguments,
            (Key
"NotificationProperty" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationProperty
notificationProperty,
            (Key
"NumberOfWorkers" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
numberOfWorkers,
            (Key
"SecurityConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
securityConfiguration,
            (Key
"SourceControlDetails" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceControlDetails
sourceControlDetails,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            (Key
"Timeout" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeout,
            (Key
"WorkerType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WorkerType
workerType,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"Role" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
role'),
            forall a. a -> Maybe a
Prelude.Just (Key
"Command" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= JobCommand
command)
          ]
      )

instance Data.ToPath CreateJob where
  toPath :: CreateJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery CreateJob where
  toQuery :: CreateJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateJobResponse' smart constructor.
data CreateJobResponse = CreateJobResponse'
  { -- | The unique name that was provided for this job definition.
    CreateJobResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateJobResponse -> CreateJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJobResponse -> CreateJobResponse -> Bool
$c/= :: CreateJobResponse -> CreateJobResponse -> Bool
== :: CreateJobResponse -> CreateJobResponse -> Bool
$c== :: CreateJobResponse -> CreateJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateJobResponse]
ReadPrec CreateJobResponse
Int -> ReadS CreateJobResponse
ReadS [CreateJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJobResponse]
$creadListPrec :: ReadPrec [CreateJobResponse]
readPrec :: ReadPrec CreateJobResponse
$creadPrec :: ReadPrec CreateJobResponse
readList :: ReadS [CreateJobResponse]
$creadList :: ReadS [CreateJobResponse]
readsPrec :: Int -> ReadS CreateJobResponse
$creadsPrec :: Int -> ReadS CreateJobResponse
Prelude.Read, Int -> CreateJobResponse -> ShowS
[CreateJobResponse] -> ShowS
CreateJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJobResponse] -> ShowS
$cshowList :: [CreateJobResponse] -> ShowS
show :: CreateJobResponse -> String
$cshow :: CreateJobResponse -> String
showsPrec :: Int -> CreateJobResponse -> ShowS
$cshowsPrec :: Int -> CreateJobResponse -> ShowS
Prelude.Show, forall x. Rep CreateJobResponse x -> CreateJobResponse
forall x. CreateJobResponse -> Rep CreateJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJobResponse x -> CreateJobResponse
$cfrom :: forall x. CreateJobResponse -> Rep CreateJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateJobResponse' 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:
--
-- 'name', 'createJobResponse_name' - The unique name that was provided for this job definition.
--
-- 'httpStatus', 'createJobResponse_httpStatus' - The response's http status code.
newCreateJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateJobResponse
newCreateJobResponse :: Int -> CreateJobResponse
newCreateJobResponse Int
pHttpStatus_ =
  CreateJobResponse'
    { $sel:name:CreateJobResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The unique name that was provided for this job definition.
createJobResponse_name :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.Text)
createJobResponse_name :: Lens' CreateJobResponse (Maybe Text)
createJobResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateJobResponse' :: CreateJobResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Text
a -> CreateJobResponse
s {$sel:name:CreateJobResponse' :: Maybe Text
name = Maybe Text
a} :: CreateJobResponse)

-- | The response's http status code.
createJobResponse_httpStatus :: Lens.Lens' CreateJobResponse Prelude.Int
createJobResponse_httpStatus :: Lens' CreateJobResponse Int
createJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateJobResponse' :: CreateJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateJobResponse
s@CreateJobResponse' {} Int
a -> CreateJobResponse
s {$sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
a} :: CreateJobResponse)

instance Prelude.NFData CreateJobResponse where
  rnf :: CreateJobResponse -> ()
rnf CreateJobResponse' {Int
Maybe Text
httpStatus :: Int
name :: Maybe Text
$sel:httpStatus:CreateJobResponse' :: CreateJobResponse -> Int
$sel:name:CreateJobResponse' :: CreateJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus