{-# 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.MediaConvert.CreateJob
-- 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)
--
-- Create a new transcoding job. For information about jobs and job
-- settings, see the User Guide at
-- http:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/what-is.html
module Amazonka.MediaConvert.CreateJob
  ( -- * Creating a Request
    CreateJob (..),
    newCreateJob,

    -- * Request Lenses
    createJob_jobTemplate,
    createJob_accelerationSettings,
    createJob_priority,
    createJob_statusUpdateInterval,
    createJob_hopDestinations,
    createJob_simulateReservedQueue,
    createJob_queue,
    createJob_userMetadata,
    createJob_billingTagsSource,
    createJob_clientRequestToken,
    createJob_tags,
    createJob_role,
    createJob_settings,

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

    -- * Response Lenses
    createJobResponse_job,
    createJobResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.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'
  { -- | Optional. When you create a job, you can either specify a job template
    -- or specify the transcoding settings individually.
    CreateJob -> Maybe Text
jobTemplate :: Prelude.Maybe Prelude.Text,
    -- | Optional. Accelerated transcoding can significantly speed up jobs with
    -- long, visually complex content. Outputs that use this feature incur
    -- pro-tier pricing. For information about feature limitations, see the AWS
    -- Elemental MediaConvert User Guide.
    CreateJob -> Maybe AccelerationSettings
accelerationSettings :: Prelude.Maybe AccelerationSettings,
    -- | Optional. Specify the relative priority for this job. In any given
    -- queue, the service begins processing the job with the highest value
    -- first. When more than one job has the same priority, the service begins
    -- processing the job that you submitted first. If you don\'t specify a
    -- priority, the service uses the default value 0.
    CreateJob -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
    -- | Optional. Specify how often MediaConvert sends STATUS_UPDATE events to
    -- Amazon CloudWatch Events. Set the interval, in seconds, between status
    -- updates. MediaConvert sends an update at this interval from the time the
    -- service begins processing your job to the time it completes the
    -- transcode or encounters an error.
    CreateJob -> Maybe StatusUpdateInterval
statusUpdateInterval :: Prelude.Maybe StatusUpdateInterval,
    -- | Optional. Use queue hopping to avoid overly long waits in the backlog of
    -- the queue that you submit your job to. Specify an alternate queue and
    -- the maximum time that your job will wait in the initial queue before
    -- hopping. For more information about this feature, see the AWS Elemental
    -- MediaConvert User Guide.
    CreateJob -> Maybe [HopDestination]
hopDestinations :: Prelude.Maybe [HopDestination],
    -- | Optional. Enable this setting when you run a test job to estimate how
    -- many reserved transcoding slots (RTS) you need. When this is enabled,
    -- MediaConvert runs your job from an on-demand queue with similar
    -- performance to what you will see with one RTS in a reserved queue. This
    -- setting is disabled by default.
    CreateJob -> Maybe SimulateReservedQueue
simulateReservedQueue :: Prelude.Maybe SimulateReservedQueue,
    -- | Optional. When you create a job, you can specify a queue to send it to.
    -- If you don\'t specify, the job will go to the default queue. For more
    -- about queues, see the User Guide topic at
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/what-is.html.
    CreateJob -> Maybe Text
queue :: Prelude.Maybe Prelude.Text,
    -- | Optional. User-defined metadata that you want to associate with an
    -- MediaConvert job. You specify metadata in key\/value pairs. Use only for
    -- existing integrations or workflows that rely on job metadata tags.
    -- Otherwise, we recommend that you use standard AWS tags.
    CreateJob -> Maybe (HashMap Text Text)
userMetadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Optional. Choose a tag type that AWS Billing and Cost Management will
    -- use to sort your AWS Elemental MediaConvert costs on any billing report
    -- that you set up. Any transcoding outputs that don\'t have an associated
    -- tag will appear in your billing report unsorted. If you don\'t choose a
    -- valid value for this field, your job outputs will appear on the billing
    -- report unsorted.
    CreateJob -> Maybe BillingTagsSource
billingTagsSource :: Prelude.Maybe BillingTagsSource,
    -- | Optional. Idempotency token for CreateJob operation.
    CreateJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Optional. The tags that you want to add to the resource. You can tag
    -- resources with a key-value pair or with only a key. Use standard AWS
    -- tags on your job for automatic integration with AWS services and for
    -- custom integrations and workflows.
    CreateJob -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Required. The IAM role you use for creating this job. For details about
    -- permissions, see the User Guide topic at the User Guide at
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/iam-role.html.
    CreateJob -> Text
role' :: Prelude.Text,
    -- | JobSettings contains all the transcode settings for a job.
    CreateJob -> JobSettings
settings :: JobSettings
  }
  deriving (CreateJob -> CreateJob -> Bool
(CreateJob -> CreateJob -> Bool)
-> (CreateJob -> CreateJob -> Bool) -> Eq CreateJob
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, ReadPrec [CreateJob]
ReadPrec CreateJob
Int -> ReadS CreateJob
ReadS [CreateJob]
(Int -> ReadS CreateJob)
-> ReadS [CreateJob]
-> ReadPrec CreateJob
-> ReadPrec [CreateJob]
-> Read CreateJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJob]
$creadListPrec :: ReadPrec [CreateJob]
readPrec :: ReadPrec CreateJob
$creadPrec :: ReadPrec CreateJob
readList :: ReadS [CreateJob]
$creadList :: ReadS [CreateJob]
readsPrec :: Int -> ReadS CreateJob
$creadsPrec :: Int -> ReadS CreateJob
Prelude.Read, Int -> CreateJob -> ShowS
[CreateJob] -> ShowS
CreateJob -> String
(Int -> CreateJob -> ShowS)
-> (CreateJob -> String)
-> ([CreateJob] -> ShowS)
-> Show CreateJob
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. CreateJob -> Rep CreateJob x)
-> (forall x. Rep CreateJob x -> CreateJob) -> Generic CreateJob
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:
--
-- 'jobTemplate', 'createJob_jobTemplate' - Optional. When you create a job, you can either specify a job template
-- or specify the transcoding settings individually.
--
-- 'accelerationSettings', 'createJob_accelerationSettings' - Optional. Accelerated transcoding can significantly speed up jobs with
-- long, visually complex content. Outputs that use this feature incur
-- pro-tier pricing. For information about feature limitations, see the AWS
-- Elemental MediaConvert User Guide.
--
-- 'priority', 'createJob_priority' - Optional. Specify the relative priority for this job. In any given
-- queue, the service begins processing the job with the highest value
-- first. When more than one job has the same priority, the service begins
-- processing the job that you submitted first. If you don\'t specify a
-- priority, the service uses the default value 0.
--
-- 'statusUpdateInterval', 'createJob_statusUpdateInterval' - Optional. Specify how often MediaConvert sends STATUS_UPDATE events to
-- Amazon CloudWatch Events. Set the interval, in seconds, between status
-- updates. MediaConvert sends an update at this interval from the time the
-- service begins processing your job to the time it completes the
-- transcode or encounters an error.
--
-- 'hopDestinations', 'createJob_hopDestinations' - Optional. Use queue hopping to avoid overly long waits in the backlog of
-- the queue that you submit your job to. Specify an alternate queue and
-- the maximum time that your job will wait in the initial queue before
-- hopping. For more information about this feature, see the AWS Elemental
-- MediaConvert User Guide.
--
-- 'simulateReservedQueue', 'createJob_simulateReservedQueue' - Optional. Enable this setting when you run a test job to estimate how
-- many reserved transcoding slots (RTS) you need. When this is enabled,
-- MediaConvert runs your job from an on-demand queue with similar
-- performance to what you will see with one RTS in a reserved queue. This
-- setting is disabled by default.
--
-- 'queue', 'createJob_queue' - Optional. When you create a job, you can specify a queue to send it to.
-- If you don\'t specify, the job will go to the default queue. For more
-- about queues, see the User Guide topic at
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/what-is.html.
--
-- 'userMetadata', 'createJob_userMetadata' - Optional. User-defined metadata that you want to associate with an
-- MediaConvert job. You specify metadata in key\/value pairs. Use only for
-- existing integrations or workflows that rely on job metadata tags.
-- Otherwise, we recommend that you use standard AWS tags.
--
-- 'billingTagsSource', 'createJob_billingTagsSource' - Optional. Choose a tag type that AWS Billing and Cost Management will
-- use to sort your AWS Elemental MediaConvert costs on any billing report
-- that you set up. Any transcoding outputs that don\'t have an associated
-- tag will appear in your billing report unsorted. If you don\'t choose a
-- valid value for this field, your job outputs will appear on the billing
-- report unsorted.
--
-- 'clientRequestToken', 'createJob_clientRequestToken' - Optional. Idempotency token for CreateJob operation.
--
-- 'tags', 'createJob_tags' - Optional. The tags that you want to add to the resource. You can tag
-- resources with a key-value pair or with only a key. Use standard AWS
-- tags on your job for automatic integration with AWS services and for
-- custom integrations and workflows.
--
-- 'role'', 'createJob_role' - Required. The IAM role you use for creating this job. For details about
-- permissions, see the User Guide topic at the User Guide at
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/iam-role.html.
--
-- 'settings', 'createJob_settings' - JobSettings contains all the transcode settings for a job.
newCreateJob ::
  -- | 'role''
  Prelude.Text ->
  -- | 'settings'
  JobSettings ->
  CreateJob
newCreateJob :: Text -> JobSettings -> CreateJob
newCreateJob Text
pRole_ JobSettings
pSettings_ =
  CreateJob' :: Maybe Text
-> Maybe AccelerationSettings
-> Maybe Int
-> Maybe StatusUpdateInterval
-> Maybe [HopDestination]
-> Maybe SimulateReservedQueue
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe BillingTagsSource
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> JobSettings
-> CreateJob
CreateJob'
    { $sel:jobTemplate:CreateJob' :: Maybe Text
jobTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accelerationSettings:CreateJob' :: Maybe AccelerationSettings
accelerationSettings = Maybe AccelerationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:priority:CreateJob' :: Maybe Int
priority = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:statusUpdateInterval:CreateJob' :: Maybe StatusUpdateInterval
statusUpdateInterval = Maybe StatusUpdateInterval
forall a. Maybe a
Prelude.Nothing,
      $sel:hopDestinations:CreateJob' :: Maybe [HopDestination]
hopDestinations = Maybe [HopDestination]
forall a. Maybe a
Prelude.Nothing,
      $sel:simulateReservedQueue:CreateJob' :: Maybe SimulateReservedQueue
simulateReservedQueue = Maybe SimulateReservedQueue
forall a. Maybe a
Prelude.Nothing,
      $sel:queue:CreateJob' :: Maybe Text
queue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:userMetadata:CreateJob' :: Maybe (HashMap Text Text)
userMetadata = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:billingTagsSource:CreateJob' :: Maybe BillingTagsSource
billingTagsSource = Maybe BillingTagsSource
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:CreateJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateJob' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:role':CreateJob' :: Text
role' = Text
pRole_,
      $sel:settings:CreateJob' :: JobSettings
settings = JobSettings
pSettings_
    }

-- | Optional. When you create a job, you can either specify a job template
-- or specify the transcoding settings individually.
createJob_jobTemplate :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_jobTemplate :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_jobTemplate = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
jobTemplate :: Maybe Text
$sel:jobTemplate:CreateJob' :: CreateJob -> Maybe Text
jobTemplate} -> Maybe Text
jobTemplate) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:jobTemplate:CreateJob' :: Maybe Text
jobTemplate = Maybe Text
a} :: CreateJob)

-- | Optional. Accelerated transcoding can significantly speed up jobs with
-- long, visually complex content. Outputs that use this feature incur
-- pro-tier pricing. For information about feature limitations, see the AWS
-- Elemental MediaConvert User Guide.
createJob_accelerationSettings :: Lens.Lens' CreateJob (Prelude.Maybe AccelerationSettings)
createJob_accelerationSettings :: (Maybe AccelerationSettings -> f (Maybe AccelerationSettings))
-> CreateJob -> f CreateJob
createJob_accelerationSettings = (CreateJob -> Maybe AccelerationSettings)
-> (CreateJob -> Maybe AccelerationSettings -> CreateJob)
-> Lens
     CreateJob
     CreateJob
     (Maybe AccelerationSettings)
     (Maybe AccelerationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe AccelerationSettings
accelerationSettings :: Maybe AccelerationSettings
$sel:accelerationSettings:CreateJob' :: CreateJob -> Maybe AccelerationSettings
accelerationSettings} -> Maybe AccelerationSettings
accelerationSettings) (\s :: CreateJob
s@CreateJob' {} Maybe AccelerationSettings
a -> CreateJob
s {$sel:accelerationSettings:CreateJob' :: Maybe AccelerationSettings
accelerationSettings = Maybe AccelerationSettings
a} :: CreateJob)

-- | Optional. Specify the relative priority for this job. In any given
-- queue, the service begins processing the job with the highest value
-- first. When more than one job has the same priority, the service begins
-- processing the job that you submitted first. If you don\'t specify a
-- priority, the service uses the default value 0.
createJob_priority :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Int)
createJob_priority :: (Maybe Int -> f (Maybe Int)) -> CreateJob -> f CreateJob
createJob_priority = (CreateJob -> Maybe Int)
-> (CreateJob -> Maybe Int -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Int
priority :: Maybe Int
$sel:priority:CreateJob' :: CreateJob -> Maybe Int
priority} -> Maybe Int
priority) (\s :: CreateJob
s@CreateJob' {} Maybe Int
a -> CreateJob
s {$sel:priority:CreateJob' :: Maybe Int
priority = Maybe Int
a} :: CreateJob)

-- | Optional. Specify how often MediaConvert sends STATUS_UPDATE events to
-- Amazon CloudWatch Events. Set the interval, in seconds, between status
-- updates. MediaConvert sends an update at this interval from the time the
-- service begins processing your job to the time it completes the
-- transcode or encounters an error.
createJob_statusUpdateInterval :: Lens.Lens' CreateJob (Prelude.Maybe StatusUpdateInterval)
createJob_statusUpdateInterval :: (Maybe StatusUpdateInterval -> f (Maybe StatusUpdateInterval))
-> CreateJob -> f CreateJob
createJob_statusUpdateInterval = (CreateJob -> Maybe StatusUpdateInterval)
-> (CreateJob -> Maybe StatusUpdateInterval -> CreateJob)
-> Lens
     CreateJob
     CreateJob
     (Maybe StatusUpdateInterval)
     (Maybe StatusUpdateInterval)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe StatusUpdateInterval
statusUpdateInterval :: Maybe StatusUpdateInterval
$sel:statusUpdateInterval:CreateJob' :: CreateJob -> Maybe StatusUpdateInterval
statusUpdateInterval} -> Maybe StatusUpdateInterval
statusUpdateInterval) (\s :: CreateJob
s@CreateJob' {} Maybe StatusUpdateInterval
a -> CreateJob
s {$sel:statusUpdateInterval:CreateJob' :: Maybe StatusUpdateInterval
statusUpdateInterval = Maybe StatusUpdateInterval
a} :: CreateJob)

-- | Optional. Use queue hopping to avoid overly long waits in the backlog of
-- the queue that you submit your job to. Specify an alternate queue and
-- the maximum time that your job will wait in the initial queue before
-- hopping. For more information about this feature, see the AWS Elemental
-- MediaConvert User Guide.
createJob_hopDestinations :: Lens.Lens' CreateJob (Prelude.Maybe [HopDestination])
createJob_hopDestinations :: (Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> CreateJob -> f CreateJob
createJob_hopDestinations = (CreateJob -> Maybe [HopDestination])
-> (CreateJob -> Maybe [HopDestination] -> CreateJob)
-> Lens
     CreateJob
     CreateJob
     (Maybe [HopDestination])
     (Maybe [HopDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe [HopDestination]
hopDestinations :: Maybe [HopDestination]
$sel:hopDestinations:CreateJob' :: CreateJob -> Maybe [HopDestination]
hopDestinations} -> Maybe [HopDestination]
hopDestinations) (\s :: CreateJob
s@CreateJob' {} Maybe [HopDestination]
a -> CreateJob
s {$sel:hopDestinations:CreateJob' :: Maybe [HopDestination]
hopDestinations = Maybe [HopDestination]
a} :: CreateJob) ((Maybe [HopDestination] -> f (Maybe [HopDestination]))
 -> CreateJob -> f CreateJob)
-> ((Maybe [HopDestination] -> f (Maybe [HopDestination]))
    -> Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> (Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> CreateJob
-> f CreateJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [HopDestination] [HopDestination] [HopDestination] [HopDestination]
-> Iso
     (Maybe [HopDestination])
     (Maybe [HopDestination])
     (Maybe [HopDestination])
     (Maybe [HopDestination])
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
  [HopDestination] [HopDestination] [HopDestination] [HopDestination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Optional. Enable this setting when you run a test job to estimate how
-- many reserved transcoding slots (RTS) you need. When this is enabled,
-- MediaConvert runs your job from an on-demand queue with similar
-- performance to what you will see with one RTS in a reserved queue. This
-- setting is disabled by default.
createJob_simulateReservedQueue :: Lens.Lens' CreateJob (Prelude.Maybe SimulateReservedQueue)
createJob_simulateReservedQueue :: (Maybe SimulateReservedQueue -> f (Maybe SimulateReservedQueue))
-> CreateJob -> f CreateJob
createJob_simulateReservedQueue = (CreateJob -> Maybe SimulateReservedQueue)
-> (CreateJob -> Maybe SimulateReservedQueue -> CreateJob)
-> Lens
     CreateJob
     CreateJob
     (Maybe SimulateReservedQueue)
     (Maybe SimulateReservedQueue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe SimulateReservedQueue
simulateReservedQueue :: Maybe SimulateReservedQueue
$sel:simulateReservedQueue:CreateJob' :: CreateJob -> Maybe SimulateReservedQueue
simulateReservedQueue} -> Maybe SimulateReservedQueue
simulateReservedQueue) (\s :: CreateJob
s@CreateJob' {} Maybe SimulateReservedQueue
a -> CreateJob
s {$sel:simulateReservedQueue:CreateJob' :: Maybe SimulateReservedQueue
simulateReservedQueue = Maybe SimulateReservedQueue
a} :: CreateJob)

-- | Optional. When you create a job, you can specify a queue to send it to.
-- If you don\'t specify, the job will go to the default queue. For more
-- about queues, see the User Guide topic at
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/what-is.html.
createJob_queue :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_queue :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_queue = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
queue :: Maybe Text
$sel:queue:CreateJob' :: CreateJob -> Maybe Text
queue} -> Maybe Text
queue) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:queue:CreateJob' :: Maybe Text
queue = Maybe Text
a} :: CreateJob)

-- | Optional. User-defined metadata that you want to associate with an
-- MediaConvert job. You specify metadata in key\/value pairs. Use only for
-- existing integrations or workflows that rely on job metadata tags.
-- Otherwise, we recommend that you use standard AWS tags.
createJob_userMetadata :: Lens.Lens' CreateJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createJob_userMetadata :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateJob -> f CreateJob
createJob_userMetadata = (CreateJob -> Maybe (HashMap Text Text))
-> (CreateJob -> Maybe (HashMap Text Text) -> CreateJob)
-> Lens
     CreateJob
     CreateJob
     (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 (\CreateJob' {Maybe (HashMap Text Text)
userMetadata :: Maybe (HashMap Text Text)
$sel:userMetadata:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
userMetadata} -> Maybe (HashMap Text Text)
userMetadata) (\s :: CreateJob
s@CreateJob' {} Maybe (HashMap Text Text)
a -> CreateJob
s {$sel:userMetadata:CreateJob' :: Maybe (HashMap Text Text)
userMetadata = Maybe (HashMap Text Text)
a} :: CreateJob) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateJob -> f CreateJob)
-> ((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)))
-> CreateJob
-> f CreateJob
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

-- | Optional. Choose a tag type that AWS Billing and Cost Management will
-- use to sort your AWS Elemental MediaConvert costs on any billing report
-- that you set up. Any transcoding outputs that don\'t have an associated
-- tag will appear in your billing report unsorted. If you don\'t choose a
-- valid value for this field, your job outputs will appear on the billing
-- report unsorted.
createJob_billingTagsSource :: Lens.Lens' CreateJob (Prelude.Maybe BillingTagsSource)
createJob_billingTagsSource :: (Maybe BillingTagsSource -> f (Maybe BillingTagsSource))
-> CreateJob -> f CreateJob
createJob_billingTagsSource = (CreateJob -> Maybe BillingTagsSource)
-> (CreateJob -> Maybe BillingTagsSource -> CreateJob)
-> Lens
     CreateJob
     CreateJob
     (Maybe BillingTagsSource)
     (Maybe BillingTagsSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe BillingTagsSource
billingTagsSource :: Maybe BillingTagsSource
$sel:billingTagsSource:CreateJob' :: CreateJob -> Maybe BillingTagsSource
billingTagsSource} -> Maybe BillingTagsSource
billingTagsSource) (\s :: CreateJob
s@CreateJob' {} Maybe BillingTagsSource
a -> CreateJob
s {$sel:billingTagsSource:CreateJob' :: Maybe BillingTagsSource
billingTagsSource = Maybe BillingTagsSource
a} :: CreateJob)

-- | Optional. Idempotency token for CreateJob operation.
createJob_clientRequestToken :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_clientRequestToken :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_clientRequestToken = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateJob' :: CreateJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:clientRequestToken:CreateJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateJob)

-- | Optional. The tags that you want to add to the resource. You can tag
-- resources with a key-value pair or with only a key. Use standard AWS
-- tags on your job for automatic integration with AWS services and for
-- custom integrations and workflows.
createJob_tags :: Lens.Lens' CreateJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createJob_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateJob -> f CreateJob
createJob_tags = (CreateJob -> Maybe (HashMap Text Text))
-> (CreateJob -> Maybe (HashMap Text Text) -> CreateJob)
-> Lens
     CreateJob
     CreateJob
     (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 (\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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateJob -> f CreateJob)
-> ((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)))
-> CreateJob
-> f CreateJob
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

-- | Required. The IAM role you use for creating this job. For details about
-- permissions, see the User Guide topic at the User Guide at
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/iam-role.html.
createJob_role :: Lens.Lens' CreateJob Prelude.Text
createJob_role :: (Text -> f Text) -> CreateJob -> f CreateJob
createJob_role = (CreateJob -> Text)
-> (CreateJob -> Text -> CreateJob)
-> Lens CreateJob CreateJob Text Text
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)

-- | JobSettings contains all the transcode settings for a job.
createJob_settings :: Lens.Lens' CreateJob JobSettings
createJob_settings :: (JobSettings -> f JobSettings) -> CreateJob -> f CreateJob
createJob_settings = (CreateJob -> JobSettings)
-> (CreateJob -> JobSettings -> CreateJob)
-> Lens CreateJob CreateJob JobSettings JobSettings
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {JobSettings
settings :: JobSettings
$sel:settings:CreateJob' :: CreateJob -> JobSettings
settings} -> JobSettings
settings) (\s :: CreateJob
s@CreateJob' {} JobSettings
a -> CreateJob
s {$sel:settings:CreateJob' :: JobSettings
settings = JobSettings
a} :: CreateJob)

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

instance Prelude.Hashable CreateJob

instance Prelude.NFData CreateJob

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

instance Core.ToJSON CreateJob where
  toJSON :: CreateJob -> Value
toJSON CreateJob' {Maybe Int
Maybe [HopDestination]
Maybe Text
Maybe (HashMap Text Text)
Maybe AccelerationSettings
Maybe BillingTagsSource
Maybe SimulateReservedQueue
Maybe StatusUpdateInterval
Text
JobSettings
settings :: JobSettings
role' :: Text
tags :: Maybe (HashMap Text Text)
clientRequestToken :: Maybe Text
billingTagsSource :: Maybe BillingTagsSource
userMetadata :: Maybe (HashMap Text Text)
queue :: Maybe Text
simulateReservedQueue :: Maybe SimulateReservedQueue
hopDestinations :: Maybe [HopDestination]
statusUpdateInterval :: Maybe StatusUpdateInterval
priority :: Maybe Int
accelerationSettings :: Maybe AccelerationSettings
jobTemplate :: Maybe Text
$sel:settings:CreateJob' :: CreateJob -> JobSettings
$sel:role':CreateJob' :: CreateJob -> Text
$sel:tags:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:clientRequestToken:CreateJob' :: CreateJob -> Maybe Text
$sel:billingTagsSource:CreateJob' :: CreateJob -> Maybe BillingTagsSource
$sel:userMetadata:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:queue:CreateJob' :: CreateJob -> Maybe Text
$sel:simulateReservedQueue:CreateJob' :: CreateJob -> Maybe SimulateReservedQueue
$sel:hopDestinations:CreateJob' :: CreateJob -> Maybe [HopDestination]
$sel:statusUpdateInterval:CreateJob' :: CreateJob -> Maybe StatusUpdateInterval
$sel:priority:CreateJob' :: CreateJob -> Maybe Int
$sel:accelerationSettings:CreateJob' :: CreateJob -> Maybe AccelerationSettings
$sel:jobTemplate:CreateJob' :: CreateJob -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"jobTemplate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jobTemplate,
            (Text
"accelerationSettings" Text -> AccelerationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AccelerationSettings -> Pair)
-> Maybe AccelerationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccelerationSettings
accelerationSettings,
            (Text
"priority" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
priority,
            (Text
"statusUpdateInterval" Text -> StatusUpdateInterval -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (StatusUpdateInterval -> Pair)
-> Maybe StatusUpdateInterval -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StatusUpdateInterval
statusUpdateInterval,
            (Text
"hopDestinations" Text -> [HopDestination] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([HopDestination] -> Pair) -> Maybe [HopDestination] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [HopDestination]
hopDestinations,
            (Text
"simulateReservedQueue" Text -> SimulateReservedQueue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SimulateReservedQueue -> Pair)
-> Maybe SimulateReservedQueue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SimulateReservedQueue
simulateReservedQueue,
            (Text
"queue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
queue,
            (Text
"userMetadata" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
userMetadata,
            (Text
"billingTagsSource" Text -> BillingTagsSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BillingTagsSource -> Pair)
-> Maybe BillingTagsSource -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BillingTagsSource
billingTagsSource,
            (Text
"clientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"role" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
role'),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"settings" Text -> JobSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= JobSettings
settings)
          ]
      )

instance Core.ToPath CreateJob where
  toPath :: CreateJob -> ByteString
toPath = ByteString -> CreateJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2017-08-29/jobs"

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

-- | /See:/ 'newCreateJobResponse' smart constructor.
data CreateJobResponse = CreateJobResponse'
  { -- | Each job converts an input file into an output file or files. For more
    -- information, see the User Guide at
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/what-is.html
    CreateJobResponse -> Maybe Job
job :: Prelude.Maybe Job,
    -- | The response's http status code.
    CreateJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateJobResponse -> CreateJobResponse -> Bool
(CreateJobResponse -> CreateJobResponse -> Bool)
-> (CreateJobResponse -> CreateJobResponse -> Bool)
-> Eq CreateJobResponse
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]
(Int -> ReadS CreateJobResponse)
-> ReadS [CreateJobResponse]
-> ReadPrec CreateJobResponse
-> ReadPrec [CreateJobResponse]
-> Read 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
(Int -> CreateJobResponse -> ShowS)
-> (CreateJobResponse -> String)
-> ([CreateJobResponse] -> ShowS)
-> Show CreateJobResponse
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. CreateJobResponse -> Rep CreateJobResponse x)
-> (forall x. Rep CreateJobResponse x -> CreateJobResponse)
-> Generic CreateJobResponse
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:
--
-- 'job', 'createJobResponse_job' - Each job converts an input file into an output file or files. For more
-- information, see the User Guide at
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/what-is.html
--
-- 'httpStatus', 'createJobResponse_httpStatus' - The response's http status code.
newCreateJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateJobResponse
newCreateJobResponse :: Int -> CreateJobResponse
newCreateJobResponse Int
pHttpStatus_ =
  CreateJobResponse' :: Maybe Job -> Int -> CreateJobResponse
CreateJobResponse'
    { $sel:job:CreateJobResponse' :: Maybe Job
job = Maybe Job
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Each job converts an input file into an output file or files. For more
-- information, see the User Guide at
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/what-is.html
createJobResponse_job :: Lens.Lens' CreateJobResponse (Prelude.Maybe Job)
createJobResponse_job :: (Maybe Job -> f (Maybe Job))
-> CreateJobResponse -> f CreateJobResponse
createJobResponse_job = (CreateJobResponse -> Maybe Job)
-> (CreateJobResponse -> Maybe Job -> CreateJobResponse)
-> Lens CreateJobResponse CreateJobResponse (Maybe Job) (Maybe Job)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Job
job :: Maybe Job
$sel:job:CreateJobResponse' :: CreateJobResponse -> Maybe Job
job} -> Maybe Job
job) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Job
a -> CreateJobResponse
s {$sel:job:CreateJobResponse' :: Maybe Job
job = Maybe Job
a} :: CreateJobResponse)

-- | The response's http status code.
createJobResponse_httpStatus :: Lens.Lens' CreateJobResponse Prelude.Int
createJobResponse_httpStatus :: (Int -> f Int) -> CreateJobResponse -> f CreateJobResponse
createJobResponse_httpStatus = (CreateJobResponse -> Int)
-> (CreateJobResponse -> Int -> CreateJobResponse)
-> Lens CreateJobResponse CreateJobResponse Int Int
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