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

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

-- |
-- Module      : Amazonka.MediaConvert.Types.Job
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.Job where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.AccelerationSettings
import Amazonka.MediaConvert.Types.AccelerationStatus
import Amazonka.MediaConvert.Types.BillingTagsSource
import Amazonka.MediaConvert.Types.HopDestination
import Amazonka.MediaConvert.Types.JobMessages
import Amazonka.MediaConvert.Types.JobPhase
import Amazonka.MediaConvert.Types.JobSettings
import Amazonka.MediaConvert.Types.JobStatus
import Amazonka.MediaConvert.Types.OutputGroupDetail
import Amazonka.MediaConvert.Types.QueueTransition
import Amazonka.MediaConvert.Types.SimulateReservedQueue
import Amazonka.MediaConvert.Types.StatusUpdateInterval
import Amazonka.MediaConvert.Types.Timing
import qualified Amazonka.Prelude as Prelude

-- | 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
--
-- /See:/ 'newJob' smart constructor.
data Job = Job'
  { -- | A job\'s status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or
    -- ERROR.
    Job -> Maybe JobStatus
status :: Prelude.Maybe JobStatus,
    -- | The job template that the job is created from, if it is created from a
    -- job template.
    Job -> Maybe Text
jobTemplate :: Prelude.Maybe Prelude.Text,
    -- | Accelerated transcoding can significantly speed up jobs with long,
    -- visually complex content.
    Job -> Maybe AccelerationSettings
accelerationSettings :: Prelude.Maybe AccelerationSettings,
    -- | Relative priority on the job.
    Job -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
    -- | 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.
    Job -> Maybe StatusUpdateInterval
statusUpdateInterval :: Prelude.Maybe StatusUpdateInterval,
    -- | An identifier for this resource that is unique within all of AWS.
    Job -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in Unix epoch format in seconds, when the job got created.
    Job -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | Optional list of hop destinations.
    Job -> Maybe [HopDestination]
hopDestinations :: Prelude.Maybe [HopDestination],
    -- | The number of times that the service automatically attempted to process
    -- your job after encountering an error.
    Job -> Maybe Int
retryCount :: Prelude.Maybe Prelude.Int,
    -- | 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.
    Job -> Maybe SimulateReservedQueue
simulateReservedQueue :: Prelude.Maybe SimulateReservedQueue,
    -- | A job\'s phase can be PROBING, TRANSCODING OR UPLOADING
    Job -> Maybe JobPhase
currentPhase :: Prelude.Maybe JobPhase,
    -- | 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
    Job -> Maybe Text
queue :: Prelude.Maybe Prelude.Text,
    -- | User-defined metadata that you want to associate with an MediaConvert
    -- job. You specify metadata in key\/value pairs.
    Job -> Maybe (HashMap Text Text)
userMetadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The 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.
    Job -> Maybe BillingTagsSource
billingTagsSource :: Prelude.Maybe BillingTagsSource,
    -- | List of output group details
    Job -> Maybe [OutputGroupDetail]
outputGroupDetails :: Prelude.Maybe [OutputGroupDetail],
    -- | Error code for the job
    Job -> Maybe Int
errorCode :: Prelude.Maybe Prelude.Int,
    -- | The job\'s queue hopping history.
    Job -> Maybe [QueueTransition]
queueTransitions :: Prelude.Maybe [QueueTransition],
    -- | A portion of the job\'s ARN, unique within your AWS Elemental
    -- MediaConvert resources
    Job -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | An estimate of how far your job has progressed. This estimate is shown
    -- as a percentage of the total time from when your job leaves its queue to
    -- when your output files appear in your output Amazon S3 bucket. AWS
    -- Elemental MediaConvert provides jobPercentComplete in CloudWatch
    -- STATUS_UPDATE events and in the response to GetJob and ListJobs
    -- requests. The jobPercentComplete estimate is reliable for the following
    -- input containers: Quicktime, Transport Stream, MP4, and MXF. For some
    -- jobs, the service can\'t provide information about job progress. In
    -- those cases, jobPercentComplete returns a null value.
    Job -> Maybe Int
jobPercentComplete :: Prelude.Maybe Prelude.Int,
    -- | Information about when jobs are submitted, started, and finished is
    -- specified in Unix epoch format in seconds.
    Job -> Maybe Timing
timing :: Prelude.Maybe Timing,
    -- | Provides messages from the service about jobs that you have already
    -- successfully submitted.
    Job -> Maybe JobMessages
messages :: Prelude.Maybe JobMessages,
    -- | Error message of Job
    Job -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | Describes whether the current job is running with accelerated
    -- transcoding. For jobs that have Acceleration (AccelerationMode) set to
    -- DISABLED, AccelerationStatus is always NOT_APPLICABLE. For jobs that
    -- have Acceleration (AccelerationMode) set to ENABLED or PREFERRED,
    -- AccelerationStatus is one of the other states. AccelerationStatus is
    -- IN_PROGRESS initially, while the service determines whether the input
    -- files and job settings are compatible with accelerated transcoding. If
    -- they are, AcclerationStatus is ACCELERATED. If your input files and job
    -- settings aren\'t compatible with accelerated transcoding, the service
    -- either fails your job or runs it without accelerated transcoding,
    -- depending on how you set Acceleration (AccelerationMode). When the
    -- service runs your job without accelerated transcoding,
    -- AccelerationStatus is NOT_ACCELERATED.
    Job -> Maybe AccelerationStatus
accelerationStatus :: Prelude.Maybe AccelerationStatus,
    -- | 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
    Job -> Text
role' :: Prelude.Text,
    -- | JobSettings contains all the transcode settings for a job.
    Job -> JobSettings
settings :: JobSettings
  }
  deriving (Job -> Job -> Bool
(Job -> Job -> Bool) -> (Job -> Job -> Bool) -> Eq Job
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Job -> Job -> Bool
$c/= :: Job -> Job -> Bool
== :: Job -> Job -> Bool
$c== :: Job -> Job -> Bool
Prelude.Eq, ReadPrec [Job]
ReadPrec Job
Int -> ReadS Job
ReadS [Job]
(Int -> ReadS Job)
-> ReadS [Job] -> ReadPrec Job -> ReadPrec [Job] -> Read Job
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Job]
$creadListPrec :: ReadPrec [Job]
readPrec :: ReadPrec Job
$creadPrec :: ReadPrec Job
readList :: ReadS [Job]
$creadList :: ReadS [Job]
readsPrec :: Int -> ReadS Job
$creadsPrec :: Int -> ReadS Job
Prelude.Read, Int -> Job -> ShowS
[Job] -> ShowS
Job -> String
(Int -> Job -> ShowS)
-> (Job -> String) -> ([Job] -> ShowS) -> Show Job
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Job] -> ShowS
$cshowList :: [Job] -> ShowS
show :: Job -> String
$cshow :: Job -> String
showsPrec :: Int -> Job -> ShowS
$cshowsPrec :: Int -> Job -> ShowS
Prelude.Show, (forall x. Job -> Rep Job x)
-> (forall x. Rep Job x -> Job) -> Generic Job
forall x. Rep Job x -> Job
forall x. Job -> Rep Job x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Job x -> Job
$cfrom :: forall x. Job -> Rep Job x
Prelude.Generic)

-- |
-- Create a value of 'Job' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'job_status' - A job\'s status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or
-- ERROR.
--
-- 'jobTemplate', 'job_jobTemplate' - The job template that the job is created from, if it is created from a
-- job template.
--
-- 'accelerationSettings', 'job_accelerationSettings' - Accelerated transcoding can significantly speed up jobs with long,
-- visually complex content.
--
-- 'priority', 'job_priority' - Relative priority on the job.
--
-- 'statusUpdateInterval', 'job_statusUpdateInterval' - 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.
--
-- 'arn', 'job_arn' - An identifier for this resource that is unique within all of AWS.
--
-- 'createdAt', 'job_createdAt' - The time, in Unix epoch format in seconds, when the job got created.
--
-- 'hopDestinations', 'job_hopDestinations' - Optional list of hop destinations.
--
-- 'retryCount', 'job_retryCount' - The number of times that the service automatically attempted to process
-- your job after encountering an error.
--
-- 'simulateReservedQueue', 'job_simulateReservedQueue' - 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.
--
-- 'currentPhase', 'job_currentPhase' - A job\'s phase can be PROBING, TRANSCODING OR UPLOADING
--
-- 'queue', 'job_queue' - 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', 'job_userMetadata' - User-defined metadata that you want to associate with an MediaConvert
-- job. You specify metadata in key\/value pairs.
--
-- 'billingTagsSource', 'job_billingTagsSource' - The 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.
--
-- 'outputGroupDetails', 'job_outputGroupDetails' - List of output group details
--
-- 'errorCode', 'job_errorCode' - Error code for the job
--
-- 'queueTransitions', 'job_queueTransitions' - The job\'s queue hopping history.
--
-- 'id', 'job_id' - A portion of the job\'s ARN, unique within your AWS Elemental
-- MediaConvert resources
--
-- 'jobPercentComplete', 'job_jobPercentComplete' - An estimate of how far your job has progressed. This estimate is shown
-- as a percentage of the total time from when your job leaves its queue to
-- when your output files appear in your output Amazon S3 bucket. AWS
-- Elemental MediaConvert provides jobPercentComplete in CloudWatch
-- STATUS_UPDATE events and in the response to GetJob and ListJobs
-- requests. The jobPercentComplete estimate is reliable for the following
-- input containers: Quicktime, Transport Stream, MP4, and MXF. For some
-- jobs, the service can\'t provide information about job progress. In
-- those cases, jobPercentComplete returns a null value.
--
-- 'timing', 'job_timing' - Information about when jobs are submitted, started, and finished is
-- specified in Unix epoch format in seconds.
--
-- 'messages', 'job_messages' - Provides messages from the service about jobs that you have already
-- successfully submitted.
--
-- 'errorMessage', 'job_errorMessage' - Error message of Job
--
-- 'accelerationStatus', 'job_accelerationStatus' - Describes whether the current job is running with accelerated
-- transcoding. For jobs that have Acceleration (AccelerationMode) set to
-- DISABLED, AccelerationStatus is always NOT_APPLICABLE. For jobs that
-- have Acceleration (AccelerationMode) set to ENABLED or PREFERRED,
-- AccelerationStatus is one of the other states. AccelerationStatus is
-- IN_PROGRESS initially, while the service determines whether the input
-- files and job settings are compatible with accelerated transcoding. If
-- they are, AcclerationStatus is ACCELERATED. If your input files and job
-- settings aren\'t compatible with accelerated transcoding, the service
-- either fails your job or runs it without accelerated transcoding,
-- depending on how you set Acceleration (AccelerationMode). When the
-- service runs your job without accelerated transcoding,
-- AccelerationStatus is NOT_ACCELERATED.
--
-- 'role'', 'job_role' - 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', 'job_settings' - JobSettings contains all the transcode settings for a job.
newJob ::
  -- | 'role''
  Prelude.Text ->
  -- | 'settings'
  JobSettings ->
  Job
newJob :: Text -> JobSettings -> Job
newJob Text
pRole_ JobSettings
pSettings_ =
  Job' :: Maybe JobStatus
-> Maybe Text
-> Maybe AccelerationSettings
-> Maybe Int
-> Maybe StatusUpdateInterval
-> Maybe Text
-> Maybe POSIX
-> Maybe [HopDestination]
-> Maybe Int
-> Maybe SimulateReservedQueue
-> Maybe JobPhase
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe BillingTagsSource
-> Maybe [OutputGroupDetail]
-> Maybe Int
-> Maybe [QueueTransition]
-> Maybe Text
-> Maybe Int
-> Maybe Timing
-> Maybe JobMessages
-> Maybe Text
-> Maybe AccelerationStatus
-> Text
-> JobSettings
-> Job
Job'
    { $sel:status:Job' :: Maybe JobStatus
status = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:jobTemplate:Job' :: Maybe Text
jobTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accelerationSettings:Job' :: Maybe AccelerationSettings
accelerationSettings = Maybe AccelerationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:priority:Job' :: Maybe Int
priority = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:statusUpdateInterval:Job' :: Maybe StatusUpdateInterval
statusUpdateInterval = Maybe StatusUpdateInterval
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Job' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Job' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:hopDestinations:Job' :: Maybe [HopDestination]
hopDestinations = Maybe [HopDestination]
forall a. Maybe a
Prelude.Nothing,
      $sel:retryCount:Job' :: Maybe Int
retryCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:simulateReservedQueue:Job' :: Maybe SimulateReservedQueue
simulateReservedQueue = Maybe SimulateReservedQueue
forall a. Maybe a
Prelude.Nothing,
      $sel:currentPhase:Job' :: Maybe JobPhase
currentPhase = Maybe JobPhase
forall a. Maybe a
Prelude.Nothing,
      $sel:queue:Job' :: Maybe Text
queue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:userMetadata:Job' :: Maybe (HashMap Text Text)
userMetadata = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:billingTagsSource:Job' :: Maybe BillingTagsSource
billingTagsSource = Maybe BillingTagsSource
forall a. Maybe a
Prelude.Nothing,
      $sel:outputGroupDetails:Job' :: Maybe [OutputGroupDetail]
outputGroupDetails = Maybe [OutputGroupDetail]
forall a. Maybe a
Prelude.Nothing,
      $sel:errorCode:Job' :: Maybe Int
errorCode = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:queueTransitions:Job' :: Maybe [QueueTransition]
queueTransitions = Maybe [QueueTransition]
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Job' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobPercentComplete:Job' :: Maybe Int
jobPercentComplete = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:timing:Job' :: Maybe Timing
timing = Maybe Timing
forall a. Maybe a
Prelude.Nothing,
      $sel:messages:Job' :: Maybe JobMessages
messages = Maybe JobMessages
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:Job' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accelerationStatus:Job' :: Maybe AccelerationStatus
accelerationStatus = Maybe AccelerationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:role':Job' :: Text
role' = Text
pRole_,
      $sel:settings:Job' :: JobSettings
settings = JobSettings
pSettings_
    }

-- | A job\'s status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or
-- ERROR.
job_status :: Lens.Lens' Job (Prelude.Maybe JobStatus)
job_status :: (Maybe JobStatus -> f (Maybe JobStatus)) -> Job -> f Job
job_status = (Job -> Maybe JobStatus)
-> (Job -> Maybe JobStatus -> Job)
-> Lens Job Job (Maybe JobStatus) (Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobStatus
status :: Maybe JobStatus
$sel:status:Job' :: Job -> Maybe JobStatus
status} -> Maybe JobStatus
status) (\s :: Job
s@Job' {} Maybe JobStatus
a -> Job
s {$sel:status:Job' :: Maybe JobStatus
status = Maybe JobStatus
a} :: Job)

-- | The job template that the job is created from, if it is created from a
-- job template.
job_jobTemplate :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_jobTemplate :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_jobTemplate = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
jobTemplate :: Maybe Text
$sel:jobTemplate:Job' :: Job -> Maybe Text
jobTemplate} -> Maybe Text
jobTemplate) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:jobTemplate:Job' :: Maybe Text
jobTemplate = Maybe Text
a} :: Job)

-- | Accelerated transcoding can significantly speed up jobs with long,
-- visually complex content.
job_accelerationSettings :: Lens.Lens' Job (Prelude.Maybe AccelerationSettings)
job_accelerationSettings :: (Maybe AccelerationSettings -> f (Maybe AccelerationSettings))
-> Job -> f Job
job_accelerationSettings = (Job -> Maybe AccelerationSettings)
-> (Job -> Maybe AccelerationSettings -> Job)
-> Lens
     Job Job (Maybe AccelerationSettings) (Maybe AccelerationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe AccelerationSettings
accelerationSettings :: Maybe AccelerationSettings
$sel:accelerationSettings:Job' :: Job -> Maybe AccelerationSettings
accelerationSettings} -> Maybe AccelerationSettings
accelerationSettings) (\s :: Job
s@Job' {} Maybe AccelerationSettings
a -> Job
s {$sel:accelerationSettings:Job' :: Maybe AccelerationSettings
accelerationSettings = Maybe AccelerationSettings
a} :: Job)

-- | Relative priority on the job.
job_priority :: Lens.Lens' Job (Prelude.Maybe Prelude.Int)
job_priority :: (Maybe Int -> f (Maybe Int)) -> Job -> f Job
job_priority = (Job -> Maybe Int)
-> (Job -> Maybe Int -> Job)
-> Lens Job Job (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Int
priority :: Maybe Int
$sel:priority:Job' :: Job -> Maybe Int
priority} -> Maybe Int
priority) (\s :: Job
s@Job' {} Maybe Int
a -> Job
s {$sel:priority:Job' :: Maybe Int
priority = Maybe Int
a} :: Job)

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

-- | An identifier for this resource that is unique within all of AWS.
job_arn :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_arn :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_arn = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
arn :: Maybe Text
$sel:arn:Job' :: Job -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:arn:Job' :: Maybe Text
arn = Maybe Text
a} :: Job)

-- | The time, in Unix epoch format in seconds, when the job got created.
job_createdAt :: Lens.Lens' Job (Prelude.Maybe Prelude.UTCTime)
job_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Job -> f Job
job_createdAt = (Job -> Maybe POSIX)
-> (Job -> Maybe POSIX -> Job)
-> Lens Job Job (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Job' :: Job -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Job
s@Job' {} Maybe POSIX
a -> Job
s {$sel:createdAt:Job' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Job) ((Maybe POSIX -> f (Maybe POSIX)) -> Job -> f Job)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Optional list of hop destinations.
job_hopDestinations :: Lens.Lens' Job (Prelude.Maybe [HopDestination])
job_hopDestinations :: (Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> Job -> f Job
job_hopDestinations = (Job -> Maybe [HopDestination])
-> (Job -> Maybe [HopDestination] -> Job)
-> Lens Job Job (Maybe [HopDestination]) (Maybe [HopDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe [HopDestination]
hopDestinations :: Maybe [HopDestination]
$sel:hopDestinations:Job' :: Job -> Maybe [HopDestination]
hopDestinations} -> Maybe [HopDestination]
hopDestinations) (\s :: Job
s@Job' {} Maybe [HopDestination]
a -> Job
s {$sel:hopDestinations:Job' :: Maybe [HopDestination]
hopDestinations = Maybe [HopDestination]
a} :: Job) ((Maybe [HopDestination] -> f (Maybe [HopDestination]))
 -> Job -> f Job)
-> ((Maybe [HopDestination] -> f (Maybe [HopDestination]))
    -> Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> (Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> Job
-> f Job
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

-- | The number of times that the service automatically attempted to process
-- your job after encountering an error.
job_retryCount :: Lens.Lens' Job (Prelude.Maybe Prelude.Int)
job_retryCount :: (Maybe Int -> f (Maybe Int)) -> Job -> f Job
job_retryCount = (Job -> Maybe Int)
-> (Job -> Maybe Int -> Job)
-> Lens Job Job (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Int
retryCount :: Maybe Int
$sel:retryCount:Job' :: Job -> Maybe Int
retryCount} -> Maybe Int
retryCount) (\s :: Job
s@Job' {} Maybe Int
a -> Job
s {$sel:retryCount:Job' :: Maybe Int
retryCount = Maybe Int
a} :: Job)

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

-- | A job\'s phase can be PROBING, TRANSCODING OR UPLOADING
job_currentPhase :: Lens.Lens' Job (Prelude.Maybe JobPhase)
job_currentPhase :: (Maybe JobPhase -> f (Maybe JobPhase)) -> Job -> f Job
job_currentPhase = (Job -> Maybe JobPhase)
-> (Job -> Maybe JobPhase -> Job)
-> Lens Job Job (Maybe JobPhase) (Maybe JobPhase)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobPhase
currentPhase :: Maybe JobPhase
$sel:currentPhase:Job' :: Job -> Maybe JobPhase
currentPhase} -> Maybe JobPhase
currentPhase) (\s :: Job
s@Job' {} Maybe JobPhase
a -> Job
s {$sel:currentPhase:Job' :: Maybe JobPhase
currentPhase = Maybe JobPhase
a} :: Job)

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

-- | User-defined metadata that you want to associate with an MediaConvert
-- job. You specify metadata in key\/value pairs.
job_userMetadata :: Lens.Lens' Job (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
job_userMetadata :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job -> f Job
job_userMetadata = (Job -> Maybe (HashMap Text Text))
-> (Job -> Maybe (HashMap Text Text) -> Job)
-> Lens
     Job Job (Maybe (HashMap Text Text)) (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe (HashMap Text Text)
userMetadata :: Maybe (HashMap Text Text)
$sel:userMetadata:Job' :: Job -> Maybe (HashMap Text Text)
userMetadata} -> Maybe (HashMap Text Text)
userMetadata) (\s :: Job
s@Job' {} Maybe (HashMap Text Text)
a -> Job
s {$sel:userMetadata:Job' :: Maybe (HashMap Text Text)
userMetadata = Maybe (HashMap Text Text)
a} :: Job) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Job -> f Job)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | List of output group details
job_outputGroupDetails :: Lens.Lens' Job (Prelude.Maybe [OutputGroupDetail])
job_outputGroupDetails :: (Maybe [OutputGroupDetail] -> f (Maybe [OutputGroupDetail]))
-> Job -> f Job
job_outputGroupDetails = (Job -> Maybe [OutputGroupDetail])
-> (Job -> Maybe [OutputGroupDetail] -> Job)
-> Lens
     Job Job (Maybe [OutputGroupDetail]) (Maybe [OutputGroupDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe [OutputGroupDetail]
outputGroupDetails :: Maybe [OutputGroupDetail]
$sel:outputGroupDetails:Job' :: Job -> Maybe [OutputGroupDetail]
outputGroupDetails} -> Maybe [OutputGroupDetail]
outputGroupDetails) (\s :: Job
s@Job' {} Maybe [OutputGroupDetail]
a -> Job
s {$sel:outputGroupDetails:Job' :: Maybe [OutputGroupDetail]
outputGroupDetails = Maybe [OutputGroupDetail]
a} :: Job) ((Maybe [OutputGroupDetail] -> f (Maybe [OutputGroupDetail]))
 -> Job -> f Job)
-> ((Maybe [OutputGroupDetail] -> f (Maybe [OutputGroupDetail]))
    -> Maybe [OutputGroupDetail] -> f (Maybe [OutputGroupDetail]))
-> (Maybe [OutputGroupDetail] -> f (Maybe [OutputGroupDetail]))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OutputGroupDetail]
  [OutputGroupDetail]
  [OutputGroupDetail]
  [OutputGroupDetail]
-> Iso
     (Maybe [OutputGroupDetail])
     (Maybe [OutputGroupDetail])
     (Maybe [OutputGroupDetail])
     (Maybe [OutputGroupDetail])
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
  [OutputGroupDetail]
  [OutputGroupDetail]
  [OutputGroupDetail]
  [OutputGroupDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Error code for the job
job_errorCode :: Lens.Lens' Job (Prelude.Maybe Prelude.Int)
job_errorCode :: (Maybe Int -> f (Maybe Int)) -> Job -> f Job
job_errorCode = (Job -> Maybe Int)
-> (Job -> Maybe Int -> Job)
-> Lens Job Job (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Int
errorCode :: Maybe Int
$sel:errorCode:Job' :: Job -> Maybe Int
errorCode} -> Maybe Int
errorCode) (\s :: Job
s@Job' {} Maybe Int
a -> Job
s {$sel:errorCode:Job' :: Maybe Int
errorCode = Maybe Int
a} :: Job)

-- | The job\'s queue hopping history.
job_queueTransitions :: Lens.Lens' Job (Prelude.Maybe [QueueTransition])
job_queueTransitions :: (Maybe [QueueTransition] -> f (Maybe [QueueTransition]))
-> Job -> f Job
job_queueTransitions = (Job -> Maybe [QueueTransition])
-> (Job -> Maybe [QueueTransition] -> Job)
-> Lens Job Job (Maybe [QueueTransition]) (Maybe [QueueTransition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe [QueueTransition]
queueTransitions :: Maybe [QueueTransition]
$sel:queueTransitions:Job' :: Job -> Maybe [QueueTransition]
queueTransitions} -> Maybe [QueueTransition]
queueTransitions) (\s :: Job
s@Job' {} Maybe [QueueTransition]
a -> Job
s {$sel:queueTransitions:Job' :: Maybe [QueueTransition]
queueTransitions = Maybe [QueueTransition]
a} :: Job) ((Maybe [QueueTransition] -> f (Maybe [QueueTransition]))
 -> Job -> f Job)
-> ((Maybe [QueueTransition] -> f (Maybe [QueueTransition]))
    -> Maybe [QueueTransition] -> f (Maybe [QueueTransition]))
-> (Maybe [QueueTransition] -> f (Maybe [QueueTransition]))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [QueueTransition]
  [QueueTransition]
  [QueueTransition]
  [QueueTransition]
-> Iso
     (Maybe [QueueTransition])
     (Maybe [QueueTransition])
     (Maybe [QueueTransition])
     (Maybe [QueueTransition])
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
  [QueueTransition]
  [QueueTransition]
  [QueueTransition]
  [QueueTransition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A portion of the job\'s ARN, unique within your AWS Elemental
-- MediaConvert resources
job_id :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_id :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_id = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
id :: Maybe Text
$sel:id:Job' :: Job -> Maybe Text
id} -> Maybe Text
id) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:id:Job' :: Maybe Text
id = Maybe Text
a} :: Job)

-- | An estimate of how far your job has progressed. This estimate is shown
-- as a percentage of the total time from when your job leaves its queue to
-- when your output files appear in your output Amazon S3 bucket. AWS
-- Elemental MediaConvert provides jobPercentComplete in CloudWatch
-- STATUS_UPDATE events and in the response to GetJob and ListJobs
-- requests. The jobPercentComplete estimate is reliable for the following
-- input containers: Quicktime, Transport Stream, MP4, and MXF. For some
-- jobs, the service can\'t provide information about job progress. In
-- those cases, jobPercentComplete returns a null value.
job_jobPercentComplete :: Lens.Lens' Job (Prelude.Maybe Prelude.Int)
job_jobPercentComplete :: (Maybe Int -> f (Maybe Int)) -> Job -> f Job
job_jobPercentComplete = (Job -> Maybe Int)
-> (Job -> Maybe Int -> Job)
-> Lens Job Job (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Int
jobPercentComplete :: Maybe Int
$sel:jobPercentComplete:Job' :: Job -> Maybe Int
jobPercentComplete} -> Maybe Int
jobPercentComplete) (\s :: Job
s@Job' {} Maybe Int
a -> Job
s {$sel:jobPercentComplete:Job' :: Maybe Int
jobPercentComplete = Maybe Int
a} :: Job)

-- | Information about when jobs are submitted, started, and finished is
-- specified in Unix epoch format in seconds.
job_timing :: Lens.Lens' Job (Prelude.Maybe Timing)
job_timing :: (Maybe Timing -> f (Maybe Timing)) -> Job -> f Job
job_timing = (Job -> Maybe Timing)
-> (Job -> Maybe Timing -> Job)
-> Lens Job Job (Maybe Timing) (Maybe Timing)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Timing
timing :: Maybe Timing
$sel:timing:Job' :: Job -> Maybe Timing
timing} -> Maybe Timing
timing) (\s :: Job
s@Job' {} Maybe Timing
a -> Job
s {$sel:timing:Job' :: Maybe Timing
timing = Maybe Timing
a} :: Job)

-- | Provides messages from the service about jobs that you have already
-- successfully submitted.
job_messages :: Lens.Lens' Job (Prelude.Maybe JobMessages)
job_messages :: (Maybe JobMessages -> f (Maybe JobMessages)) -> Job -> f Job
job_messages = (Job -> Maybe JobMessages)
-> (Job -> Maybe JobMessages -> Job)
-> Lens Job Job (Maybe JobMessages) (Maybe JobMessages)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobMessages
messages :: Maybe JobMessages
$sel:messages:Job' :: Job -> Maybe JobMessages
messages} -> Maybe JobMessages
messages) (\s :: Job
s@Job' {} Maybe JobMessages
a -> Job
s {$sel:messages:Job' :: Maybe JobMessages
messages = Maybe JobMessages
a} :: Job)

-- | Error message of Job
job_errorMessage :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_errorMessage :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_errorMessage = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:Job' :: Job -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:errorMessage:Job' :: Maybe Text
errorMessage = Maybe Text
a} :: Job)

-- | Describes whether the current job is running with accelerated
-- transcoding. For jobs that have Acceleration (AccelerationMode) set to
-- DISABLED, AccelerationStatus is always NOT_APPLICABLE. For jobs that
-- have Acceleration (AccelerationMode) set to ENABLED or PREFERRED,
-- AccelerationStatus is one of the other states. AccelerationStatus is
-- IN_PROGRESS initially, while the service determines whether the input
-- files and job settings are compatible with accelerated transcoding. If
-- they are, AcclerationStatus is ACCELERATED. If your input files and job
-- settings aren\'t compatible with accelerated transcoding, the service
-- either fails your job or runs it without accelerated transcoding,
-- depending on how you set Acceleration (AccelerationMode). When the
-- service runs your job without accelerated transcoding,
-- AccelerationStatus is NOT_ACCELERATED.
job_accelerationStatus :: Lens.Lens' Job (Prelude.Maybe AccelerationStatus)
job_accelerationStatus :: (Maybe AccelerationStatus -> f (Maybe AccelerationStatus))
-> Job -> f Job
job_accelerationStatus = (Job -> Maybe AccelerationStatus)
-> (Job -> Maybe AccelerationStatus -> Job)
-> Lens
     Job Job (Maybe AccelerationStatus) (Maybe AccelerationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe AccelerationStatus
accelerationStatus :: Maybe AccelerationStatus
$sel:accelerationStatus:Job' :: Job -> Maybe AccelerationStatus
accelerationStatus} -> Maybe AccelerationStatus
accelerationStatus) (\s :: Job
s@Job' {} Maybe AccelerationStatus
a -> Job
s {$sel:accelerationStatus:Job' :: Maybe AccelerationStatus
accelerationStatus = Maybe AccelerationStatus
a} :: Job)

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

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

instance Core.FromJSON Job where
  parseJSON :: Value -> Parser Job
parseJSON =
    String -> (Object -> Parser Job) -> Value -> Parser Job
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Job"
      ( \Object
x ->
          Maybe JobStatus
-> Maybe Text
-> Maybe AccelerationSettings
-> Maybe Int
-> Maybe StatusUpdateInterval
-> Maybe Text
-> Maybe POSIX
-> Maybe [HopDestination]
-> Maybe Int
-> Maybe SimulateReservedQueue
-> Maybe JobPhase
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe BillingTagsSource
-> Maybe [OutputGroupDetail]
-> Maybe Int
-> Maybe [QueueTransition]
-> Maybe Text
-> Maybe Int
-> Maybe Timing
-> Maybe JobMessages
-> Maybe Text
-> Maybe AccelerationStatus
-> Text
-> JobSettings
-> Job
Job'
            (Maybe JobStatus
 -> Maybe Text
 -> Maybe AccelerationSettings
 -> Maybe Int
 -> Maybe StatusUpdateInterval
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [HopDestination]
 -> Maybe Int
 -> Maybe SimulateReservedQueue
 -> Maybe JobPhase
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe BillingTagsSource
 -> Maybe [OutputGroupDetail]
 -> Maybe Int
 -> Maybe [QueueTransition]
 -> Maybe Text
 -> Maybe Int
 -> Maybe Timing
 -> Maybe JobMessages
 -> Maybe Text
 -> Maybe AccelerationStatus
 -> Text
 -> JobSettings
 -> Job)
-> Parser (Maybe JobStatus)
-> Parser
     (Maybe Text
      -> Maybe AccelerationSettings
      -> Maybe Int
      -> Maybe StatusUpdateInterval
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [HopDestination]
      -> Maybe Int
      -> Maybe SimulateReservedQueue
      -> Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe JobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe AccelerationSettings
   -> Maybe Int
   -> Maybe StatusUpdateInterval
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [HopDestination]
   -> Maybe Int
   -> Maybe SimulateReservedQueue
   -> Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe AccelerationSettings
      -> Maybe Int
      -> Maybe StatusUpdateInterval
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [HopDestination]
      -> Maybe Int
      -> Maybe SimulateReservedQueue
      -> Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobTemplate")
            Parser
  (Maybe AccelerationSettings
   -> Maybe Int
   -> Maybe StatusUpdateInterval
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [HopDestination]
   -> Maybe Int
   -> Maybe SimulateReservedQueue
   -> Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe AccelerationSettings)
-> Parser
     (Maybe Int
      -> Maybe StatusUpdateInterval
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [HopDestination]
      -> Maybe Int
      -> Maybe SimulateReservedQueue
      -> Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccelerationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"accelerationSettings")
            Parser
  (Maybe Int
   -> Maybe StatusUpdateInterval
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [HopDestination]
   -> Maybe Int
   -> Maybe SimulateReservedQueue
   -> Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe Int)
-> Parser
     (Maybe StatusUpdateInterval
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [HopDestination]
      -> Maybe Int
      -> Maybe SimulateReservedQueue
      -> Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"priority")
            Parser
  (Maybe StatusUpdateInterval
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [HopDestination]
   -> Maybe Int
   -> Maybe SimulateReservedQueue
   -> Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe StatusUpdateInterval)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe [HopDestination]
      -> Maybe Int
      -> Maybe SimulateReservedQueue
      -> Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StatusUpdateInterval)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusUpdateInterval")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe [HopDestination]
   -> Maybe Int
   -> Maybe SimulateReservedQueue
   -> Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe [HopDestination]
      -> Maybe Int
      -> Maybe SimulateReservedQueue
      -> Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe POSIX
   -> Maybe [HopDestination]
   -> Maybe Int
   -> Maybe SimulateReservedQueue
   -> Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [HopDestination]
      -> Maybe Int
      -> Maybe SimulateReservedQueue
      -> Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
            Parser
  (Maybe [HopDestination]
   -> Maybe Int
   -> Maybe SimulateReservedQueue
   -> Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe [HopDestination])
-> Parser
     (Maybe Int
      -> Maybe SimulateReservedQueue
      -> Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [HopDestination]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hopDestinations"
                            Parser (Maybe (Maybe [HopDestination]))
-> Maybe [HopDestination] -> Parser (Maybe [HopDestination])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [HopDestination]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Int
   -> Maybe SimulateReservedQueue
   -> Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe Int)
-> Parser
     (Maybe SimulateReservedQueue
      -> Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"retryCount")
            Parser
  (Maybe SimulateReservedQueue
   -> Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe SimulateReservedQueue)
-> Parser
     (Maybe JobPhase
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SimulateReservedQueue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"simulateReservedQueue")
            Parser
  (Maybe JobPhase
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe JobPhase)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobPhase)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"currentPhase")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"queue")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe BillingTagsSource
      -> Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"userMetadata" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe BillingTagsSource
   -> Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe BillingTagsSource)
-> Parser
     (Maybe [OutputGroupDetail]
      -> Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BillingTagsSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"billingTagsSource")
            Parser
  (Maybe [OutputGroupDetail]
   -> Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe [OutputGroupDetail])
-> Parser
     (Maybe Int
      -> Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [OutputGroupDetail]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputGroupDetails"
                            Parser (Maybe (Maybe [OutputGroupDetail]))
-> Maybe [OutputGroupDetail] -> Parser (Maybe [OutputGroupDetail])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [OutputGroupDetail]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Int
   -> Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe Int)
-> Parser
     (Maybe [QueueTransition]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"errorCode")
            Parser
  (Maybe [QueueTransition]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe [QueueTransition])
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [QueueTransition]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"queueTransitions"
                            Parser (Maybe (Maybe [QueueTransition]))
-> Maybe [QueueTransition] -> Parser (Maybe [QueueTransition])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [QueueTransition]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"id")
            Parser
  (Maybe Int
   -> Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe Int)
-> Parser
     (Maybe Timing
      -> Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobPercentComplete")
            Parser
  (Maybe Timing
   -> Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe Timing)
-> Parser
     (Maybe JobMessages
      -> Maybe Text
      -> Maybe AccelerationStatus
      -> Text
      -> JobSettings
      -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Timing)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timing")
            Parser
  (Maybe JobMessages
   -> Maybe Text
   -> Maybe AccelerationStatus
   -> Text
   -> JobSettings
   -> Job)
-> Parser (Maybe JobMessages)
-> Parser
     (Maybe Text
      -> Maybe AccelerationStatus -> Text -> JobSettings -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobMessages)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"messages")
            Parser
  (Maybe Text
   -> Maybe AccelerationStatus -> Text -> JobSettings -> Job)
-> Parser (Maybe Text)
-> Parser (Maybe AccelerationStatus -> Text -> JobSettings -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"errorMessage")
            Parser (Maybe AccelerationStatus -> Text -> JobSettings -> Job)
-> Parser (Maybe AccelerationStatus)
-> Parser (Text -> JobSettings -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccelerationStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"accelerationStatus")
            Parser (Text -> JobSettings -> Job)
-> Parser Text -> Parser (JobSettings -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"role")
            Parser (JobSettings -> Job) -> Parser JobSettings -> Parser Job
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser JobSettings
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"settings")
      )

instance Prelude.Hashable Job

instance Prelude.NFData Job