{-# 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.ElasticTranscoder.Types.Job
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ElasticTranscoder.Types.Job where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticTranscoder.Types.JobInput
import Amazonka.ElasticTranscoder.Types.JobOutput
import Amazonka.ElasticTranscoder.Types.Playlist
import Amazonka.ElasticTranscoder.Types.Timing
import qualified Amazonka.Prelude as Prelude

-- | A section of the response body that provides information about the job
-- that is created.
--
-- /See:/ 'newJob' smart constructor.
data Job = Job'
  { -- | The Amazon Resource Name (ARN) for the job.
    Job -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The identifier that Elastic Transcoder assigned to the job. You use this
    -- value to get settings for the job or to delete the job.
    Job -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | A section of the request or response body that provides information
    -- about the file that is being transcoded.
    Job -> Maybe JobInput
input :: Prelude.Maybe JobInput,
    -- | Information about the files that you\'re transcoding. If you specified
    -- multiple files for this job, Elastic Transcoder stitches the files
    -- together to make one output.
    Job -> Maybe [JobInput]
inputs :: Prelude.Maybe [JobInput],
    -- | If you specified one output for a job, information about that output. If
    -- you specified multiple outputs for a job, the Output object lists
    -- information about the first output. This duplicates the information that
    -- is listed for the first output in the Outputs object.
    --
    -- Outputs recommended instead.
    --
    -- A section of the request or response body that provides information
    -- about the transcoded (target) file.
    Job -> Maybe JobOutput
output :: Prelude.Maybe JobOutput,
    -- | The value, if any, that you want Elastic Transcoder to prepend to the
    -- names of all files that this job creates, including output files,
    -- thumbnails, and playlists. We recommend that you add a \/ or some other
    -- delimiter to the end of the @OutputKeyPrefix@.
    Job -> Maybe Text
outputKeyPrefix :: Prelude.Maybe Prelude.Text,
    -- | Information about the output files. We recommend that you use the
    -- @Outputs@ syntax for all jobs, even when you want Elastic Transcoder to
    -- transcode a file into only one format. Do not use both the @Outputs@ and
    -- @Output@ syntaxes in the same request. You can create a maximum of 30
    -- outputs per job.
    --
    -- If you specify more than one output for a job, Elastic Transcoder
    -- creates the files for each output in the order in which you specify them
    -- in the job.
    Job -> Maybe [JobOutput]
outputs :: Prelude.Maybe [JobOutput],
    -- | The @Id@ of the pipeline that you want Elastic Transcoder to use for
    -- transcoding. The pipeline determines several settings, including the
    -- Amazon S3 bucket from which Elastic Transcoder gets the files to
    -- transcode and the bucket into which Elastic Transcoder puts the
    -- transcoded files.
    Job -> Maybe Text
pipelineId :: Prelude.Maybe Prelude.Text,
    -- | Outputs in Fragmented MP4 or MPEG-TS format only.
    --
    -- If you specify a preset in @PresetId@ for which the value of @Container@
    -- is fmp4 (Fragmented MP4) or ts (MPEG-TS), @Playlists@ contains
    -- information about the master playlists that you want Elastic Transcoder
    -- to create.
    --
    -- The maximum number of master playlists in a job is 30.
    Job -> Maybe [Playlist]
playlists :: Prelude.Maybe [Playlist],
    -- | The status of the job: @Submitted@, @Progressing@, @Complete@,
    -- @Canceled@, or @Error@.
    Job -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | Details about the timing of a job.
    Job -> Maybe Timing
timing :: Prelude.Maybe Timing,
    -- | User-defined metadata that you want to associate with an Elastic
    -- Transcoder job. You specify metadata in @key\/value@ pairs, and you can
    -- add up to 10 @key\/value@ pairs per job. Elastic Transcoder does not
    -- guarantee that @key\/value@ pairs are returned in the same order in
    -- which you specify them.
    --
    -- Metadata @keys@ and @values@ must use characters from the following
    -- list:
    --
    -- -   @0-9@
    --
    -- -   @A-Z@ and @a-z@
    --
    -- -   @Space@
    --
    -- -   The following symbols: @_.:\/=+-%\@@
    Job -> Maybe (HashMap Text Text)
userMetadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (Job -> Job -> Bool
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]
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
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. 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:
--
-- 'arn', 'job_arn' - The Amazon Resource Name (ARN) for the job.
--
-- 'id', 'job_id' - The identifier that Elastic Transcoder assigned to the job. You use this
-- value to get settings for the job or to delete the job.
--
-- 'input', 'job_input' - A section of the request or response body that provides information
-- about the file that is being transcoded.
--
-- 'inputs', 'job_inputs' - Information about the files that you\'re transcoding. If you specified
-- multiple files for this job, Elastic Transcoder stitches the files
-- together to make one output.
--
-- 'output', 'job_output' - If you specified one output for a job, information about that output. If
-- you specified multiple outputs for a job, the Output object lists
-- information about the first output. This duplicates the information that
-- is listed for the first output in the Outputs object.
--
-- Outputs recommended instead.
--
-- A section of the request or response body that provides information
-- about the transcoded (target) file.
--
-- 'outputKeyPrefix', 'job_outputKeyPrefix' - The value, if any, that you want Elastic Transcoder to prepend to the
-- names of all files that this job creates, including output files,
-- thumbnails, and playlists. We recommend that you add a \/ or some other
-- delimiter to the end of the @OutputKeyPrefix@.
--
-- 'outputs', 'job_outputs' - Information about the output files. We recommend that you use the
-- @Outputs@ syntax for all jobs, even when you want Elastic Transcoder to
-- transcode a file into only one format. Do not use both the @Outputs@ and
-- @Output@ syntaxes in the same request. You can create a maximum of 30
-- outputs per job.
--
-- If you specify more than one output for a job, Elastic Transcoder
-- creates the files for each output in the order in which you specify them
-- in the job.
--
-- 'pipelineId', 'job_pipelineId' - The @Id@ of the pipeline that you want Elastic Transcoder to use for
-- transcoding. The pipeline determines several settings, including the
-- Amazon S3 bucket from which Elastic Transcoder gets the files to
-- transcode and the bucket into which Elastic Transcoder puts the
-- transcoded files.
--
-- 'playlists', 'job_playlists' - Outputs in Fragmented MP4 or MPEG-TS format only.
--
-- If you specify a preset in @PresetId@ for which the value of @Container@
-- is fmp4 (Fragmented MP4) or ts (MPEG-TS), @Playlists@ contains
-- information about the master playlists that you want Elastic Transcoder
-- to create.
--
-- The maximum number of master playlists in a job is 30.
--
-- 'status', 'job_status' - The status of the job: @Submitted@, @Progressing@, @Complete@,
-- @Canceled@, or @Error@.
--
-- 'timing', 'job_timing' - Details about the timing of a job.
--
-- 'userMetadata', 'job_userMetadata' - User-defined metadata that you want to associate with an Elastic
-- Transcoder job. You specify metadata in @key\/value@ pairs, and you can
-- add up to 10 @key\/value@ pairs per job. Elastic Transcoder does not
-- guarantee that @key\/value@ pairs are returned in the same order in
-- which you specify them.
--
-- Metadata @keys@ and @values@ must use characters from the following
-- list:
--
-- -   @0-9@
--
-- -   @A-Z@ and @a-z@
--
-- -   @Space@
--
-- -   The following symbols: @_.:\/=+-%\@@
newJob ::
  Job
newJob :: Job
newJob =
  Job'
    { $sel:arn:Job' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:id:Job' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:input:Job' :: Maybe JobInput
input = forall a. Maybe a
Prelude.Nothing,
      $sel:inputs:Job' :: Maybe [JobInput]
inputs = forall a. Maybe a
Prelude.Nothing,
      $sel:output:Job' :: Maybe JobOutput
output = forall a. Maybe a
Prelude.Nothing,
      $sel:outputKeyPrefix:Job' :: Maybe Text
outputKeyPrefix = forall a. Maybe a
Prelude.Nothing,
      $sel:outputs:Job' :: Maybe [JobOutput]
outputs = forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineId:Job' :: Maybe Text
pipelineId = forall a. Maybe a
Prelude.Nothing,
      $sel:playlists:Job' :: Maybe [Playlist]
playlists = forall a. Maybe a
Prelude.Nothing,
      $sel:status:Job' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
      $sel:timing:Job' :: Maybe Timing
timing = forall a. Maybe a
Prelude.Nothing,
      $sel:userMetadata:Job' :: Maybe (HashMap Text Text)
userMetadata = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) for the job.
job_arn :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_arn :: Lens' Job (Maybe Text)
job_arn = 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 identifier that Elastic Transcoder assigned to the job. You use this
-- value to get settings for the job or to delete the job.
job_id :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_id :: Lens' Job (Maybe Text)
job_id = 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)

-- | A section of the request or response body that provides information
-- about the file that is being transcoded.
job_input :: Lens.Lens' Job (Prelude.Maybe JobInput)
job_input :: Lens' Job (Maybe JobInput)
job_input = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobInput
input :: Maybe JobInput
$sel:input:Job' :: Job -> Maybe JobInput
input} -> Maybe JobInput
input) (\s :: Job
s@Job' {} Maybe JobInput
a -> Job
s {$sel:input:Job' :: Maybe JobInput
input = Maybe JobInput
a} :: Job)

-- | Information about the files that you\'re transcoding. If you specified
-- multiple files for this job, Elastic Transcoder stitches the files
-- together to make one output.
job_inputs :: Lens.Lens' Job (Prelude.Maybe [JobInput])
job_inputs :: Lens' Job (Maybe [JobInput])
job_inputs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe [JobInput]
inputs :: Maybe [JobInput]
$sel:inputs:Job' :: Job -> Maybe [JobInput]
inputs} -> Maybe [JobInput]
inputs) (\s :: Job
s@Job' {} Maybe [JobInput]
a -> Job
s {$sel:inputs:Job' :: Maybe [JobInput]
inputs = Maybe [JobInput]
a} :: Job) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If you specified one output for a job, information about that output. If
-- you specified multiple outputs for a job, the Output object lists
-- information about the first output. This duplicates the information that
-- is listed for the first output in the Outputs object.
--
-- Outputs recommended instead.
--
-- A section of the request or response body that provides information
-- about the transcoded (target) file.
job_output :: Lens.Lens' Job (Prelude.Maybe JobOutput)
job_output :: Lens' Job (Maybe JobOutput)
job_output = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobOutput
output :: Maybe JobOutput
$sel:output:Job' :: Job -> Maybe JobOutput
output} -> Maybe JobOutput
output) (\s :: Job
s@Job' {} Maybe JobOutput
a -> Job
s {$sel:output:Job' :: Maybe JobOutput
output = Maybe JobOutput
a} :: Job)

-- | The value, if any, that you want Elastic Transcoder to prepend to the
-- names of all files that this job creates, including output files,
-- thumbnails, and playlists. We recommend that you add a \/ or some other
-- delimiter to the end of the @OutputKeyPrefix@.
job_outputKeyPrefix :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_outputKeyPrefix :: Lens' Job (Maybe Text)
job_outputKeyPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
outputKeyPrefix :: Maybe Text
$sel:outputKeyPrefix:Job' :: Job -> Maybe Text
outputKeyPrefix} -> Maybe Text
outputKeyPrefix) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:outputKeyPrefix:Job' :: Maybe Text
outputKeyPrefix = Maybe Text
a} :: Job)

-- | Information about the output files. We recommend that you use the
-- @Outputs@ syntax for all jobs, even when you want Elastic Transcoder to
-- transcode a file into only one format. Do not use both the @Outputs@ and
-- @Output@ syntaxes in the same request. You can create a maximum of 30
-- outputs per job.
--
-- If you specify more than one output for a job, Elastic Transcoder
-- creates the files for each output in the order in which you specify them
-- in the job.
job_outputs :: Lens.Lens' Job (Prelude.Maybe [JobOutput])
job_outputs :: Lens' Job (Maybe [JobOutput])
job_outputs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe [JobOutput]
outputs :: Maybe [JobOutput]
$sel:outputs:Job' :: Job -> Maybe [JobOutput]
outputs} -> Maybe [JobOutput]
outputs) (\s :: Job
s@Job' {} Maybe [JobOutput]
a -> Job
s {$sel:outputs:Job' :: Maybe [JobOutput]
outputs = Maybe [JobOutput]
a} :: Job) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The @Id@ of the pipeline that you want Elastic Transcoder to use for
-- transcoding. The pipeline determines several settings, including the
-- Amazon S3 bucket from which Elastic Transcoder gets the files to
-- transcode and the bucket into which Elastic Transcoder puts the
-- transcoded files.
job_pipelineId :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_pipelineId :: Lens' Job (Maybe Text)
job_pipelineId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
pipelineId :: Maybe Text
$sel:pipelineId:Job' :: Job -> Maybe Text
pipelineId} -> Maybe Text
pipelineId) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:pipelineId:Job' :: Maybe Text
pipelineId = Maybe Text
a} :: Job)

-- | Outputs in Fragmented MP4 or MPEG-TS format only.
--
-- If you specify a preset in @PresetId@ for which the value of @Container@
-- is fmp4 (Fragmented MP4) or ts (MPEG-TS), @Playlists@ contains
-- information about the master playlists that you want Elastic Transcoder
-- to create.
--
-- The maximum number of master playlists in a job is 30.
job_playlists :: Lens.Lens' Job (Prelude.Maybe [Playlist])
job_playlists :: Lens' Job (Maybe [Playlist])
job_playlists = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe [Playlist]
playlists :: Maybe [Playlist]
$sel:playlists:Job' :: Job -> Maybe [Playlist]
playlists} -> Maybe [Playlist]
playlists) (\s :: Job
s@Job' {} Maybe [Playlist]
a -> Job
s {$sel:playlists:Job' :: Maybe [Playlist]
playlists = Maybe [Playlist]
a} :: Job) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The status of the job: @Submitted@, @Progressing@, @Complete@,
-- @Canceled@, or @Error@.
job_status :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_status :: Lens' Job (Maybe Text)
job_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
status :: Maybe Text
$sel:status:Job' :: Job -> Maybe Text
status} -> Maybe Text
status) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:status:Job' :: Maybe Text
status = Maybe Text
a} :: Job)

-- | Details about the timing of a job.
job_timing :: Lens.Lens' Job (Prelude.Maybe Timing)
job_timing :: Lens' Job (Maybe Timing)
job_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)

-- | User-defined metadata that you want to associate with an Elastic
-- Transcoder job. You specify metadata in @key\/value@ pairs, and you can
-- add up to 10 @key\/value@ pairs per job. Elastic Transcoder does not
-- guarantee that @key\/value@ pairs are returned in the same order in
-- which you specify them.
--
-- Metadata @keys@ and @values@ must use characters from the following
-- list:
--
-- -   @0-9@
--
-- -   @A-Z@ and @a-z@
--
-- -   @Space@
--
-- -   The following symbols: @_.:\/=+-%\@@
job_userMetadata :: Lens.Lens' Job (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
job_userMetadata :: Lens' Job (Maybe (HashMap Text Text))
job_userMetadata = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON Job where
  parseJSON :: Value -> Parser Job
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Job"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe JobInput
-> Maybe [JobInput]
-> Maybe JobOutput
-> Maybe Text
-> Maybe [JobOutput]
-> Maybe Text
-> Maybe [Playlist]
-> Maybe Text
-> Maybe Timing
-> Maybe (HashMap Text Text)
-> Job
Job'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Input")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Inputs" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Output")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OutputKeyPrefix")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Outputs" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PipelineId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Playlists" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Timing")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UserMetadata" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable Job where
  hashWithSalt :: Int -> Job -> Int
hashWithSalt Int
_salt Job' {Maybe [Playlist]
Maybe [JobInput]
Maybe [JobOutput]
Maybe Text
Maybe (HashMap Text Text)
Maybe JobInput
Maybe JobOutput
Maybe Timing
userMetadata :: Maybe (HashMap Text Text)
timing :: Maybe Timing
status :: Maybe Text
playlists :: Maybe [Playlist]
pipelineId :: Maybe Text
outputs :: Maybe [JobOutput]
outputKeyPrefix :: Maybe Text
output :: Maybe JobOutput
inputs :: Maybe [JobInput]
input :: Maybe JobInput
id :: Maybe Text
arn :: Maybe Text
$sel:userMetadata:Job' :: Job -> Maybe (HashMap Text Text)
$sel:timing:Job' :: Job -> Maybe Timing
$sel:status:Job' :: Job -> Maybe Text
$sel:playlists:Job' :: Job -> Maybe [Playlist]
$sel:pipelineId:Job' :: Job -> Maybe Text
$sel:outputs:Job' :: Job -> Maybe [JobOutput]
$sel:outputKeyPrefix:Job' :: Job -> Maybe Text
$sel:output:Job' :: Job -> Maybe JobOutput
$sel:inputs:Job' :: Job -> Maybe [JobInput]
$sel:input:Job' :: Job -> Maybe JobInput
$sel:id:Job' :: Job -> Maybe Text
$sel:arn:Job' :: Job -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobInput
input
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [JobInput]
inputs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobOutput
output
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputKeyPrefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [JobOutput]
outputs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pipelineId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Playlist]
playlists
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Timing
timing
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
userMetadata

instance Prelude.NFData Job where
  rnf :: Job -> ()
rnf Job' {Maybe [Playlist]
Maybe [JobInput]
Maybe [JobOutput]
Maybe Text
Maybe (HashMap Text Text)
Maybe JobInput
Maybe JobOutput
Maybe Timing
userMetadata :: Maybe (HashMap Text Text)
timing :: Maybe Timing
status :: Maybe Text
playlists :: Maybe [Playlist]
pipelineId :: Maybe Text
outputs :: Maybe [JobOutput]
outputKeyPrefix :: Maybe Text
output :: Maybe JobOutput
inputs :: Maybe [JobInput]
input :: Maybe JobInput
id :: Maybe Text
arn :: Maybe Text
$sel:userMetadata:Job' :: Job -> Maybe (HashMap Text Text)
$sel:timing:Job' :: Job -> Maybe Timing
$sel:status:Job' :: Job -> Maybe Text
$sel:playlists:Job' :: Job -> Maybe [Playlist]
$sel:pipelineId:Job' :: Job -> Maybe Text
$sel:outputs:Job' :: Job -> Maybe [JobOutput]
$sel:outputKeyPrefix:Job' :: Job -> Maybe Text
$sel:output:Job' :: Job -> Maybe JobOutput
$sel:inputs:Job' :: Job -> Maybe [JobInput]
$sel:input:Job' :: Job -> Maybe JobInput
$sel:id:Job' :: Job -> Maybe Text
$sel:arn:Job' :: Job -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobInput
input
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [JobInput]
inputs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobOutput
output
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputKeyPrefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [JobOutput]
outputs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pipelineId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Playlist]
playlists
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Timing
timing
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
userMetadata