{-# 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.CreateJobOutput
-- 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.CreateJobOutput where

import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.Types.Captions
import Amazonka.ElasticTranscoder.Types.Clip
import Amazonka.ElasticTranscoder.Types.Encryption
import Amazonka.ElasticTranscoder.Types.JobAlbumArt
import Amazonka.ElasticTranscoder.Types.JobWatermark
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The @CreateJobOutput@ structure.
--
-- /See:/ 'newCreateJobOutput' smart constructor.
data CreateJobOutput = CreateJobOutput'
  { -- | Whether you want Elastic Transcoder to create thumbnails for your videos
    -- and, if so, how you want Elastic Transcoder to name the files.
    --
    -- If you don\'t want Elastic Transcoder to create thumbnails, specify
    -- \"\".
    --
    -- If you do want Elastic Transcoder to create thumbnails, specify the
    -- information that you want to include in the file name for each
    -- thumbnail. You can specify the following values in any sequence:
    --
    -- -   __@{count}@ (Required)__: If you want to create thumbnails, you must
    --     include @{count}@ in the @ThumbnailPattern@ object. Wherever you
    --     specify @{count}@, Elastic Transcoder adds a five-digit sequence
    --     number (beginning with __00001__) to thumbnail file names. The
    --     number indicates where a given thumbnail appears in the sequence of
    --     thumbnails for a transcoded file.
    --
    --     If you specify a literal value and\/or @{resolution}@ but you omit
    --     @{count}@, Elastic Transcoder returns a validation error and does
    --     not create the job.
    --
    -- -   __Literal values (Optional)__: You can specify literal values
    --     anywhere in the @ThumbnailPattern@ object. For example, you can
    --     include them as a file name prefix or as a delimiter between
    --     @{resolution}@ and @{count}@.
    --
    -- -   __@{resolution}@ (Optional)__: If you want Elastic Transcoder to
    --     include the resolution in the file name, include @{resolution}@ in
    --     the @ThumbnailPattern@ object.
    --
    -- When creating thumbnails, Elastic Transcoder automatically saves the
    -- files in the format (.jpg or .png) that appears in the preset that you
    -- specified in the @PresetID@ value of @CreateJobOutput@. Elastic
    -- Transcoder also appends the applicable file name extension.
    CreateJobOutput -> Maybe Text
thumbnailPattern :: 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.
    CreateJobOutput -> Maybe Captions
captions :: Prelude.Maybe Captions,
    -- | The @Id@ of the preset to use for this job. The preset determines the
    -- audio, video, and thumbnail settings that Elastic Transcoder uses for
    -- transcoding.
    CreateJobOutput -> Maybe Text
presetId :: Prelude.Maybe Prelude.Text,
    -- | You can create an output file that contains an excerpt from the input
    -- file. This excerpt, called a clip, can come from the beginning, middle,
    -- or end of the file. The Composition object contains settings for the
    -- clips that make up an output file. For the current release, you can only
    -- specify settings for a single clip per output file. The Composition
    -- object cannot be null.
    CreateJobOutput -> Maybe [Clip]
composition :: Prelude.Maybe [Clip],
    -- | Information about the album art that you want Elastic Transcoder to add
    -- to the file during transcoding. You can specify up to twenty album
    -- artworks for each output. Settings for each artwork must be defined in
    -- the job for the current output.
    CreateJobOutput -> Maybe JobAlbumArt
albumArt :: Prelude.Maybe JobAlbumArt,
    -- | Information about the watermarks that you want Elastic Transcoder to add
    -- to the video during transcoding. You can specify up to four watermarks
    -- for each output. Settings for each watermark must be defined in the
    -- preset for the current output.
    CreateJobOutput -> Maybe [JobWatermark]
watermarks :: Prelude.Maybe [JobWatermark],
    -- | You can specify encryption settings for any output files that you want
    -- to use for a transcoding job. This includes the output file and any
    -- watermarks, thumbnails, album art, or captions that you want to use. You
    -- must specify encryption settings for each file individually.
    CreateJobOutput -> Maybe Encryption
encryption :: Prelude.Maybe Encryption,
    -- | The name to assign to the transcoded file. Elastic Transcoder saves the
    -- file in the Amazon S3 bucket specified by the @OutputBucket@ object in
    -- the pipeline that is specified by the pipeline ID. If a file with the
    -- specified name already exists in the output bucket, the job fails.
    CreateJobOutput -> Maybe Text
key :: 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), @SegmentDuration@ is the
    -- target maximum duration of each segment in seconds. For @HLSv3@ format
    -- playlists, each media segment is stored in a separate @.ts@ file. For
    -- @HLSv4@ and @Smooth@ playlists, all media segments for an output are
    -- stored in a single file. Each segment is approximately the length of the
    -- @SegmentDuration@, though individual segments might be shorter or
    -- longer.
    --
    -- The range of valid values is 1 to 60 seconds. If the duration of the
    -- video is not evenly divisible by @SegmentDuration@, the duration of the
    -- last segment is the remainder of total length\/SegmentDuration.
    --
    -- Elastic Transcoder creates an output-specific playlist for each output
    -- @HLS@ output that you specify in OutputKeys. To add an output to the
    -- master playlist for this job, include it in the @OutputKeys@ of the
    -- associated playlist.
    CreateJobOutput -> Maybe Text
segmentDuration :: Prelude.Maybe Prelude.Text,
    -- | The encryption settings, if any, that you want Elastic Transcoder to
    -- apply to your thumbnail.
    CreateJobOutput -> Maybe Encryption
thumbnailEncryption :: Prelude.Maybe Encryption,
    -- | The number of degrees clockwise by which you want Elastic Transcoder to
    -- rotate the output relative to the input. Enter one of the following
    -- values: @auto@, @0@, @90@, @180@, @270@. The value @auto@ generally
    -- works only if the file that you\'re transcoding contains rotation
    -- metadata.
    CreateJobOutput -> Maybe Text
rotate :: Prelude.Maybe Prelude.Text
  }
  deriving (CreateJobOutput -> CreateJobOutput -> Bool
(CreateJobOutput -> CreateJobOutput -> Bool)
-> (CreateJobOutput -> CreateJobOutput -> Bool)
-> Eq CreateJobOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJobOutput -> CreateJobOutput -> Bool
$c/= :: CreateJobOutput -> CreateJobOutput -> Bool
== :: CreateJobOutput -> CreateJobOutput -> Bool
$c== :: CreateJobOutput -> CreateJobOutput -> Bool
Prelude.Eq, ReadPrec [CreateJobOutput]
ReadPrec CreateJobOutput
Int -> ReadS CreateJobOutput
ReadS [CreateJobOutput]
(Int -> ReadS CreateJobOutput)
-> ReadS [CreateJobOutput]
-> ReadPrec CreateJobOutput
-> ReadPrec [CreateJobOutput]
-> Read CreateJobOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJobOutput]
$creadListPrec :: ReadPrec [CreateJobOutput]
readPrec :: ReadPrec CreateJobOutput
$creadPrec :: ReadPrec CreateJobOutput
readList :: ReadS [CreateJobOutput]
$creadList :: ReadS [CreateJobOutput]
readsPrec :: Int -> ReadS CreateJobOutput
$creadsPrec :: Int -> ReadS CreateJobOutput
Prelude.Read, Int -> CreateJobOutput -> ShowS
[CreateJobOutput] -> ShowS
CreateJobOutput -> String
(Int -> CreateJobOutput -> ShowS)
-> (CreateJobOutput -> String)
-> ([CreateJobOutput] -> ShowS)
-> Show CreateJobOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJobOutput] -> ShowS
$cshowList :: [CreateJobOutput] -> ShowS
show :: CreateJobOutput -> String
$cshow :: CreateJobOutput -> String
showsPrec :: Int -> CreateJobOutput -> ShowS
$cshowsPrec :: Int -> CreateJobOutput -> ShowS
Prelude.Show, (forall x. CreateJobOutput -> Rep CreateJobOutput x)
-> (forall x. Rep CreateJobOutput x -> CreateJobOutput)
-> Generic CreateJobOutput
forall x. Rep CreateJobOutput x -> CreateJobOutput
forall x. CreateJobOutput -> Rep CreateJobOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJobOutput x -> CreateJobOutput
$cfrom :: forall x. CreateJobOutput -> Rep CreateJobOutput x
Prelude.Generic)

-- |
-- Create a value of 'CreateJobOutput' 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:
--
-- 'thumbnailPattern', 'createJobOutput_thumbnailPattern' - Whether you want Elastic Transcoder to create thumbnails for your videos
-- and, if so, how you want Elastic Transcoder to name the files.
--
-- If you don\'t want Elastic Transcoder to create thumbnails, specify
-- \"\".
--
-- If you do want Elastic Transcoder to create thumbnails, specify the
-- information that you want to include in the file name for each
-- thumbnail. You can specify the following values in any sequence:
--
-- -   __@{count}@ (Required)__: If you want to create thumbnails, you must
--     include @{count}@ in the @ThumbnailPattern@ object. Wherever you
--     specify @{count}@, Elastic Transcoder adds a five-digit sequence
--     number (beginning with __00001__) to thumbnail file names. The
--     number indicates where a given thumbnail appears in the sequence of
--     thumbnails for a transcoded file.
--
--     If you specify a literal value and\/or @{resolution}@ but you omit
--     @{count}@, Elastic Transcoder returns a validation error and does
--     not create the job.
--
-- -   __Literal values (Optional)__: You can specify literal values
--     anywhere in the @ThumbnailPattern@ object. For example, you can
--     include them as a file name prefix or as a delimiter between
--     @{resolution}@ and @{count}@.
--
-- -   __@{resolution}@ (Optional)__: If you want Elastic Transcoder to
--     include the resolution in the file name, include @{resolution}@ in
--     the @ThumbnailPattern@ object.
--
-- When creating thumbnails, Elastic Transcoder automatically saves the
-- files in the format (.jpg or .png) that appears in the preset that you
-- specified in the @PresetID@ value of @CreateJobOutput@. Elastic
-- Transcoder also appends the applicable file name extension.
--
-- 'captions', 'createJobOutput_captions' - 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.
--
-- 'presetId', 'createJobOutput_presetId' - The @Id@ of the preset to use for this job. The preset determines the
-- audio, video, and thumbnail settings that Elastic Transcoder uses for
-- transcoding.
--
-- 'composition', 'createJobOutput_composition' - You can create an output file that contains an excerpt from the input
-- file. This excerpt, called a clip, can come from the beginning, middle,
-- or end of the file. The Composition object contains settings for the
-- clips that make up an output file. For the current release, you can only
-- specify settings for a single clip per output file. The Composition
-- object cannot be null.
--
-- 'albumArt', 'createJobOutput_albumArt' - Information about the album art that you want Elastic Transcoder to add
-- to the file during transcoding. You can specify up to twenty album
-- artworks for each output. Settings for each artwork must be defined in
-- the job for the current output.
--
-- 'watermarks', 'createJobOutput_watermarks' - Information about the watermarks that you want Elastic Transcoder to add
-- to the video during transcoding. You can specify up to four watermarks
-- for each output. Settings for each watermark must be defined in the
-- preset for the current output.
--
-- 'encryption', 'createJobOutput_encryption' - You can specify encryption settings for any output files that you want
-- to use for a transcoding job. This includes the output file and any
-- watermarks, thumbnails, album art, or captions that you want to use. You
-- must specify encryption settings for each file individually.
--
-- 'key', 'createJobOutput_key' - The name to assign to the transcoded file. Elastic Transcoder saves the
-- file in the Amazon S3 bucket specified by the @OutputBucket@ object in
-- the pipeline that is specified by the pipeline ID. If a file with the
-- specified name already exists in the output bucket, the job fails.
--
-- 'segmentDuration', 'createJobOutput_segmentDuration' - (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), @SegmentDuration@ is the
-- target maximum duration of each segment in seconds. For @HLSv3@ format
-- playlists, each media segment is stored in a separate @.ts@ file. For
-- @HLSv4@ and @Smooth@ playlists, all media segments for an output are
-- stored in a single file. Each segment is approximately the length of the
-- @SegmentDuration@, though individual segments might be shorter or
-- longer.
--
-- The range of valid values is 1 to 60 seconds. If the duration of the
-- video is not evenly divisible by @SegmentDuration@, the duration of the
-- last segment is the remainder of total length\/SegmentDuration.
--
-- Elastic Transcoder creates an output-specific playlist for each output
-- @HLS@ output that you specify in OutputKeys. To add an output to the
-- master playlist for this job, include it in the @OutputKeys@ of the
-- associated playlist.
--
-- 'thumbnailEncryption', 'createJobOutput_thumbnailEncryption' - The encryption settings, if any, that you want Elastic Transcoder to
-- apply to your thumbnail.
--
-- 'rotate', 'createJobOutput_rotate' - The number of degrees clockwise by which you want Elastic Transcoder to
-- rotate the output relative to the input. Enter one of the following
-- values: @auto@, @0@, @90@, @180@, @270@. The value @auto@ generally
-- works only if the file that you\'re transcoding contains rotation
-- metadata.
newCreateJobOutput ::
  CreateJobOutput
newCreateJobOutput :: CreateJobOutput
newCreateJobOutput =
  CreateJobOutput' :: Maybe Text
-> Maybe Captions
-> Maybe Text
-> Maybe [Clip]
-> Maybe JobAlbumArt
-> Maybe [JobWatermark]
-> Maybe Encryption
-> Maybe Text
-> Maybe Text
-> Maybe Encryption
-> Maybe Text
-> CreateJobOutput
CreateJobOutput'
    { $sel:thumbnailPattern:CreateJobOutput' :: Maybe Text
thumbnailPattern =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:captions:CreateJobOutput' :: Maybe Captions
captions = Maybe Captions
forall a. Maybe a
Prelude.Nothing,
      $sel:presetId:CreateJobOutput' :: Maybe Text
presetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:composition:CreateJobOutput' :: Maybe [Clip]
composition = Maybe [Clip]
forall a. Maybe a
Prelude.Nothing,
      $sel:albumArt:CreateJobOutput' :: Maybe JobAlbumArt
albumArt = Maybe JobAlbumArt
forall a. Maybe a
Prelude.Nothing,
      $sel:watermarks:CreateJobOutput' :: Maybe [JobWatermark]
watermarks = Maybe [JobWatermark]
forall a. Maybe a
Prelude.Nothing,
      $sel:encryption:CreateJobOutput' :: Maybe Encryption
encryption = Maybe Encryption
forall a. Maybe a
Prelude.Nothing,
      $sel:key:CreateJobOutput' :: Maybe Text
key = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:segmentDuration:CreateJobOutput' :: Maybe Text
segmentDuration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:thumbnailEncryption:CreateJobOutput' :: Maybe Encryption
thumbnailEncryption = Maybe Encryption
forall a. Maybe a
Prelude.Nothing,
      $sel:rotate:CreateJobOutput' :: Maybe Text
rotate = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Whether you want Elastic Transcoder to create thumbnails for your videos
-- and, if so, how you want Elastic Transcoder to name the files.
--
-- If you don\'t want Elastic Transcoder to create thumbnails, specify
-- \"\".
--
-- If you do want Elastic Transcoder to create thumbnails, specify the
-- information that you want to include in the file name for each
-- thumbnail. You can specify the following values in any sequence:
--
-- -   __@{count}@ (Required)__: If you want to create thumbnails, you must
--     include @{count}@ in the @ThumbnailPattern@ object. Wherever you
--     specify @{count}@, Elastic Transcoder adds a five-digit sequence
--     number (beginning with __00001__) to thumbnail file names. The
--     number indicates where a given thumbnail appears in the sequence of
--     thumbnails for a transcoded file.
--
--     If you specify a literal value and\/or @{resolution}@ but you omit
--     @{count}@, Elastic Transcoder returns a validation error and does
--     not create the job.
--
-- -   __Literal values (Optional)__: You can specify literal values
--     anywhere in the @ThumbnailPattern@ object. For example, you can
--     include them as a file name prefix or as a delimiter between
--     @{resolution}@ and @{count}@.
--
-- -   __@{resolution}@ (Optional)__: If you want Elastic Transcoder to
--     include the resolution in the file name, include @{resolution}@ in
--     the @ThumbnailPattern@ object.
--
-- When creating thumbnails, Elastic Transcoder automatically saves the
-- files in the format (.jpg or .png) that appears in the preset that you
-- specified in the @PresetID@ value of @CreateJobOutput@. Elastic
-- Transcoder also appends the applicable file name extension.
createJobOutput_thumbnailPattern :: Lens.Lens' CreateJobOutput (Prelude.Maybe Prelude.Text)
createJobOutput_thumbnailPattern :: (Maybe Text -> f (Maybe Text))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_thumbnailPattern = (CreateJobOutput -> Maybe Text)
-> (CreateJobOutput -> Maybe Text -> CreateJobOutput)
-> Lens CreateJobOutput CreateJobOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe Text
thumbnailPattern :: Maybe Text
$sel:thumbnailPattern:CreateJobOutput' :: CreateJobOutput -> Maybe Text
thumbnailPattern} -> Maybe Text
thumbnailPattern) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe Text
a -> CreateJobOutput
s {$sel:thumbnailPattern:CreateJobOutput' :: Maybe Text
thumbnailPattern = Maybe Text
a} :: CreateJobOutput)

-- | 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.
createJobOutput_captions :: Lens.Lens' CreateJobOutput (Prelude.Maybe Captions)
createJobOutput_captions :: (Maybe Captions -> f (Maybe Captions))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_captions = (CreateJobOutput -> Maybe Captions)
-> (CreateJobOutput -> Maybe Captions -> CreateJobOutput)
-> Lens
     CreateJobOutput CreateJobOutput (Maybe Captions) (Maybe Captions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe Captions
captions :: Maybe Captions
$sel:captions:CreateJobOutput' :: CreateJobOutput -> Maybe Captions
captions} -> Maybe Captions
captions) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe Captions
a -> CreateJobOutput
s {$sel:captions:CreateJobOutput' :: Maybe Captions
captions = Maybe Captions
a} :: CreateJobOutput)

-- | The @Id@ of the preset to use for this job. The preset determines the
-- audio, video, and thumbnail settings that Elastic Transcoder uses for
-- transcoding.
createJobOutput_presetId :: Lens.Lens' CreateJobOutput (Prelude.Maybe Prelude.Text)
createJobOutput_presetId :: (Maybe Text -> f (Maybe Text))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_presetId = (CreateJobOutput -> Maybe Text)
-> (CreateJobOutput -> Maybe Text -> CreateJobOutput)
-> Lens CreateJobOutput CreateJobOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe Text
presetId :: Maybe Text
$sel:presetId:CreateJobOutput' :: CreateJobOutput -> Maybe Text
presetId} -> Maybe Text
presetId) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe Text
a -> CreateJobOutput
s {$sel:presetId:CreateJobOutput' :: Maybe Text
presetId = Maybe Text
a} :: CreateJobOutput)

-- | You can create an output file that contains an excerpt from the input
-- file. This excerpt, called a clip, can come from the beginning, middle,
-- or end of the file. The Composition object contains settings for the
-- clips that make up an output file. For the current release, you can only
-- specify settings for a single clip per output file. The Composition
-- object cannot be null.
createJobOutput_composition :: Lens.Lens' CreateJobOutput (Prelude.Maybe [Clip])
createJobOutput_composition :: (Maybe [Clip] -> f (Maybe [Clip]))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_composition = (CreateJobOutput -> Maybe [Clip])
-> (CreateJobOutput -> Maybe [Clip] -> CreateJobOutput)
-> Lens
     CreateJobOutput CreateJobOutput (Maybe [Clip]) (Maybe [Clip])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe [Clip]
composition :: Maybe [Clip]
$sel:composition:CreateJobOutput' :: CreateJobOutput -> Maybe [Clip]
composition} -> Maybe [Clip]
composition) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe [Clip]
a -> CreateJobOutput
s {$sel:composition:CreateJobOutput' :: Maybe [Clip]
composition = Maybe [Clip]
a} :: CreateJobOutput) ((Maybe [Clip] -> f (Maybe [Clip]))
 -> CreateJobOutput -> f CreateJobOutput)
-> ((Maybe [Clip] -> f (Maybe [Clip]))
    -> Maybe [Clip] -> f (Maybe [Clip]))
-> (Maybe [Clip] -> f (Maybe [Clip]))
-> CreateJobOutput
-> f CreateJobOutput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Clip] [Clip] [Clip] [Clip]
-> Iso (Maybe [Clip]) (Maybe [Clip]) (Maybe [Clip]) (Maybe [Clip])
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 [Clip] [Clip] [Clip] [Clip]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the album art that you want Elastic Transcoder to add
-- to the file during transcoding. You can specify up to twenty album
-- artworks for each output. Settings for each artwork must be defined in
-- the job for the current output.
createJobOutput_albumArt :: Lens.Lens' CreateJobOutput (Prelude.Maybe JobAlbumArt)
createJobOutput_albumArt :: (Maybe JobAlbumArt -> f (Maybe JobAlbumArt))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_albumArt = (CreateJobOutput -> Maybe JobAlbumArt)
-> (CreateJobOutput -> Maybe JobAlbumArt -> CreateJobOutput)
-> Lens
     CreateJobOutput
     CreateJobOutput
     (Maybe JobAlbumArt)
     (Maybe JobAlbumArt)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe JobAlbumArt
albumArt :: Maybe JobAlbumArt
$sel:albumArt:CreateJobOutput' :: CreateJobOutput -> Maybe JobAlbumArt
albumArt} -> Maybe JobAlbumArt
albumArt) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe JobAlbumArt
a -> CreateJobOutput
s {$sel:albumArt:CreateJobOutput' :: Maybe JobAlbumArt
albumArt = Maybe JobAlbumArt
a} :: CreateJobOutput)

-- | Information about the watermarks that you want Elastic Transcoder to add
-- to the video during transcoding. You can specify up to four watermarks
-- for each output. Settings for each watermark must be defined in the
-- preset for the current output.
createJobOutput_watermarks :: Lens.Lens' CreateJobOutput (Prelude.Maybe [JobWatermark])
createJobOutput_watermarks :: (Maybe [JobWatermark] -> f (Maybe [JobWatermark]))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_watermarks = (CreateJobOutput -> Maybe [JobWatermark])
-> (CreateJobOutput -> Maybe [JobWatermark] -> CreateJobOutput)
-> Lens
     CreateJobOutput
     CreateJobOutput
     (Maybe [JobWatermark])
     (Maybe [JobWatermark])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe [JobWatermark]
watermarks :: Maybe [JobWatermark]
$sel:watermarks:CreateJobOutput' :: CreateJobOutput -> Maybe [JobWatermark]
watermarks} -> Maybe [JobWatermark]
watermarks) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe [JobWatermark]
a -> CreateJobOutput
s {$sel:watermarks:CreateJobOutput' :: Maybe [JobWatermark]
watermarks = Maybe [JobWatermark]
a} :: CreateJobOutput) ((Maybe [JobWatermark] -> f (Maybe [JobWatermark]))
 -> CreateJobOutput -> f CreateJobOutput)
-> ((Maybe [JobWatermark] -> f (Maybe [JobWatermark]))
    -> Maybe [JobWatermark] -> f (Maybe [JobWatermark]))
-> (Maybe [JobWatermark] -> f (Maybe [JobWatermark]))
-> CreateJobOutput
-> f CreateJobOutput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [JobWatermark] [JobWatermark] [JobWatermark] [JobWatermark]
-> Iso
     (Maybe [JobWatermark])
     (Maybe [JobWatermark])
     (Maybe [JobWatermark])
     (Maybe [JobWatermark])
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 [JobWatermark] [JobWatermark] [JobWatermark] [JobWatermark]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | You can specify encryption settings for any output files that you want
-- to use for a transcoding job. This includes the output file and any
-- watermarks, thumbnails, album art, or captions that you want to use. You
-- must specify encryption settings for each file individually.
createJobOutput_encryption :: Lens.Lens' CreateJobOutput (Prelude.Maybe Encryption)
createJobOutput_encryption :: (Maybe Encryption -> f (Maybe Encryption))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_encryption = (CreateJobOutput -> Maybe Encryption)
-> (CreateJobOutput -> Maybe Encryption -> CreateJobOutput)
-> Lens
     CreateJobOutput
     CreateJobOutput
     (Maybe Encryption)
     (Maybe Encryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe Encryption
encryption :: Maybe Encryption
$sel:encryption:CreateJobOutput' :: CreateJobOutput -> Maybe Encryption
encryption} -> Maybe Encryption
encryption) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe Encryption
a -> CreateJobOutput
s {$sel:encryption:CreateJobOutput' :: Maybe Encryption
encryption = Maybe Encryption
a} :: CreateJobOutput)

-- | The name to assign to the transcoded file. Elastic Transcoder saves the
-- file in the Amazon S3 bucket specified by the @OutputBucket@ object in
-- the pipeline that is specified by the pipeline ID. If a file with the
-- specified name already exists in the output bucket, the job fails.
createJobOutput_key :: Lens.Lens' CreateJobOutput (Prelude.Maybe Prelude.Text)
createJobOutput_key :: (Maybe Text -> f (Maybe Text))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_key = (CreateJobOutput -> Maybe Text)
-> (CreateJobOutput -> Maybe Text -> CreateJobOutput)
-> Lens CreateJobOutput CreateJobOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe Text
key :: Maybe Text
$sel:key:CreateJobOutput' :: CreateJobOutput -> Maybe Text
key} -> Maybe Text
key) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe Text
a -> CreateJobOutput
s {$sel:key:CreateJobOutput' :: Maybe Text
key = Maybe Text
a} :: CreateJobOutput)

-- | (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), @SegmentDuration@ is the
-- target maximum duration of each segment in seconds. For @HLSv3@ format
-- playlists, each media segment is stored in a separate @.ts@ file. For
-- @HLSv4@ and @Smooth@ playlists, all media segments for an output are
-- stored in a single file. Each segment is approximately the length of the
-- @SegmentDuration@, though individual segments might be shorter or
-- longer.
--
-- The range of valid values is 1 to 60 seconds. If the duration of the
-- video is not evenly divisible by @SegmentDuration@, the duration of the
-- last segment is the remainder of total length\/SegmentDuration.
--
-- Elastic Transcoder creates an output-specific playlist for each output
-- @HLS@ output that you specify in OutputKeys. To add an output to the
-- master playlist for this job, include it in the @OutputKeys@ of the
-- associated playlist.
createJobOutput_segmentDuration :: Lens.Lens' CreateJobOutput (Prelude.Maybe Prelude.Text)
createJobOutput_segmentDuration :: (Maybe Text -> f (Maybe Text))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_segmentDuration = (CreateJobOutput -> Maybe Text)
-> (CreateJobOutput -> Maybe Text -> CreateJobOutput)
-> Lens CreateJobOutput CreateJobOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe Text
segmentDuration :: Maybe Text
$sel:segmentDuration:CreateJobOutput' :: CreateJobOutput -> Maybe Text
segmentDuration} -> Maybe Text
segmentDuration) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe Text
a -> CreateJobOutput
s {$sel:segmentDuration:CreateJobOutput' :: Maybe Text
segmentDuration = Maybe Text
a} :: CreateJobOutput)

-- | The encryption settings, if any, that you want Elastic Transcoder to
-- apply to your thumbnail.
createJobOutput_thumbnailEncryption :: Lens.Lens' CreateJobOutput (Prelude.Maybe Encryption)
createJobOutput_thumbnailEncryption :: (Maybe Encryption -> f (Maybe Encryption))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_thumbnailEncryption = (CreateJobOutput -> Maybe Encryption)
-> (CreateJobOutput -> Maybe Encryption -> CreateJobOutput)
-> Lens
     CreateJobOutput
     CreateJobOutput
     (Maybe Encryption)
     (Maybe Encryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe Encryption
thumbnailEncryption :: Maybe Encryption
$sel:thumbnailEncryption:CreateJobOutput' :: CreateJobOutput -> Maybe Encryption
thumbnailEncryption} -> Maybe Encryption
thumbnailEncryption) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe Encryption
a -> CreateJobOutput
s {$sel:thumbnailEncryption:CreateJobOutput' :: Maybe Encryption
thumbnailEncryption = Maybe Encryption
a} :: CreateJobOutput)

-- | The number of degrees clockwise by which you want Elastic Transcoder to
-- rotate the output relative to the input. Enter one of the following
-- values: @auto@, @0@, @90@, @180@, @270@. The value @auto@ generally
-- works only if the file that you\'re transcoding contains rotation
-- metadata.
createJobOutput_rotate :: Lens.Lens' CreateJobOutput (Prelude.Maybe Prelude.Text)
createJobOutput_rotate :: (Maybe Text -> f (Maybe Text))
-> CreateJobOutput -> f CreateJobOutput
createJobOutput_rotate = (CreateJobOutput -> Maybe Text)
-> (CreateJobOutput -> Maybe Text -> CreateJobOutput)
-> Lens CreateJobOutput CreateJobOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobOutput' {Maybe Text
rotate :: Maybe Text
$sel:rotate:CreateJobOutput' :: CreateJobOutput -> Maybe Text
rotate} -> Maybe Text
rotate) (\s :: CreateJobOutput
s@CreateJobOutput' {} Maybe Text
a -> CreateJobOutput
s {$sel:rotate:CreateJobOutput' :: Maybe Text
rotate = Maybe Text
a} :: CreateJobOutput)

instance Prelude.Hashable CreateJobOutput

instance Prelude.NFData CreateJobOutput

instance Core.ToJSON CreateJobOutput where
  toJSON :: CreateJobOutput -> Value
toJSON CreateJobOutput' {Maybe [JobWatermark]
Maybe [Clip]
Maybe Text
Maybe Encryption
Maybe Captions
Maybe JobAlbumArt
rotate :: Maybe Text
thumbnailEncryption :: Maybe Encryption
segmentDuration :: Maybe Text
key :: Maybe Text
encryption :: Maybe Encryption
watermarks :: Maybe [JobWatermark]
albumArt :: Maybe JobAlbumArt
composition :: Maybe [Clip]
presetId :: Maybe Text
captions :: Maybe Captions
thumbnailPattern :: Maybe Text
$sel:rotate:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:thumbnailEncryption:CreateJobOutput' :: CreateJobOutput -> Maybe Encryption
$sel:segmentDuration:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:key:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:encryption:CreateJobOutput' :: CreateJobOutput -> Maybe Encryption
$sel:watermarks:CreateJobOutput' :: CreateJobOutput -> Maybe [JobWatermark]
$sel:albumArt:CreateJobOutput' :: CreateJobOutput -> Maybe JobAlbumArt
$sel:composition:CreateJobOutput' :: CreateJobOutput -> Maybe [Clip]
$sel:presetId:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:captions:CreateJobOutput' :: CreateJobOutput -> Maybe Captions
$sel:thumbnailPattern:CreateJobOutput' :: CreateJobOutput -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ThumbnailPattern" 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
thumbnailPattern,
            (Text
"Captions" Text -> Captions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Captions -> Pair) -> Maybe Captions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Captions
captions,
            (Text
"PresetId" 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
presetId,
            (Text
"Composition" Text -> [Clip] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Clip] -> Pair) -> Maybe [Clip] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Clip]
composition,
            (Text
"AlbumArt" Text -> JobAlbumArt -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (JobAlbumArt -> Pair) -> Maybe JobAlbumArt -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobAlbumArt
albumArt,
            (Text
"Watermarks" Text -> [JobWatermark] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([JobWatermark] -> Pair) -> Maybe [JobWatermark] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [JobWatermark]
watermarks,
            (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
"SegmentDuration" 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
segmentDuration,
            (Text
"ThumbnailEncryption" 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
thumbnailEncryption,
            (Text
"Rotate" 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
rotate
          ]
      )