{-# 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.JobInput
-- 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.ElasticTranscoder.Types.JobInput where

import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.Types.DetectedProperties
import Amazonka.ElasticTranscoder.Types.Encryption
import Amazonka.ElasticTranscoder.Types.InputCaptions
import Amazonka.ElasticTranscoder.Types.TimeSpan
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the file that you\'re transcoding.
--
-- /See:/ 'newJobInput' smart constructor.
data JobInput = JobInput'
  { -- | The frame rate of the input file. If you want Elastic Transcoder to
    -- automatically detect the frame rate of the input file, specify @auto@.
    -- If you want to specify the frame rate for the input file, enter one of
    -- the following values:
    --
    -- @10@, @15@, @23.97@, @24@, @25@, @29.97@, @30@, @60@
    --
    -- If you specify a value other than @auto@, Elastic Transcoder disables
    -- automatic detection of the frame rate.
    JobInput -> Maybe Text
frameRate :: Prelude.Maybe Prelude.Text,
    -- | This value must be @auto@, which causes Elastic Transcoder to
    -- automatically detect the resolution of the input file.
    JobInput -> Maybe Text
resolution :: Prelude.Maybe Prelude.Text,
    -- | The aspect ratio of the input file. If you want Elastic Transcoder to
    -- automatically detect the aspect ratio of the input file, specify @auto@.
    -- If you want to specify the aspect ratio for the output file, enter one
    -- of the following values:
    --
    -- @1:1@, @4:3@, @3:2@, @16:9@
    --
    -- If you specify a value other than @auto@, Elastic Transcoder disables
    -- automatic detection of the aspect ratio.
    JobInput -> Maybe Text
aspectRatio :: Prelude.Maybe Prelude.Text,
    -- | Settings for clipping an input. Each input can have different clip
    -- settings.
    JobInput -> Maybe TimeSpan
timeSpan :: Prelude.Maybe TimeSpan,
    -- | The encryption settings, if any, that are used for decrypting your input
    -- files. If your input file is encrypted, you must specify the mode that
    -- Elastic Transcoder uses to decrypt your file.
    JobInput -> Maybe Encryption
encryption :: Prelude.Maybe Encryption,
    -- | The name of the file to transcode. Elsewhere in the body of the JSON
    -- block is the the ID of the pipeline to use for processing the job. The
    -- @InputBucket@ object in that pipeline tells Elastic Transcoder which
    -- Amazon S3 bucket to get the file from.
    --
    -- If the file name includes a prefix, such as @cooking\/lasagna.mpg@,
    -- include the prefix in the key. If the file isn\'t in the specified
    -- bucket, Elastic Transcoder returns an error.
    JobInput -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
    -- | The detected properties of the input file.
    JobInput -> Maybe DetectedProperties
detectedProperties :: Prelude.Maybe DetectedProperties,
    -- | The container type for the input file. If you want Elastic Transcoder to
    -- automatically detect the container type of the input file, specify
    -- @auto@. If you want to specify the container type for the input file,
    -- enter one of the following values:
    --
    -- @3gp@, @aac@, @asf@, @avi@, @divx@, @flv@, @m4a@, @mkv@, @mov@, @mp3@,
    -- @mp4@, @mpeg@, @mpeg-ps@, @mpeg-ts@, @mxf@, @ogg@, @vob@, @wav@, @webm@
    JobInput -> Maybe Text
container :: Prelude.Maybe Prelude.Text,
    -- | Whether the input file is interlaced. If you want Elastic Transcoder to
    -- automatically detect whether the input file is interlaced, specify
    -- @auto@. If you want to specify whether the input file is interlaced,
    -- enter one of the following values:
    --
    -- @true@, @false@
    --
    -- If you specify a value other than @auto@, Elastic Transcoder disables
    -- automatic detection of interlacing.
    JobInput -> Maybe Text
interlaced :: Prelude.Maybe Prelude.Text,
    -- | You can configure Elastic Transcoder to transcode captions, or
    -- subtitles, from one format to another. All captions must be in UTF-8.
    -- Elastic Transcoder supports two types of captions:
    --
    -- -   __Embedded:__ Embedded captions are included in the same file as the
    --     audio and video. Elastic Transcoder supports only one embedded
    --     caption per language, to a maximum of 300 embedded captions per
    --     file.
    --
    --     Valid input values include: @CEA-608 (EIA-608@, first non-empty
    --     channel only), @CEA-708 (EIA-708@, first non-empty channel only),
    --     and @mov-text@
    --
    --     Valid outputs include: @mov-text@
    --
    --     Elastic Transcoder supports a maximum of one embedded format per
    --     output.
    --
    -- -   __Sidecar:__ Sidecar captions are kept in a separate metadata file
    --     from the audio and video data. Sidecar captions require a player
    --     that is capable of understanding the relationship between the video
    --     file and the sidecar file. Elastic Transcoder supports only one
    --     sidecar caption per language, to a maximum of 20 sidecar captions
    --     per file.
    --
    --     Valid input values include: @dfxp@ (first div element only),
    --     @ebu-tt@, @scc@, @smpt@, @srt@, @ttml@ (first div element only), and
    --     @webvtt@
    --
    --     Valid outputs include: @dfxp@ (first div element only), @scc@,
    --     @srt@, and @webvtt@.
    --
    -- If you want ttml or smpte-tt compatible captions, specify dfxp as your
    -- output format.
    --
    -- Elastic Transcoder does not support OCR (Optical Character Recognition),
    -- does not accept pictures as a valid input for captions, and is not
    -- available for audio-only transcoding. Elastic Transcoder does not
    -- preserve text formatting (for example, italics) during the transcoding
    -- process.
    --
    -- To remove captions or leave the captions empty, set @Captions@ to null.
    -- To pass through existing captions unchanged, set the @MergePolicy@ to
    -- @MergeRetain@, and pass in a null @CaptionSources@ array.
    --
    -- For more information on embedded files, see the Subtitles Wikipedia
    -- page.
    --
    -- For more information on sidecar files, see the Extensible Metadata
    -- Platform and Sidecar file Wikipedia pages.
    JobInput -> Maybe InputCaptions
inputCaptions :: Prelude.Maybe InputCaptions
  }
  deriving (JobInput -> JobInput -> Bool
(JobInput -> JobInput -> Bool)
-> (JobInput -> JobInput -> Bool) -> Eq JobInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobInput -> JobInput -> Bool
$c/= :: JobInput -> JobInput -> Bool
== :: JobInput -> JobInput -> Bool
$c== :: JobInput -> JobInput -> Bool
Prelude.Eq, ReadPrec [JobInput]
ReadPrec JobInput
Int -> ReadS JobInput
ReadS [JobInput]
(Int -> ReadS JobInput)
-> ReadS [JobInput]
-> ReadPrec JobInput
-> ReadPrec [JobInput]
-> Read JobInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobInput]
$creadListPrec :: ReadPrec [JobInput]
readPrec :: ReadPrec JobInput
$creadPrec :: ReadPrec JobInput
readList :: ReadS [JobInput]
$creadList :: ReadS [JobInput]
readsPrec :: Int -> ReadS JobInput
$creadsPrec :: Int -> ReadS JobInput
Prelude.Read, Int -> JobInput -> ShowS
[JobInput] -> ShowS
JobInput -> String
(Int -> JobInput -> ShowS)
-> (JobInput -> String) -> ([JobInput] -> ShowS) -> Show JobInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobInput] -> ShowS
$cshowList :: [JobInput] -> ShowS
show :: JobInput -> String
$cshow :: JobInput -> String
showsPrec :: Int -> JobInput -> ShowS
$cshowsPrec :: Int -> JobInput -> ShowS
Prelude.Show, (forall x. JobInput -> Rep JobInput x)
-> (forall x. Rep JobInput x -> JobInput) -> Generic JobInput
forall x. Rep JobInput x -> JobInput
forall x. JobInput -> Rep JobInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobInput x -> JobInput
$cfrom :: forall x. JobInput -> Rep JobInput x
Prelude.Generic)

-- |
-- Create a value of 'JobInput' 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:
--
-- 'frameRate', 'jobInput_frameRate' - The frame rate of the input file. If you want Elastic Transcoder to
-- automatically detect the frame rate of the input file, specify @auto@.
-- If you want to specify the frame rate for the input file, enter one of
-- the following values:
--
-- @10@, @15@, @23.97@, @24@, @25@, @29.97@, @30@, @60@
--
-- If you specify a value other than @auto@, Elastic Transcoder disables
-- automatic detection of the frame rate.
--
-- 'resolution', 'jobInput_resolution' - This value must be @auto@, which causes Elastic Transcoder to
-- automatically detect the resolution of the input file.
--
-- 'aspectRatio', 'jobInput_aspectRatio' - The aspect ratio of the input file. If you want Elastic Transcoder to
-- automatically detect the aspect ratio of the input file, specify @auto@.
-- If you want to specify the aspect ratio for the output file, enter one
-- of the following values:
--
-- @1:1@, @4:3@, @3:2@, @16:9@
--
-- If you specify a value other than @auto@, Elastic Transcoder disables
-- automatic detection of the aspect ratio.
--
-- 'timeSpan', 'jobInput_timeSpan' - Settings for clipping an input. Each input can have different clip
-- settings.
--
-- 'encryption', 'jobInput_encryption' - The encryption settings, if any, that are used for decrypting your input
-- files. If your input file is encrypted, you must specify the mode that
-- Elastic Transcoder uses to decrypt your file.
--
-- 'key', 'jobInput_key' - The name of the file to transcode. Elsewhere in the body of the JSON
-- block is the the ID of the pipeline to use for processing the job. The
-- @InputBucket@ object in that pipeline tells Elastic Transcoder which
-- Amazon S3 bucket to get the file from.
--
-- If the file name includes a prefix, such as @cooking\/lasagna.mpg@,
-- include the prefix in the key. If the file isn\'t in the specified
-- bucket, Elastic Transcoder returns an error.
--
-- 'detectedProperties', 'jobInput_detectedProperties' - The detected properties of the input file.
--
-- 'container', 'jobInput_container' - The container type for the input file. If you want Elastic Transcoder to
-- automatically detect the container type of the input file, specify
-- @auto@. If you want to specify the container type for the input file,
-- enter one of the following values:
--
-- @3gp@, @aac@, @asf@, @avi@, @divx@, @flv@, @m4a@, @mkv@, @mov@, @mp3@,
-- @mp4@, @mpeg@, @mpeg-ps@, @mpeg-ts@, @mxf@, @ogg@, @vob@, @wav@, @webm@
--
-- 'interlaced', 'jobInput_interlaced' - Whether the input file is interlaced. If you want Elastic Transcoder to
-- automatically detect whether the input file is interlaced, specify
-- @auto@. If you want to specify whether the input file is interlaced,
-- enter one of the following values:
--
-- @true@, @false@
--
-- If you specify a value other than @auto@, Elastic Transcoder disables
-- automatic detection of interlacing.
--
-- 'inputCaptions', 'jobInput_inputCaptions' - You can configure Elastic Transcoder to transcode captions, or
-- subtitles, from one format to another. All captions must be in UTF-8.
-- Elastic Transcoder supports two types of captions:
--
-- -   __Embedded:__ Embedded captions are included in the same file as the
--     audio and video. Elastic Transcoder supports only one embedded
--     caption per language, to a maximum of 300 embedded captions per
--     file.
--
--     Valid input values include: @CEA-608 (EIA-608@, first non-empty
--     channel only), @CEA-708 (EIA-708@, first non-empty channel only),
--     and @mov-text@
--
--     Valid outputs include: @mov-text@
--
--     Elastic Transcoder supports a maximum of one embedded format per
--     output.
--
-- -   __Sidecar:__ Sidecar captions are kept in a separate metadata file
--     from the audio and video data. Sidecar captions require a player
--     that is capable of understanding the relationship between the video
--     file and the sidecar file. Elastic Transcoder supports only one
--     sidecar caption per language, to a maximum of 20 sidecar captions
--     per file.
--
--     Valid input values include: @dfxp@ (first div element only),
--     @ebu-tt@, @scc@, @smpt@, @srt@, @ttml@ (first div element only), and
--     @webvtt@
--
--     Valid outputs include: @dfxp@ (first div element only), @scc@,
--     @srt@, and @webvtt@.
--
-- If you want ttml or smpte-tt compatible captions, specify dfxp as your
-- output format.
--
-- Elastic Transcoder does not support OCR (Optical Character Recognition),
-- does not accept pictures as a valid input for captions, and is not
-- available for audio-only transcoding. Elastic Transcoder does not
-- preserve text formatting (for example, italics) during the transcoding
-- process.
--
-- To remove captions or leave the captions empty, set @Captions@ to null.
-- To pass through existing captions unchanged, set the @MergePolicy@ to
-- @MergeRetain@, and pass in a null @CaptionSources@ array.
--
-- For more information on embedded files, see the Subtitles Wikipedia
-- page.
--
-- For more information on sidecar files, see the Extensible Metadata
-- Platform and Sidecar file Wikipedia pages.
newJobInput ::
  JobInput
newJobInput :: JobInput
newJobInput =
  JobInput' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TimeSpan
-> Maybe Encryption
-> Maybe Text
-> Maybe DetectedProperties
-> Maybe Text
-> Maybe Text
-> Maybe InputCaptions
-> JobInput
JobInput'
    { $sel:frameRate:JobInput' :: Maybe Text
frameRate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resolution:JobInput' :: Maybe Text
resolution = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:aspectRatio:JobInput' :: Maybe Text
aspectRatio = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeSpan:JobInput' :: Maybe TimeSpan
timeSpan = Maybe TimeSpan
forall a. Maybe a
Prelude.Nothing,
      $sel:encryption:JobInput' :: Maybe Encryption
encryption = Maybe Encryption
forall a. Maybe a
Prelude.Nothing,
      $sel:key:JobInput' :: Maybe Text
key = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detectedProperties:JobInput' :: Maybe DetectedProperties
detectedProperties = Maybe DetectedProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:container:JobInput' :: Maybe Text
container = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:interlaced:JobInput' :: Maybe Text
interlaced = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputCaptions:JobInput' :: Maybe InputCaptions
inputCaptions = Maybe InputCaptions
forall a. Maybe a
Prelude.Nothing
    }

-- | The frame rate of the input file. If you want Elastic Transcoder to
-- automatically detect the frame rate of the input file, specify @auto@.
-- If you want to specify the frame rate for the input file, enter one of
-- the following values:
--
-- @10@, @15@, @23.97@, @24@, @25@, @29.97@, @30@, @60@
--
-- If you specify a value other than @auto@, Elastic Transcoder disables
-- automatic detection of the frame rate.
jobInput_frameRate :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_frameRate :: (Maybe Text -> f (Maybe Text)) -> JobInput -> f JobInput
jobInput_frameRate = (JobInput -> Maybe Text)
-> (JobInput -> Maybe Text -> JobInput)
-> Lens JobInput JobInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
frameRate :: Maybe Text
$sel:frameRate:JobInput' :: JobInput -> Maybe Text
frameRate} -> Maybe Text
frameRate) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:frameRate:JobInput' :: Maybe Text
frameRate = Maybe Text
a} :: JobInput)

-- | This value must be @auto@, which causes Elastic Transcoder to
-- automatically detect the resolution of the input file.
jobInput_resolution :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_resolution :: (Maybe Text -> f (Maybe Text)) -> JobInput -> f JobInput
jobInput_resolution = (JobInput -> Maybe Text)
-> (JobInput -> Maybe Text -> JobInput)
-> Lens JobInput JobInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
resolution :: Maybe Text
$sel:resolution:JobInput' :: JobInput -> Maybe Text
resolution} -> Maybe Text
resolution) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:resolution:JobInput' :: Maybe Text
resolution = Maybe Text
a} :: JobInput)

-- | The aspect ratio of the input file. If you want Elastic Transcoder to
-- automatically detect the aspect ratio of the input file, specify @auto@.
-- If you want to specify the aspect ratio for the output file, enter one
-- of the following values:
--
-- @1:1@, @4:3@, @3:2@, @16:9@
--
-- If you specify a value other than @auto@, Elastic Transcoder disables
-- automatic detection of the aspect ratio.
jobInput_aspectRatio :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_aspectRatio :: (Maybe Text -> f (Maybe Text)) -> JobInput -> f JobInput
jobInput_aspectRatio = (JobInput -> Maybe Text)
-> (JobInput -> Maybe Text -> JobInput)
-> Lens JobInput JobInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
aspectRatio :: Maybe Text
$sel:aspectRatio:JobInput' :: JobInput -> Maybe Text
aspectRatio} -> Maybe Text
aspectRatio) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:aspectRatio:JobInput' :: Maybe Text
aspectRatio = Maybe Text
a} :: JobInput)

-- | Settings for clipping an input. Each input can have different clip
-- settings.
jobInput_timeSpan :: Lens.Lens' JobInput (Prelude.Maybe TimeSpan)
jobInput_timeSpan :: (Maybe TimeSpan -> f (Maybe TimeSpan)) -> JobInput -> f JobInput
jobInput_timeSpan = (JobInput -> Maybe TimeSpan)
-> (JobInput -> Maybe TimeSpan -> JobInput)
-> Lens JobInput JobInput (Maybe TimeSpan) (Maybe TimeSpan)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe TimeSpan
timeSpan :: Maybe TimeSpan
$sel:timeSpan:JobInput' :: JobInput -> Maybe TimeSpan
timeSpan} -> Maybe TimeSpan
timeSpan) (\s :: JobInput
s@JobInput' {} Maybe TimeSpan
a -> JobInput
s {$sel:timeSpan:JobInput' :: Maybe TimeSpan
timeSpan = Maybe TimeSpan
a} :: JobInput)

-- | The encryption settings, if any, that are used for decrypting your input
-- files. If your input file is encrypted, you must specify the mode that
-- Elastic Transcoder uses to decrypt your file.
jobInput_encryption :: Lens.Lens' JobInput (Prelude.Maybe Encryption)
jobInput_encryption :: (Maybe Encryption -> f (Maybe Encryption))
-> JobInput -> f JobInput
jobInput_encryption = (JobInput -> Maybe Encryption)
-> (JobInput -> Maybe Encryption -> JobInput)
-> Lens JobInput JobInput (Maybe Encryption) (Maybe Encryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Encryption
encryption :: Maybe Encryption
$sel:encryption:JobInput' :: JobInput -> Maybe Encryption
encryption} -> Maybe Encryption
encryption) (\s :: JobInput
s@JobInput' {} Maybe Encryption
a -> JobInput
s {$sel:encryption:JobInput' :: Maybe Encryption
encryption = Maybe Encryption
a} :: JobInput)

-- | The name of the file to transcode. Elsewhere in the body of the JSON
-- block is the the ID of the pipeline to use for processing the job. The
-- @InputBucket@ object in that pipeline tells Elastic Transcoder which
-- Amazon S3 bucket to get the file from.
--
-- If the file name includes a prefix, such as @cooking\/lasagna.mpg@,
-- include the prefix in the key. If the file isn\'t in the specified
-- bucket, Elastic Transcoder returns an error.
jobInput_key :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_key :: (Maybe Text -> f (Maybe Text)) -> JobInput -> f JobInput
jobInput_key = (JobInput -> Maybe Text)
-> (JobInput -> Maybe Text -> JobInput)
-> Lens JobInput JobInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
key :: Maybe Text
$sel:key:JobInput' :: JobInput -> Maybe Text
key} -> Maybe Text
key) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:key:JobInput' :: Maybe Text
key = Maybe Text
a} :: JobInput)

-- | The detected properties of the input file.
jobInput_detectedProperties :: Lens.Lens' JobInput (Prelude.Maybe DetectedProperties)
jobInput_detectedProperties :: (Maybe DetectedProperties -> f (Maybe DetectedProperties))
-> JobInput -> f JobInput
jobInput_detectedProperties = (JobInput -> Maybe DetectedProperties)
-> (JobInput -> Maybe DetectedProperties -> JobInput)
-> Lens
     JobInput
     JobInput
     (Maybe DetectedProperties)
     (Maybe DetectedProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe DetectedProperties
detectedProperties :: Maybe DetectedProperties
$sel:detectedProperties:JobInput' :: JobInput -> Maybe DetectedProperties
detectedProperties} -> Maybe DetectedProperties
detectedProperties) (\s :: JobInput
s@JobInput' {} Maybe DetectedProperties
a -> JobInput
s {$sel:detectedProperties:JobInput' :: Maybe DetectedProperties
detectedProperties = Maybe DetectedProperties
a} :: JobInput)

-- | The container type for the input file. If you want Elastic Transcoder to
-- automatically detect the container type of the input file, specify
-- @auto@. If you want to specify the container type for the input file,
-- enter one of the following values:
--
-- @3gp@, @aac@, @asf@, @avi@, @divx@, @flv@, @m4a@, @mkv@, @mov@, @mp3@,
-- @mp4@, @mpeg@, @mpeg-ps@, @mpeg-ts@, @mxf@, @ogg@, @vob@, @wav@, @webm@
jobInput_container :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_container :: (Maybe Text -> f (Maybe Text)) -> JobInput -> f JobInput
jobInput_container = (JobInput -> Maybe Text)
-> (JobInput -> Maybe Text -> JobInput)
-> Lens JobInput JobInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
container :: Maybe Text
$sel:container:JobInput' :: JobInput -> Maybe Text
container} -> Maybe Text
container) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:container:JobInput' :: Maybe Text
container = Maybe Text
a} :: JobInput)

-- | Whether the input file is interlaced. If you want Elastic Transcoder to
-- automatically detect whether the input file is interlaced, specify
-- @auto@. If you want to specify whether the input file is interlaced,
-- enter one of the following values:
--
-- @true@, @false@
--
-- If you specify a value other than @auto@, Elastic Transcoder disables
-- automatic detection of interlacing.
jobInput_interlaced :: Lens.Lens' JobInput (Prelude.Maybe Prelude.Text)
jobInput_interlaced :: (Maybe Text -> f (Maybe Text)) -> JobInput -> f JobInput
jobInput_interlaced = (JobInput -> Maybe Text)
-> (JobInput -> Maybe Text -> JobInput)
-> Lens JobInput JobInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe Text
interlaced :: Maybe Text
$sel:interlaced:JobInput' :: JobInput -> Maybe Text
interlaced} -> Maybe Text
interlaced) (\s :: JobInput
s@JobInput' {} Maybe Text
a -> JobInput
s {$sel:interlaced:JobInput' :: Maybe Text
interlaced = Maybe Text
a} :: JobInput)

-- | You can configure Elastic Transcoder to transcode captions, or
-- subtitles, from one format to another. All captions must be in UTF-8.
-- Elastic Transcoder supports two types of captions:
--
-- -   __Embedded:__ Embedded captions are included in the same file as the
--     audio and video. Elastic Transcoder supports only one embedded
--     caption per language, to a maximum of 300 embedded captions per
--     file.
--
--     Valid input values include: @CEA-608 (EIA-608@, first non-empty
--     channel only), @CEA-708 (EIA-708@, first non-empty channel only),
--     and @mov-text@
--
--     Valid outputs include: @mov-text@
--
--     Elastic Transcoder supports a maximum of one embedded format per
--     output.
--
-- -   __Sidecar:__ Sidecar captions are kept in a separate metadata file
--     from the audio and video data. Sidecar captions require a player
--     that is capable of understanding the relationship between the video
--     file and the sidecar file. Elastic Transcoder supports only one
--     sidecar caption per language, to a maximum of 20 sidecar captions
--     per file.
--
--     Valid input values include: @dfxp@ (first div element only),
--     @ebu-tt@, @scc@, @smpt@, @srt@, @ttml@ (first div element only), and
--     @webvtt@
--
--     Valid outputs include: @dfxp@ (first div element only), @scc@,
--     @srt@, and @webvtt@.
--
-- If you want ttml or smpte-tt compatible captions, specify dfxp as your
-- output format.
--
-- Elastic Transcoder does not support OCR (Optical Character Recognition),
-- does not accept pictures as a valid input for captions, and is not
-- available for audio-only transcoding. Elastic Transcoder does not
-- preserve text formatting (for example, italics) during the transcoding
-- process.
--
-- To remove captions or leave the captions empty, set @Captions@ to null.
-- To pass through existing captions unchanged, set the @MergePolicy@ to
-- @MergeRetain@, and pass in a null @CaptionSources@ array.
--
-- For more information on embedded files, see the Subtitles Wikipedia
-- page.
--
-- For more information on sidecar files, see the Extensible Metadata
-- Platform and Sidecar file Wikipedia pages.
jobInput_inputCaptions :: Lens.Lens' JobInput (Prelude.Maybe InputCaptions)
jobInput_inputCaptions :: (Maybe InputCaptions -> f (Maybe InputCaptions))
-> JobInput -> f JobInput
jobInput_inputCaptions = (JobInput -> Maybe InputCaptions)
-> (JobInput -> Maybe InputCaptions -> JobInput)
-> Lens
     JobInput JobInput (Maybe InputCaptions) (Maybe InputCaptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobInput' {Maybe InputCaptions
inputCaptions :: Maybe InputCaptions
$sel:inputCaptions:JobInput' :: JobInput -> Maybe InputCaptions
inputCaptions} -> Maybe InputCaptions
inputCaptions) (\s :: JobInput
s@JobInput' {} Maybe InputCaptions
a -> JobInput
s {$sel:inputCaptions:JobInput' :: Maybe InputCaptions
inputCaptions = Maybe InputCaptions
a} :: JobInput)

instance Core.FromJSON JobInput where
  parseJSON :: Value -> Parser JobInput
parseJSON =
    String -> (Object -> Parser JobInput) -> Value -> Parser JobInput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"JobInput"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TimeSpan
-> Maybe Encryption
-> Maybe Text
-> Maybe DetectedProperties
-> Maybe Text
-> Maybe Text
-> Maybe InputCaptions
-> JobInput
JobInput'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe TimeSpan
 -> Maybe Encryption
 -> Maybe Text
 -> Maybe DetectedProperties
 -> Maybe Text
 -> Maybe Text
 -> Maybe InputCaptions
 -> JobInput)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe TimeSpan
      -> Maybe Encryption
      -> Maybe Text
      -> Maybe DetectedProperties
      -> Maybe Text
      -> Maybe Text
      -> Maybe InputCaptions
      -> JobInput)
forall (f :: * -> *) a b. Functor 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
"FrameRate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe TimeSpan
   -> Maybe Encryption
   -> Maybe Text
   -> Maybe DetectedProperties
   -> Maybe Text
   -> Maybe Text
   -> Maybe InputCaptions
   -> JobInput)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe TimeSpan
      -> Maybe Encryption
      -> Maybe Text
      -> Maybe DetectedProperties
      -> Maybe Text
      -> Maybe Text
      -> Maybe InputCaptions
      -> JobInput)
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
"Resolution")
            Parser
  (Maybe Text
   -> Maybe TimeSpan
   -> Maybe Encryption
   -> Maybe Text
   -> Maybe DetectedProperties
   -> Maybe Text
   -> Maybe Text
   -> Maybe InputCaptions
   -> JobInput)
-> Parser (Maybe Text)
-> Parser
     (Maybe TimeSpan
      -> Maybe Encryption
      -> Maybe Text
      -> Maybe DetectedProperties
      -> Maybe Text
      -> Maybe Text
      -> Maybe InputCaptions
      -> JobInput)
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
"AspectRatio")
            Parser
  (Maybe TimeSpan
   -> Maybe Encryption
   -> Maybe Text
   -> Maybe DetectedProperties
   -> Maybe Text
   -> Maybe Text
   -> Maybe InputCaptions
   -> JobInput)
-> Parser (Maybe TimeSpan)
-> Parser
     (Maybe Encryption
      -> Maybe Text
      -> Maybe DetectedProperties
      -> Maybe Text
      -> Maybe Text
      -> Maybe InputCaptions
      -> JobInput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TimeSpan)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TimeSpan")
            Parser
  (Maybe Encryption
   -> Maybe Text
   -> Maybe DetectedProperties
   -> Maybe Text
   -> Maybe Text
   -> Maybe InputCaptions
   -> JobInput)
-> Parser (Maybe Encryption)
-> Parser
     (Maybe Text
      -> Maybe DetectedProperties
      -> Maybe Text
      -> Maybe Text
      -> Maybe InputCaptions
      -> JobInput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Encryption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Encryption")
            Parser
  (Maybe Text
   -> Maybe DetectedProperties
   -> Maybe Text
   -> Maybe Text
   -> Maybe InputCaptions
   -> JobInput)
-> Parser (Maybe Text)
-> Parser
     (Maybe DetectedProperties
      -> Maybe Text -> Maybe Text -> Maybe InputCaptions -> JobInput)
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
"Key")
            Parser
  (Maybe DetectedProperties
   -> Maybe Text -> Maybe Text -> Maybe InputCaptions -> JobInput)
-> Parser (Maybe DetectedProperties)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe InputCaptions -> JobInput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DetectedProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DetectedProperties")
            Parser
  (Maybe Text -> Maybe Text -> Maybe InputCaptions -> JobInput)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe InputCaptions -> JobInput)
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
"Container")
            Parser (Maybe Text -> Maybe InputCaptions -> JobInput)
-> Parser (Maybe Text) -> Parser (Maybe InputCaptions -> JobInput)
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
"Interlaced")
            Parser (Maybe InputCaptions -> JobInput)
-> Parser (Maybe InputCaptions) -> Parser JobInput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputCaptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputCaptions")
      )

instance Prelude.Hashable JobInput

instance Prelude.NFData JobInput

instance Core.ToJSON JobInput where
  toJSON :: JobInput -> Value
toJSON JobInput' {Maybe Text
Maybe DetectedProperties
Maybe Encryption
Maybe InputCaptions
Maybe TimeSpan
inputCaptions :: Maybe InputCaptions
interlaced :: Maybe Text
container :: Maybe Text
detectedProperties :: Maybe DetectedProperties
key :: Maybe Text
encryption :: Maybe Encryption
timeSpan :: Maybe TimeSpan
aspectRatio :: Maybe Text
resolution :: Maybe Text
frameRate :: Maybe Text
$sel:inputCaptions:JobInput' :: JobInput -> Maybe InputCaptions
$sel:interlaced:JobInput' :: JobInput -> Maybe Text
$sel:container:JobInput' :: JobInput -> Maybe Text
$sel:detectedProperties:JobInput' :: JobInput -> Maybe DetectedProperties
$sel:key:JobInput' :: JobInput -> Maybe Text
$sel:encryption:JobInput' :: JobInput -> Maybe Encryption
$sel:timeSpan:JobInput' :: JobInput -> Maybe TimeSpan
$sel:aspectRatio:JobInput' :: JobInput -> Maybe Text
$sel:resolution:JobInput' :: JobInput -> Maybe Text
$sel:frameRate:JobInput' :: JobInput -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"FrameRate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
frameRate,
            (Text
"Resolution" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resolution,
            (Text
"AspectRatio" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
aspectRatio,
            (Text
"TimeSpan" Text -> TimeSpan -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TimeSpan -> Pair) -> Maybe TimeSpan -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeSpan
timeSpan,
            (Text
"Encryption" Text -> Encryption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Encryption -> Pair) -> Maybe Encryption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Encryption
encryption,
            (Text
"Key" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
key,
            (Text
"DetectedProperties" Text -> DetectedProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DetectedProperties -> Pair)
-> Maybe DetectedProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DetectedProperties
detectedProperties,
            (Text
"Container" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
container,
            (Text
"Interlaced" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
interlaced,
            (Text
"InputCaptions" Text -> InputCaptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (InputCaptions -> Pair) -> Maybe InputCaptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputCaptions
inputCaptions
          ]
      )