{-# 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-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.CreateJobOutput 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.Captions
import Amazonka.ElasticTranscoder.Types.Clip
import Amazonka.ElasticTranscoder.Types.Encryption
import Amazonka.ElasticTranscoder.Types.JobAlbumArt
import Amazonka.ElasticTranscoder.Types.JobWatermark
import qualified Amazonka.Prelude as Prelude

-- | The @CreateJobOutput@ structure.
--
-- /See:/ 'newCreateJobOutput' smart constructor.
data CreateJobOutput = CreateJobOutput'
  { -- | 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,
    -- | 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,
    -- | 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],
    -- | 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,
    -- | 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,
    -- | 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,
    -- | (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,
    -- | 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,
    -- | 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]
  }
  deriving (CreateJobOutput -> CreateJobOutput -> Bool
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]
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
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. 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:
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
newCreateJobOutput ::
  CreateJobOutput
newCreateJobOutput :: CreateJobOutput
newCreateJobOutput =
  CreateJobOutput'
    { $sel:albumArt:CreateJobOutput' :: Maybe JobAlbumArt
albumArt = forall a. Maybe a
Prelude.Nothing,
      $sel:captions:CreateJobOutput' :: Maybe Captions
captions = forall a. Maybe a
Prelude.Nothing,
      $sel:composition:CreateJobOutput' :: Maybe [Clip]
composition = forall a. Maybe a
Prelude.Nothing,
      $sel:encryption:CreateJobOutput' :: Maybe Encryption
encryption = forall a. Maybe a
Prelude.Nothing,
      $sel:key:CreateJobOutput' :: Maybe Text
key = forall a. Maybe a
Prelude.Nothing,
      $sel:presetId:CreateJobOutput' :: Maybe Text
presetId = forall a. Maybe a
Prelude.Nothing,
      $sel:rotate:CreateJobOutput' :: Maybe Text
rotate = forall a. Maybe a
Prelude.Nothing,
      $sel:segmentDuration:CreateJobOutput' :: Maybe Text
segmentDuration = forall a. Maybe a
Prelude.Nothing,
      $sel:thumbnailEncryption:CreateJobOutput' :: Maybe Encryption
thumbnailEncryption = forall a. Maybe a
Prelude.Nothing,
      $sel:thumbnailPattern:CreateJobOutput' :: Maybe Text
thumbnailPattern = forall a. Maybe a
Prelude.Nothing,
      $sel:watermarks:CreateJobOutput' :: Maybe [JobWatermark]
watermarks = forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: Lens' CreateJobOutput (Maybe JobAlbumArt)
createJobOutput_albumArt = 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)

-- | 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 :: Lens' CreateJobOutput (Maybe Captions)
createJobOutput_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)

-- | 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 :: Lens' CreateJobOutput (Maybe [Clip])
createJobOutput_composition = 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) 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

-- | 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 :: Lens' CreateJobOutput (Maybe Encryption)
createJobOutput_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 :: Lens' CreateJobOutput (Maybe Text)
createJobOutput_key = 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)

-- | 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 :: Lens' CreateJobOutput (Maybe Text)
createJobOutput_presetId = 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)

-- | 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 :: Lens' CreateJobOutput (Maybe Text)
createJobOutput_rotate = 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)

-- | (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 :: Lens' CreateJobOutput (Maybe Text)
createJobOutput_segmentDuration = 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 :: Lens' CreateJobOutput (Maybe Encryption)
createJobOutput_thumbnailEncryption = 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)

-- | 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 :: Lens' CreateJobOutput (Maybe Text)
createJobOutput_thumbnailPattern = 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)

-- | 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 :: Lens' CreateJobOutput (Maybe [JobWatermark])
createJobOutput_watermarks = 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) 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 Prelude.Hashable CreateJobOutput where
  hashWithSalt :: Int -> CreateJobOutput -> Int
hashWithSalt Int
_salt CreateJobOutput' {Maybe [JobWatermark]
Maybe [Clip]
Maybe Text
Maybe Encryption
Maybe Captions
Maybe JobAlbumArt
watermarks :: Maybe [JobWatermark]
thumbnailPattern :: Maybe Text
thumbnailEncryption :: Maybe Encryption
segmentDuration :: Maybe Text
rotate :: Maybe Text
presetId :: Maybe Text
key :: Maybe Text
encryption :: Maybe Encryption
composition :: Maybe [Clip]
captions :: Maybe Captions
albumArt :: Maybe JobAlbumArt
$sel:watermarks:CreateJobOutput' :: CreateJobOutput -> Maybe [JobWatermark]
$sel:thumbnailPattern:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:thumbnailEncryption:CreateJobOutput' :: CreateJobOutput -> Maybe Encryption
$sel:segmentDuration:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:rotate:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:presetId:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:key:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:encryption:CreateJobOutput' :: CreateJobOutput -> Maybe Encryption
$sel:composition:CreateJobOutput' :: CreateJobOutput -> Maybe [Clip]
$sel:captions:CreateJobOutput' :: CreateJobOutput -> Maybe Captions
$sel:albumArt:CreateJobOutput' :: CreateJobOutput -> Maybe JobAlbumArt
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobAlbumArt
albumArt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Captions
captions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Clip]
composition
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Encryption
encryption
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
key
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
presetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
rotate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
segmentDuration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Encryption
thumbnailEncryption
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
thumbnailPattern
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [JobWatermark]
watermarks

instance Prelude.NFData CreateJobOutput where
  rnf :: CreateJobOutput -> ()
rnf CreateJobOutput' {Maybe [JobWatermark]
Maybe [Clip]
Maybe Text
Maybe Encryption
Maybe Captions
Maybe JobAlbumArt
watermarks :: Maybe [JobWatermark]
thumbnailPattern :: Maybe Text
thumbnailEncryption :: Maybe Encryption
segmentDuration :: Maybe Text
rotate :: Maybe Text
presetId :: Maybe Text
key :: Maybe Text
encryption :: Maybe Encryption
composition :: Maybe [Clip]
captions :: Maybe Captions
albumArt :: Maybe JobAlbumArt
$sel:watermarks:CreateJobOutput' :: CreateJobOutput -> Maybe [JobWatermark]
$sel:thumbnailPattern:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:thumbnailEncryption:CreateJobOutput' :: CreateJobOutput -> Maybe Encryption
$sel:segmentDuration:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:rotate:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:presetId:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:key:CreateJobOutput' :: CreateJobOutput -> Maybe Text
$sel:encryption:CreateJobOutput' :: CreateJobOutput -> Maybe Encryption
$sel:composition:CreateJobOutput' :: CreateJobOutput -> Maybe [Clip]
$sel:captions:CreateJobOutput' :: CreateJobOutput -> Maybe Captions
$sel:albumArt:CreateJobOutput' :: CreateJobOutput -> Maybe JobAlbumArt
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe JobAlbumArt
albumArt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Captions
captions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Clip]
composition
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Encryption
encryption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
key
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
presetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
rotate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
segmentDuration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Encryption
thumbnailEncryption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
thumbnailPattern
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [JobWatermark]
watermarks

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