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

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.AfdSignaling
import Amazonka.MediaConvert.Types.AntiAlias
import Amazonka.MediaConvert.Types.ColorMetadata
import Amazonka.MediaConvert.Types.DropFrameTimecode
import Amazonka.MediaConvert.Types.Rectangle
import Amazonka.MediaConvert.Types.RespondToAfd
import Amazonka.MediaConvert.Types.ScalingBehavior
import Amazonka.MediaConvert.Types.VideoCodecSettings
import Amazonka.MediaConvert.Types.VideoPreprocessor
import Amazonka.MediaConvert.Types.VideoTimecodeInsertion
import qualified Amazonka.Prelude as Prelude

-- | Settings related to video encoding of your output. The specific video
-- settings depend on the video codec that you choose. When you work
-- directly in your JSON job specification, include one instance of Video
-- description (VideoDescription) per output.
--
-- /See:/ 'newVideoDescription' smart constructor.
data VideoDescription = VideoDescription'
  { -- | Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable
    -- Timecode insertion when the input frame rate is identical to the output
    -- frame rate. To include timecodes in this output, set Timecode insertion
    -- (VideoTimecodeInsertion) to PIC_TIMING_SEI. To leave them out, set it to
    -- DISABLED. Default is DISABLED. When the service inserts timecodes in an
    -- output, by default, it uses any embedded timecodes from the input. If
    -- none are present, the service will set the timecode for the first output
    -- frame to zero. To change this default behavior, adjust the settings
    -- under Timecode configuration (TimecodeConfig). In the console, these
    -- settings are located under Job > Job settings > Timecode configuration.
    -- Note - Timecode source under input settings (InputTimecodeSource) does
    -- not affect the timecodes that are inserted in the output. Source under
    -- Job settings > Timecode configuration (TimecodeSource) does.
    VideoDescription -> Maybe VideoTimecodeInsertion
timecodeInsertion :: Prelude.Maybe VideoTimecodeInsertion,
    -- | Use the Height (Height) setting to define the video resolution height
    -- for this output. Specify in pixels. If you don\'t provide a value here,
    -- the service will use the input height.
    VideoDescription -> Maybe Natural
height :: Prelude.Maybe Prelude.Natural,
    -- | This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert
    -- AFD signaling (AfdSignaling) to specify whether the service includes AFD
    -- values in the output video data and what those values are. * Choose None
    -- to remove all AFD values from this output. * Choose Fixed to ignore
    -- input AFD values and instead encode the value specified in the job. *
    -- Choose Auto to calculate output AFD values based on the input AFD scaler
    -- data.
    VideoDescription -> Maybe AfdSignaling
afdSignaling :: Prelude.Maybe AfdSignaling,
    -- | Use Sharpness (Sharpness) setting to specify the strength of
    -- anti-aliasing. This setting changes the width of the anti-alias filter
    -- kernel used for scaling. Sharpness only applies if your output
    -- resolution is different from your input resolution. 0 is the softest
    -- setting, 100 the sharpest, and 50 recommended for most content.
    VideoDescription -> Maybe Natural
sharpness :: Prelude.Maybe Prelude.Natural,
    -- | Use Cropping selection (crop) to specify the video area that the service
    -- will include in the output video frame.
    VideoDescription -> Maybe Rectangle
crop :: Prelude.Maybe Rectangle,
    -- | Use Width (Width) to define the video resolution width, in pixels, for
    -- this output. If you don\'t provide a value here, the service will use
    -- the input width.
    VideoDescription -> Maybe Natural
width :: Prelude.Maybe Prelude.Natural,
    -- | Specify how the service handles outputs that have a different aspect
    -- ratio from the input aspect ratio. Choose Stretch to output
    -- (STRETCH_TO_OUTPUT) to have the service stretch your video image to fit.
    -- Keep the setting Default (DEFAULT) to have the service letterbox your
    -- video instead. This setting overrides any value that you specify for the
    -- setting Selection placement (position) in this output.
    VideoDescription -> Maybe ScalingBehavior
scalingBehavior :: Prelude.Maybe ScalingBehavior,
    -- | Use Respond to AFD (RespondToAfd) to specify how the service changes the
    -- video itself in response to AFD values in the input. * Choose Respond to
    -- clip the input video frame according to the AFD value, input display
    -- aspect ratio, and output display aspect ratio. * Choose Passthrough to
    -- include the input AFD values. Do not choose this when AfdSignaling is
    -- set to (NONE). A preferred implementation of this workflow is to set
    -- RespondToAfd to (NONE) and set AfdSignaling to (AUTO). * Choose None to
    -- remove all input AFD values from this output.
    VideoDescription -> Maybe RespondToAfd
respondToAfd :: Prelude.Maybe RespondToAfd,
    -- | Applies only to 29.97 fps outputs. When this feature is enabled, the
    -- service will use drop-frame timecode on outputs. If it is not possible
    -- to use drop-frame timecode, the system will fall back to non-drop-frame.
    -- This setting is enabled by default when Timecode insertion
    -- (TimecodeInsertion) is enabled.
    VideoDescription -> Maybe DropFrameTimecode
dropFrameTimecode :: Prelude.Maybe DropFrameTimecode,
    -- | The anti-alias filter is automatically applied to all outputs. The
    -- service no longer accepts the value DISABLED for AntiAlias. If you
    -- specify that in your job, the service will ignore the setting.
    VideoDescription -> Maybe AntiAlias
antiAlias :: Prelude.Maybe AntiAlias,
    -- | Applies only if you set AFD Signaling(AfdSignaling) to Fixed (FIXED).
    -- Use Fixed (FixedAfd) to specify a four-bit AFD value which the service
    -- will write on all frames of this video output.
    VideoDescription -> Maybe Natural
fixedAfd :: Prelude.Maybe Prelude.Natural,
    -- | Choose Insert (INSERT) for this setting to include color metadata in
    -- this output. Choose Ignore (IGNORE) to exclude color metadata from this
    -- output. If you don\'t specify a value, the service sets this to Insert
    -- by default.
    VideoDescription -> Maybe ColorMetadata
colorMetadata :: Prelude.Maybe ColorMetadata,
    -- | Video codec settings, (CodecSettings) under (VideoDescription), contains
    -- the group of settings related to video encoding. The settings in this
    -- group vary depending on the value that you choose for Video codec
    -- (Codec). For each codec enum that you choose, define the corresponding
    -- settings object. The following lists the codec enum, settings object
    -- pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE,
    -- FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings *
    -- MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8,
    -- Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
    VideoDescription -> Maybe VideoCodecSettings
codecSettings :: Prelude.Maybe VideoCodecSettings,
    -- | Find additional transcoding features under Preprocessors
    -- (VideoPreprocessors). Enable the features at each output individually.
    -- These features are disabled by default.
    VideoDescription -> Maybe VideoPreprocessor
videoPreprocessors :: Prelude.Maybe VideoPreprocessor,
    -- | Use Selection placement (position) to define the video area in your
    -- output frame. The area outside of the rectangle that you specify here is
    -- black.
    VideoDescription -> Maybe Rectangle
position :: Prelude.Maybe Rectangle
  }
  deriving (VideoDescription -> VideoDescription -> Bool
(VideoDescription -> VideoDescription -> Bool)
-> (VideoDescription -> VideoDescription -> Bool)
-> Eq VideoDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoDescription -> VideoDescription -> Bool
$c/= :: VideoDescription -> VideoDescription -> Bool
== :: VideoDescription -> VideoDescription -> Bool
$c== :: VideoDescription -> VideoDescription -> Bool
Prelude.Eq, ReadPrec [VideoDescription]
ReadPrec VideoDescription
Int -> ReadS VideoDescription
ReadS [VideoDescription]
(Int -> ReadS VideoDescription)
-> ReadS [VideoDescription]
-> ReadPrec VideoDescription
-> ReadPrec [VideoDescription]
-> Read VideoDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VideoDescription]
$creadListPrec :: ReadPrec [VideoDescription]
readPrec :: ReadPrec VideoDescription
$creadPrec :: ReadPrec VideoDescription
readList :: ReadS [VideoDescription]
$creadList :: ReadS [VideoDescription]
readsPrec :: Int -> ReadS VideoDescription
$creadsPrec :: Int -> ReadS VideoDescription
Prelude.Read, Int -> VideoDescription -> ShowS
[VideoDescription] -> ShowS
VideoDescription -> String
(Int -> VideoDescription -> ShowS)
-> (VideoDescription -> String)
-> ([VideoDescription] -> ShowS)
-> Show VideoDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoDescription] -> ShowS
$cshowList :: [VideoDescription] -> ShowS
show :: VideoDescription -> String
$cshow :: VideoDescription -> String
showsPrec :: Int -> VideoDescription -> ShowS
$cshowsPrec :: Int -> VideoDescription -> ShowS
Prelude.Show, (forall x. VideoDescription -> Rep VideoDescription x)
-> (forall x. Rep VideoDescription x -> VideoDescription)
-> Generic VideoDescription
forall x. Rep VideoDescription x -> VideoDescription
forall x. VideoDescription -> Rep VideoDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VideoDescription x -> VideoDescription
$cfrom :: forall x. VideoDescription -> Rep VideoDescription x
Prelude.Generic)

-- |
-- Create a value of 'VideoDescription' 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:
--
-- 'timecodeInsertion', 'videoDescription_timecodeInsertion' - Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable
-- Timecode insertion when the input frame rate is identical to the output
-- frame rate. To include timecodes in this output, set Timecode insertion
-- (VideoTimecodeInsertion) to PIC_TIMING_SEI. To leave them out, set it to
-- DISABLED. Default is DISABLED. When the service inserts timecodes in an
-- output, by default, it uses any embedded timecodes from the input. If
-- none are present, the service will set the timecode for the first output
-- frame to zero. To change this default behavior, adjust the settings
-- under Timecode configuration (TimecodeConfig). In the console, these
-- settings are located under Job > Job settings > Timecode configuration.
-- Note - Timecode source under input settings (InputTimecodeSource) does
-- not affect the timecodes that are inserted in the output. Source under
-- Job settings > Timecode configuration (TimecodeSource) does.
--
-- 'height', 'videoDescription_height' - Use the Height (Height) setting to define the video resolution height
-- for this output. Specify in pixels. If you don\'t provide a value here,
-- the service will use the input height.
--
-- 'afdSignaling', 'videoDescription_afdSignaling' - This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert
-- AFD signaling (AfdSignaling) to specify whether the service includes AFD
-- values in the output video data and what those values are. * Choose None
-- to remove all AFD values from this output. * Choose Fixed to ignore
-- input AFD values and instead encode the value specified in the job. *
-- Choose Auto to calculate output AFD values based on the input AFD scaler
-- data.
--
-- 'sharpness', 'videoDescription_sharpness' - Use Sharpness (Sharpness) setting to specify the strength of
-- anti-aliasing. This setting changes the width of the anti-alias filter
-- kernel used for scaling. Sharpness only applies if your output
-- resolution is different from your input resolution. 0 is the softest
-- setting, 100 the sharpest, and 50 recommended for most content.
--
-- 'crop', 'videoDescription_crop' - Use Cropping selection (crop) to specify the video area that the service
-- will include in the output video frame.
--
-- 'width', 'videoDescription_width' - Use Width (Width) to define the video resolution width, in pixels, for
-- this output. If you don\'t provide a value here, the service will use
-- the input width.
--
-- 'scalingBehavior', 'videoDescription_scalingBehavior' - Specify how the service handles outputs that have a different aspect
-- ratio from the input aspect ratio. Choose Stretch to output
-- (STRETCH_TO_OUTPUT) to have the service stretch your video image to fit.
-- Keep the setting Default (DEFAULT) to have the service letterbox your
-- video instead. This setting overrides any value that you specify for the
-- setting Selection placement (position) in this output.
--
-- 'respondToAfd', 'videoDescription_respondToAfd' - Use Respond to AFD (RespondToAfd) to specify how the service changes the
-- video itself in response to AFD values in the input. * Choose Respond to
-- clip the input video frame according to the AFD value, input display
-- aspect ratio, and output display aspect ratio. * Choose Passthrough to
-- include the input AFD values. Do not choose this when AfdSignaling is
-- set to (NONE). A preferred implementation of this workflow is to set
-- RespondToAfd to (NONE) and set AfdSignaling to (AUTO). * Choose None to
-- remove all input AFD values from this output.
--
-- 'dropFrameTimecode', 'videoDescription_dropFrameTimecode' - Applies only to 29.97 fps outputs. When this feature is enabled, the
-- service will use drop-frame timecode on outputs. If it is not possible
-- to use drop-frame timecode, the system will fall back to non-drop-frame.
-- This setting is enabled by default when Timecode insertion
-- (TimecodeInsertion) is enabled.
--
-- 'antiAlias', 'videoDescription_antiAlias' - The anti-alias filter is automatically applied to all outputs. The
-- service no longer accepts the value DISABLED for AntiAlias. If you
-- specify that in your job, the service will ignore the setting.
--
-- 'fixedAfd', 'videoDescription_fixedAfd' - Applies only if you set AFD Signaling(AfdSignaling) to Fixed (FIXED).
-- Use Fixed (FixedAfd) to specify a four-bit AFD value which the service
-- will write on all frames of this video output.
--
-- 'colorMetadata', 'videoDescription_colorMetadata' - Choose Insert (INSERT) for this setting to include color metadata in
-- this output. Choose Ignore (IGNORE) to exclude color metadata from this
-- output. If you don\'t specify a value, the service sets this to Insert
-- by default.
--
-- 'codecSettings', 'videoDescription_codecSettings' - Video codec settings, (CodecSettings) under (VideoDescription), contains
-- the group of settings related to video encoding. The settings in this
-- group vary depending on the value that you choose for Video codec
-- (Codec). For each codec enum that you choose, define the corresponding
-- settings object. The following lists the codec enum, settings object
-- pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE,
-- FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings *
-- MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8,
-- Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
--
-- 'videoPreprocessors', 'videoDescription_videoPreprocessors' - Find additional transcoding features under Preprocessors
-- (VideoPreprocessors). Enable the features at each output individually.
-- These features are disabled by default.
--
-- 'position', 'videoDescription_position' - Use Selection placement (position) to define the video area in your
-- output frame. The area outside of the rectangle that you specify here is
-- black.
newVideoDescription ::
  VideoDescription
newVideoDescription :: VideoDescription
newVideoDescription =
  VideoDescription' :: Maybe VideoTimecodeInsertion
-> Maybe Natural
-> Maybe AfdSignaling
-> Maybe Natural
-> Maybe Rectangle
-> Maybe Natural
-> Maybe ScalingBehavior
-> Maybe RespondToAfd
-> Maybe DropFrameTimecode
-> Maybe AntiAlias
-> Maybe Natural
-> Maybe ColorMetadata
-> Maybe VideoCodecSettings
-> Maybe VideoPreprocessor
-> Maybe Rectangle
-> VideoDescription
VideoDescription'
    { $sel:timecodeInsertion:VideoDescription' :: Maybe VideoTimecodeInsertion
timecodeInsertion =
        Maybe VideoTimecodeInsertion
forall a. Maybe a
Prelude.Nothing,
      $sel:height:VideoDescription' :: Maybe Natural
height = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:afdSignaling:VideoDescription' :: Maybe AfdSignaling
afdSignaling = Maybe AfdSignaling
forall a. Maybe a
Prelude.Nothing,
      $sel:sharpness:VideoDescription' :: Maybe Natural
sharpness = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:crop:VideoDescription' :: Maybe Rectangle
crop = Maybe Rectangle
forall a. Maybe a
Prelude.Nothing,
      $sel:width:VideoDescription' :: Maybe Natural
width = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:scalingBehavior:VideoDescription' :: Maybe ScalingBehavior
scalingBehavior = Maybe ScalingBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:respondToAfd:VideoDescription' :: Maybe RespondToAfd
respondToAfd = Maybe RespondToAfd
forall a. Maybe a
Prelude.Nothing,
      $sel:dropFrameTimecode:VideoDescription' :: Maybe DropFrameTimecode
dropFrameTimecode = Maybe DropFrameTimecode
forall a. Maybe a
Prelude.Nothing,
      $sel:antiAlias:VideoDescription' :: Maybe AntiAlias
antiAlias = Maybe AntiAlias
forall a. Maybe a
Prelude.Nothing,
      $sel:fixedAfd:VideoDescription' :: Maybe Natural
fixedAfd = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:colorMetadata:VideoDescription' :: Maybe ColorMetadata
colorMetadata = Maybe ColorMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:codecSettings:VideoDescription' :: Maybe VideoCodecSettings
codecSettings = Maybe VideoCodecSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:videoPreprocessors:VideoDescription' :: Maybe VideoPreprocessor
videoPreprocessors = Maybe VideoPreprocessor
forall a. Maybe a
Prelude.Nothing,
      $sel:position:VideoDescription' :: Maybe Rectangle
position = Maybe Rectangle
forall a. Maybe a
Prelude.Nothing
    }

-- | Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable
-- Timecode insertion when the input frame rate is identical to the output
-- frame rate. To include timecodes in this output, set Timecode insertion
-- (VideoTimecodeInsertion) to PIC_TIMING_SEI. To leave them out, set it to
-- DISABLED. Default is DISABLED. When the service inserts timecodes in an
-- output, by default, it uses any embedded timecodes from the input. If
-- none are present, the service will set the timecode for the first output
-- frame to zero. To change this default behavior, adjust the settings
-- under Timecode configuration (TimecodeConfig). In the console, these
-- settings are located under Job > Job settings > Timecode configuration.
-- Note - Timecode source under input settings (InputTimecodeSource) does
-- not affect the timecodes that are inserted in the output. Source under
-- Job settings > Timecode configuration (TimecodeSource) does.
videoDescription_timecodeInsertion :: Lens.Lens' VideoDescription (Prelude.Maybe VideoTimecodeInsertion)
videoDescription_timecodeInsertion :: (Maybe VideoTimecodeInsertion -> f (Maybe VideoTimecodeInsertion))
-> VideoDescription -> f VideoDescription
videoDescription_timecodeInsertion = (VideoDescription -> Maybe VideoTimecodeInsertion)
-> (VideoDescription
    -> Maybe VideoTimecodeInsertion -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe VideoTimecodeInsertion)
     (Maybe VideoTimecodeInsertion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe VideoTimecodeInsertion
timecodeInsertion :: Maybe VideoTimecodeInsertion
$sel:timecodeInsertion:VideoDescription' :: VideoDescription -> Maybe VideoTimecodeInsertion
timecodeInsertion} -> Maybe VideoTimecodeInsertion
timecodeInsertion) (\s :: VideoDescription
s@VideoDescription' {} Maybe VideoTimecodeInsertion
a -> VideoDescription
s {$sel:timecodeInsertion:VideoDescription' :: Maybe VideoTimecodeInsertion
timecodeInsertion = Maybe VideoTimecodeInsertion
a} :: VideoDescription)

-- | Use the Height (Height) setting to define the video resolution height
-- for this output. Specify in pixels. If you don\'t provide a value here,
-- the service will use the input height.
videoDescription_height :: Lens.Lens' VideoDescription (Prelude.Maybe Prelude.Natural)
videoDescription_height :: (Maybe Natural -> f (Maybe Natural))
-> VideoDescription -> f VideoDescription
videoDescription_height = (VideoDescription -> Maybe Natural)
-> (VideoDescription -> Maybe Natural -> VideoDescription)
-> Lens
     VideoDescription VideoDescription (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe Natural
height :: Maybe Natural
$sel:height:VideoDescription' :: VideoDescription -> Maybe Natural
height} -> Maybe Natural
height) (\s :: VideoDescription
s@VideoDescription' {} Maybe Natural
a -> VideoDescription
s {$sel:height:VideoDescription' :: Maybe Natural
height = Maybe Natural
a} :: VideoDescription)

-- | This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert
-- AFD signaling (AfdSignaling) to specify whether the service includes AFD
-- values in the output video data and what those values are. * Choose None
-- to remove all AFD values from this output. * Choose Fixed to ignore
-- input AFD values and instead encode the value specified in the job. *
-- Choose Auto to calculate output AFD values based on the input AFD scaler
-- data.
videoDescription_afdSignaling :: Lens.Lens' VideoDescription (Prelude.Maybe AfdSignaling)
videoDescription_afdSignaling :: (Maybe AfdSignaling -> f (Maybe AfdSignaling))
-> VideoDescription -> f VideoDescription
videoDescription_afdSignaling = (VideoDescription -> Maybe AfdSignaling)
-> (VideoDescription -> Maybe AfdSignaling -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe AfdSignaling)
     (Maybe AfdSignaling)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe AfdSignaling
afdSignaling :: Maybe AfdSignaling
$sel:afdSignaling:VideoDescription' :: VideoDescription -> Maybe AfdSignaling
afdSignaling} -> Maybe AfdSignaling
afdSignaling) (\s :: VideoDescription
s@VideoDescription' {} Maybe AfdSignaling
a -> VideoDescription
s {$sel:afdSignaling:VideoDescription' :: Maybe AfdSignaling
afdSignaling = Maybe AfdSignaling
a} :: VideoDescription)

-- | Use Sharpness (Sharpness) setting to specify the strength of
-- anti-aliasing. This setting changes the width of the anti-alias filter
-- kernel used for scaling. Sharpness only applies if your output
-- resolution is different from your input resolution. 0 is the softest
-- setting, 100 the sharpest, and 50 recommended for most content.
videoDescription_sharpness :: Lens.Lens' VideoDescription (Prelude.Maybe Prelude.Natural)
videoDescription_sharpness :: (Maybe Natural -> f (Maybe Natural))
-> VideoDescription -> f VideoDescription
videoDescription_sharpness = (VideoDescription -> Maybe Natural)
-> (VideoDescription -> Maybe Natural -> VideoDescription)
-> Lens
     VideoDescription VideoDescription (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe Natural
sharpness :: Maybe Natural
$sel:sharpness:VideoDescription' :: VideoDescription -> Maybe Natural
sharpness} -> Maybe Natural
sharpness) (\s :: VideoDescription
s@VideoDescription' {} Maybe Natural
a -> VideoDescription
s {$sel:sharpness:VideoDescription' :: Maybe Natural
sharpness = Maybe Natural
a} :: VideoDescription)

-- | Use Cropping selection (crop) to specify the video area that the service
-- will include in the output video frame.
videoDescription_crop :: Lens.Lens' VideoDescription (Prelude.Maybe Rectangle)
videoDescription_crop :: (Maybe Rectangle -> f (Maybe Rectangle))
-> VideoDescription -> f VideoDescription
videoDescription_crop = (VideoDescription -> Maybe Rectangle)
-> (VideoDescription -> Maybe Rectangle -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe Rectangle)
     (Maybe Rectangle)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe Rectangle
crop :: Maybe Rectangle
$sel:crop:VideoDescription' :: VideoDescription -> Maybe Rectangle
crop} -> Maybe Rectangle
crop) (\s :: VideoDescription
s@VideoDescription' {} Maybe Rectangle
a -> VideoDescription
s {$sel:crop:VideoDescription' :: Maybe Rectangle
crop = Maybe Rectangle
a} :: VideoDescription)

-- | Use Width (Width) to define the video resolution width, in pixels, for
-- this output. If you don\'t provide a value here, the service will use
-- the input width.
videoDescription_width :: Lens.Lens' VideoDescription (Prelude.Maybe Prelude.Natural)
videoDescription_width :: (Maybe Natural -> f (Maybe Natural))
-> VideoDescription -> f VideoDescription
videoDescription_width = (VideoDescription -> Maybe Natural)
-> (VideoDescription -> Maybe Natural -> VideoDescription)
-> Lens
     VideoDescription VideoDescription (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe Natural
width :: Maybe Natural
$sel:width:VideoDescription' :: VideoDescription -> Maybe Natural
width} -> Maybe Natural
width) (\s :: VideoDescription
s@VideoDescription' {} Maybe Natural
a -> VideoDescription
s {$sel:width:VideoDescription' :: Maybe Natural
width = Maybe Natural
a} :: VideoDescription)

-- | Specify how the service handles outputs that have a different aspect
-- ratio from the input aspect ratio. Choose Stretch to output
-- (STRETCH_TO_OUTPUT) to have the service stretch your video image to fit.
-- Keep the setting Default (DEFAULT) to have the service letterbox your
-- video instead. This setting overrides any value that you specify for the
-- setting Selection placement (position) in this output.
videoDescription_scalingBehavior :: Lens.Lens' VideoDescription (Prelude.Maybe ScalingBehavior)
videoDescription_scalingBehavior :: (Maybe ScalingBehavior -> f (Maybe ScalingBehavior))
-> VideoDescription -> f VideoDescription
videoDescription_scalingBehavior = (VideoDescription -> Maybe ScalingBehavior)
-> (VideoDescription -> Maybe ScalingBehavior -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe ScalingBehavior)
     (Maybe ScalingBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe ScalingBehavior
scalingBehavior :: Maybe ScalingBehavior
$sel:scalingBehavior:VideoDescription' :: VideoDescription -> Maybe ScalingBehavior
scalingBehavior} -> Maybe ScalingBehavior
scalingBehavior) (\s :: VideoDescription
s@VideoDescription' {} Maybe ScalingBehavior
a -> VideoDescription
s {$sel:scalingBehavior:VideoDescription' :: Maybe ScalingBehavior
scalingBehavior = Maybe ScalingBehavior
a} :: VideoDescription)

-- | Use Respond to AFD (RespondToAfd) to specify how the service changes the
-- video itself in response to AFD values in the input. * Choose Respond to
-- clip the input video frame according to the AFD value, input display
-- aspect ratio, and output display aspect ratio. * Choose Passthrough to
-- include the input AFD values. Do not choose this when AfdSignaling is
-- set to (NONE). A preferred implementation of this workflow is to set
-- RespondToAfd to (NONE) and set AfdSignaling to (AUTO). * Choose None to
-- remove all input AFD values from this output.
videoDescription_respondToAfd :: Lens.Lens' VideoDescription (Prelude.Maybe RespondToAfd)
videoDescription_respondToAfd :: (Maybe RespondToAfd -> f (Maybe RespondToAfd))
-> VideoDescription -> f VideoDescription
videoDescription_respondToAfd = (VideoDescription -> Maybe RespondToAfd)
-> (VideoDescription -> Maybe RespondToAfd -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe RespondToAfd)
     (Maybe RespondToAfd)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe RespondToAfd
respondToAfd :: Maybe RespondToAfd
$sel:respondToAfd:VideoDescription' :: VideoDescription -> Maybe RespondToAfd
respondToAfd} -> Maybe RespondToAfd
respondToAfd) (\s :: VideoDescription
s@VideoDescription' {} Maybe RespondToAfd
a -> VideoDescription
s {$sel:respondToAfd:VideoDescription' :: Maybe RespondToAfd
respondToAfd = Maybe RespondToAfd
a} :: VideoDescription)

-- | Applies only to 29.97 fps outputs. When this feature is enabled, the
-- service will use drop-frame timecode on outputs. If it is not possible
-- to use drop-frame timecode, the system will fall back to non-drop-frame.
-- This setting is enabled by default when Timecode insertion
-- (TimecodeInsertion) is enabled.
videoDescription_dropFrameTimecode :: Lens.Lens' VideoDescription (Prelude.Maybe DropFrameTimecode)
videoDescription_dropFrameTimecode :: (Maybe DropFrameTimecode -> f (Maybe DropFrameTimecode))
-> VideoDescription -> f VideoDescription
videoDescription_dropFrameTimecode = (VideoDescription -> Maybe DropFrameTimecode)
-> (VideoDescription
    -> Maybe DropFrameTimecode -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe DropFrameTimecode)
     (Maybe DropFrameTimecode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe DropFrameTimecode
dropFrameTimecode :: Maybe DropFrameTimecode
$sel:dropFrameTimecode:VideoDescription' :: VideoDescription -> Maybe DropFrameTimecode
dropFrameTimecode} -> Maybe DropFrameTimecode
dropFrameTimecode) (\s :: VideoDescription
s@VideoDescription' {} Maybe DropFrameTimecode
a -> VideoDescription
s {$sel:dropFrameTimecode:VideoDescription' :: Maybe DropFrameTimecode
dropFrameTimecode = Maybe DropFrameTimecode
a} :: VideoDescription)

-- | The anti-alias filter is automatically applied to all outputs. The
-- service no longer accepts the value DISABLED for AntiAlias. If you
-- specify that in your job, the service will ignore the setting.
videoDescription_antiAlias :: Lens.Lens' VideoDescription (Prelude.Maybe AntiAlias)
videoDescription_antiAlias :: (Maybe AntiAlias -> f (Maybe AntiAlias))
-> VideoDescription -> f VideoDescription
videoDescription_antiAlias = (VideoDescription -> Maybe AntiAlias)
-> (VideoDescription -> Maybe AntiAlias -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe AntiAlias)
     (Maybe AntiAlias)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe AntiAlias
antiAlias :: Maybe AntiAlias
$sel:antiAlias:VideoDescription' :: VideoDescription -> Maybe AntiAlias
antiAlias} -> Maybe AntiAlias
antiAlias) (\s :: VideoDescription
s@VideoDescription' {} Maybe AntiAlias
a -> VideoDescription
s {$sel:antiAlias:VideoDescription' :: Maybe AntiAlias
antiAlias = Maybe AntiAlias
a} :: VideoDescription)

-- | Applies only if you set AFD Signaling(AfdSignaling) to Fixed (FIXED).
-- Use Fixed (FixedAfd) to specify a four-bit AFD value which the service
-- will write on all frames of this video output.
videoDescription_fixedAfd :: Lens.Lens' VideoDescription (Prelude.Maybe Prelude.Natural)
videoDescription_fixedAfd :: (Maybe Natural -> f (Maybe Natural))
-> VideoDescription -> f VideoDescription
videoDescription_fixedAfd = (VideoDescription -> Maybe Natural)
-> (VideoDescription -> Maybe Natural -> VideoDescription)
-> Lens
     VideoDescription VideoDescription (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe Natural
fixedAfd :: Maybe Natural
$sel:fixedAfd:VideoDescription' :: VideoDescription -> Maybe Natural
fixedAfd} -> Maybe Natural
fixedAfd) (\s :: VideoDescription
s@VideoDescription' {} Maybe Natural
a -> VideoDescription
s {$sel:fixedAfd:VideoDescription' :: Maybe Natural
fixedAfd = Maybe Natural
a} :: VideoDescription)

-- | Choose Insert (INSERT) for this setting to include color metadata in
-- this output. Choose Ignore (IGNORE) to exclude color metadata from this
-- output. If you don\'t specify a value, the service sets this to Insert
-- by default.
videoDescription_colorMetadata :: Lens.Lens' VideoDescription (Prelude.Maybe ColorMetadata)
videoDescription_colorMetadata :: (Maybe ColorMetadata -> f (Maybe ColorMetadata))
-> VideoDescription -> f VideoDescription
videoDescription_colorMetadata = (VideoDescription -> Maybe ColorMetadata)
-> (VideoDescription -> Maybe ColorMetadata -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe ColorMetadata)
     (Maybe ColorMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe ColorMetadata
colorMetadata :: Maybe ColorMetadata
$sel:colorMetadata:VideoDescription' :: VideoDescription -> Maybe ColorMetadata
colorMetadata} -> Maybe ColorMetadata
colorMetadata) (\s :: VideoDescription
s@VideoDescription' {} Maybe ColorMetadata
a -> VideoDescription
s {$sel:colorMetadata:VideoDescription' :: Maybe ColorMetadata
colorMetadata = Maybe ColorMetadata
a} :: VideoDescription)

-- | Video codec settings, (CodecSettings) under (VideoDescription), contains
-- the group of settings related to video encoding. The settings in this
-- group vary depending on the value that you choose for Video codec
-- (Codec). For each codec enum that you choose, define the corresponding
-- settings object. The following lists the codec enum, settings object
-- pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE,
-- FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings *
-- MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8,
-- Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
videoDescription_codecSettings :: Lens.Lens' VideoDescription (Prelude.Maybe VideoCodecSettings)
videoDescription_codecSettings :: (Maybe VideoCodecSettings -> f (Maybe VideoCodecSettings))
-> VideoDescription -> f VideoDescription
videoDescription_codecSettings = (VideoDescription -> Maybe VideoCodecSettings)
-> (VideoDescription
    -> Maybe VideoCodecSettings -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe VideoCodecSettings)
     (Maybe VideoCodecSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe VideoCodecSettings
codecSettings :: Maybe VideoCodecSettings
$sel:codecSettings:VideoDescription' :: VideoDescription -> Maybe VideoCodecSettings
codecSettings} -> Maybe VideoCodecSettings
codecSettings) (\s :: VideoDescription
s@VideoDescription' {} Maybe VideoCodecSettings
a -> VideoDescription
s {$sel:codecSettings:VideoDescription' :: Maybe VideoCodecSettings
codecSettings = Maybe VideoCodecSettings
a} :: VideoDescription)

-- | Find additional transcoding features under Preprocessors
-- (VideoPreprocessors). Enable the features at each output individually.
-- These features are disabled by default.
videoDescription_videoPreprocessors :: Lens.Lens' VideoDescription (Prelude.Maybe VideoPreprocessor)
videoDescription_videoPreprocessors :: (Maybe VideoPreprocessor -> f (Maybe VideoPreprocessor))
-> VideoDescription -> f VideoDescription
videoDescription_videoPreprocessors = (VideoDescription -> Maybe VideoPreprocessor)
-> (VideoDescription
    -> Maybe VideoPreprocessor -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe VideoPreprocessor)
     (Maybe VideoPreprocessor)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe VideoPreprocessor
videoPreprocessors :: Maybe VideoPreprocessor
$sel:videoPreprocessors:VideoDescription' :: VideoDescription -> Maybe VideoPreprocessor
videoPreprocessors} -> Maybe VideoPreprocessor
videoPreprocessors) (\s :: VideoDescription
s@VideoDescription' {} Maybe VideoPreprocessor
a -> VideoDescription
s {$sel:videoPreprocessors:VideoDescription' :: Maybe VideoPreprocessor
videoPreprocessors = Maybe VideoPreprocessor
a} :: VideoDescription)

-- | Use Selection placement (position) to define the video area in your
-- output frame. The area outside of the rectangle that you specify here is
-- black.
videoDescription_position :: Lens.Lens' VideoDescription (Prelude.Maybe Rectangle)
videoDescription_position :: (Maybe Rectangle -> f (Maybe Rectangle))
-> VideoDescription -> f VideoDescription
videoDescription_position = (VideoDescription -> Maybe Rectangle)
-> (VideoDescription -> Maybe Rectangle -> VideoDescription)
-> Lens
     VideoDescription
     VideoDescription
     (Maybe Rectangle)
     (Maybe Rectangle)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoDescription' {Maybe Rectangle
position :: Maybe Rectangle
$sel:position:VideoDescription' :: VideoDescription -> Maybe Rectangle
position} -> Maybe Rectangle
position) (\s :: VideoDescription
s@VideoDescription' {} Maybe Rectangle
a -> VideoDescription
s {$sel:position:VideoDescription' :: Maybe Rectangle
position = Maybe Rectangle
a} :: VideoDescription)

instance Core.FromJSON VideoDescription where
  parseJSON :: Value -> Parser VideoDescription
parseJSON =
    String
-> (Object -> Parser VideoDescription)
-> Value
-> Parser VideoDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VideoDescription"
      ( \Object
x ->
          Maybe VideoTimecodeInsertion
-> Maybe Natural
-> Maybe AfdSignaling
-> Maybe Natural
-> Maybe Rectangle
-> Maybe Natural
-> Maybe ScalingBehavior
-> Maybe RespondToAfd
-> Maybe DropFrameTimecode
-> Maybe AntiAlias
-> Maybe Natural
-> Maybe ColorMetadata
-> Maybe VideoCodecSettings
-> Maybe VideoPreprocessor
-> Maybe Rectangle
-> VideoDescription
VideoDescription'
            (Maybe VideoTimecodeInsertion
 -> Maybe Natural
 -> Maybe AfdSignaling
 -> Maybe Natural
 -> Maybe Rectangle
 -> Maybe Natural
 -> Maybe ScalingBehavior
 -> Maybe RespondToAfd
 -> Maybe DropFrameTimecode
 -> Maybe AntiAlias
 -> Maybe Natural
 -> Maybe ColorMetadata
 -> Maybe VideoCodecSettings
 -> Maybe VideoPreprocessor
 -> Maybe Rectangle
 -> VideoDescription)
-> Parser (Maybe VideoTimecodeInsertion)
-> Parser
     (Maybe Natural
      -> Maybe AfdSignaling
      -> Maybe Natural
      -> Maybe Rectangle
      -> Maybe Natural
      -> Maybe ScalingBehavior
      -> Maybe RespondToAfd
      -> Maybe DropFrameTimecode
      -> Maybe AntiAlias
      -> Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe VideoTimecodeInsertion)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timecodeInsertion")
            Parser
  (Maybe Natural
   -> Maybe AfdSignaling
   -> Maybe Natural
   -> Maybe Rectangle
   -> Maybe Natural
   -> Maybe ScalingBehavior
   -> Maybe RespondToAfd
   -> Maybe DropFrameTimecode
   -> Maybe AntiAlias
   -> Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe AfdSignaling
      -> Maybe Natural
      -> Maybe Rectangle
      -> Maybe Natural
      -> Maybe ScalingBehavior
      -> Maybe RespondToAfd
      -> Maybe DropFrameTimecode
      -> Maybe AntiAlias
      -> Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"height")
            Parser
  (Maybe AfdSignaling
   -> Maybe Natural
   -> Maybe Rectangle
   -> Maybe Natural
   -> Maybe ScalingBehavior
   -> Maybe RespondToAfd
   -> Maybe DropFrameTimecode
   -> Maybe AntiAlias
   -> Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe AfdSignaling)
-> Parser
     (Maybe Natural
      -> Maybe Rectangle
      -> Maybe Natural
      -> Maybe ScalingBehavior
      -> Maybe RespondToAfd
      -> Maybe DropFrameTimecode
      -> Maybe AntiAlias
      -> Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AfdSignaling)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"afdSignaling")
            Parser
  (Maybe Natural
   -> Maybe Rectangle
   -> Maybe Natural
   -> Maybe ScalingBehavior
   -> Maybe RespondToAfd
   -> Maybe DropFrameTimecode
   -> Maybe AntiAlias
   -> Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Rectangle
      -> Maybe Natural
      -> Maybe ScalingBehavior
      -> Maybe RespondToAfd
      -> Maybe DropFrameTimecode
      -> Maybe AntiAlias
      -> Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sharpness")
            Parser
  (Maybe Rectangle
   -> Maybe Natural
   -> Maybe ScalingBehavior
   -> Maybe RespondToAfd
   -> Maybe DropFrameTimecode
   -> Maybe AntiAlias
   -> Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe Rectangle)
-> Parser
     (Maybe Natural
      -> Maybe ScalingBehavior
      -> Maybe RespondToAfd
      -> Maybe DropFrameTimecode
      -> Maybe AntiAlias
      -> Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Rectangle)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"crop")
            Parser
  (Maybe Natural
   -> Maybe ScalingBehavior
   -> Maybe RespondToAfd
   -> Maybe DropFrameTimecode
   -> Maybe AntiAlias
   -> Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe ScalingBehavior
      -> Maybe RespondToAfd
      -> Maybe DropFrameTimecode
      -> Maybe AntiAlias
      -> Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"width")
            Parser
  (Maybe ScalingBehavior
   -> Maybe RespondToAfd
   -> Maybe DropFrameTimecode
   -> Maybe AntiAlias
   -> Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe ScalingBehavior)
-> Parser
     (Maybe RespondToAfd
      -> Maybe DropFrameTimecode
      -> Maybe AntiAlias
      -> Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ScalingBehavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scalingBehavior")
            Parser
  (Maybe RespondToAfd
   -> Maybe DropFrameTimecode
   -> Maybe AntiAlias
   -> Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe RespondToAfd)
-> Parser
     (Maybe DropFrameTimecode
      -> Maybe AntiAlias
      -> Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RespondToAfd)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"respondToAfd")
            Parser
  (Maybe DropFrameTimecode
   -> Maybe AntiAlias
   -> Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe DropFrameTimecode)
-> Parser
     (Maybe AntiAlias
      -> Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DropFrameTimecode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dropFrameTimecode")
            Parser
  (Maybe AntiAlias
   -> Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe AntiAlias)
-> Parser
     (Maybe Natural
      -> Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AntiAlias)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"antiAlias")
            Parser
  (Maybe Natural
   -> Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe ColorMetadata
      -> Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor
      -> Maybe Rectangle
      -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"fixedAfd")
            Parser
  (Maybe ColorMetadata
   -> Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor
   -> Maybe Rectangle
   -> VideoDescription)
-> Parser (Maybe ColorMetadata)
-> Parser
     (Maybe VideoCodecSettings
      -> Maybe VideoPreprocessor -> Maybe Rectangle -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ColorMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"colorMetadata")
            Parser
  (Maybe VideoCodecSettings
   -> Maybe VideoPreprocessor -> Maybe Rectangle -> VideoDescription)
-> Parser (Maybe VideoCodecSettings)
-> Parser
     (Maybe VideoPreprocessor -> Maybe Rectangle -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VideoCodecSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"codecSettings")
            Parser
  (Maybe VideoPreprocessor -> Maybe Rectangle -> VideoDescription)
-> Parser (Maybe VideoPreprocessor)
-> Parser (Maybe Rectangle -> VideoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VideoPreprocessor)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"videoPreprocessors")
            Parser (Maybe Rectangle -> VideoDescription)
-> Parser (Maybe Rectangle) -> Parser VideoDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Rectangle)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"position")
      )

instance Prelude.Hashable VideoDescription

instance Prelude.NFData VideoDescription

instance Core.ToJSON VideoDescription where
  toJSON :: VideoDescription -> Value
toJSON VideoDescription' {Maybe Natural
Maybe AfdSignaling
Maybe AntiAlias
Maybe ColorMetadata
Maybe DropFrameTimecode
Maybe Rectangle
Maybe RespondToAfd
Maybe ScalingBehavior
Maybe VideoTimecodeInsertion
Maybe VideoPreprocessor
Maybe VideoCodecSettings
position :: Maybe Rectangle
videoPreprocessors :: Maybe VideoPreprocessor
codecSettings :: Maybe VideoCodecSettings
colorMetadata :: Maybe ColorMetadata
fixedAfd :: Maybe Natural
antiAlias :: Maybe AntiAlias
dropFrameTimecode :: Maybe DropFrameTimecode
respondToAfd :: Maybe RespondToAfd
scalingBehavior :: Maybe ScalingBehavior
width :: Maybe Natural
crop :: Maybe Rectangle
sharpness :: Maybe Natural
afdSignaling :: Maybe AfdSignaling
height :: Maybe Natural
timecodeInsertion :: Maybe VideoTimecodeInsertion
$sel:position:VideoDescription' :: VideoDescription -> Maybe Rectangle
$sel:videoPreprocessors:VideoDescription' :: VideoDescription -> Maybe VideoPreprocessor
$sel:codecSettings:VideoDescription' :: VideoDescription -> Maybe VideoCodecSettings
$sel:colorMetadata:VideoDescription' :: VideoDescription -> Maybe ColorMetadata
$sel:fixedAfd:VideoDescription' :: VideoDescription -> Maybe Natural
$sel:antiAlias:VideoDescription' :: VideoDescription -> Maybe AntiAlias
$sel:dropFrameTimecode:VideoDescription' :: VideoDescription -> Maybe DropFrameTimecode
$sel:respondToAfd:VideoDescription' :: VideoDescription -> Maybe RespondToAfd
$sel:scalingBehavior:VideoDescription' :: VideoDescription -> Maybe ScalingBehavior
$sel:width:VideoDescription' :: VideoDescription -> Maybe Natural
$sel:crop:VideoDescription' :: VideoDescription -> Maybe Rectangle
$sel:sharpness:VideoDescription' :: VideoDescription -> Maybe Natural
$sel:afdSignaling:VideoDescription' :: VideoDescription -> Maybe AfdSignaling
$sel:height:VideoDescription' :: VideoDescription -> Maybe Natural
$sel:timecodeInsertion:VideoDescription' :: VideoDescription -> Maybe VideoTimecodeInsertion
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"timecodeInsertion" Text -> VideoTimecodeInsertion -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (VideoTimecodeInsertion -> Pair)
-> Maybe VideoTimecodeInsertion -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VideoTimecodeInsertion
timecodeInsertion,
            (Text
"height" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
height,
            (Text
"afdSignaling" Text -> AfdSignaling -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AfdSignaling -> Pair) -> Maybe AfdSignaling -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AfdSignaling
afdSignaling,
            (Text
"sharpness" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
sharpness,
            (Text
"crop" Text -> Rectangle -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Rectangle -> Pair) -> Maybe Rectangle -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Rectangle
crop,
            (Text
"width" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
width,
            (Text
"scalingBehavior" Text -> ScalingBehavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ScalingBehavior -> Pair) -> Maybe ScalingBehavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScalingBehavior
scalingBehavior,
            (Text
"respondToAfd" Text -> RespondToAfd -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RespondToAfd -> Pair) -> Maybe RespondToAfd -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RespondToAfd
respondToAfd,
            (Text
"dropFrameTimecode" Text -> DropFrameTimecode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DropFrameTimecode -> Pair)
-> Maybe DropFrameTimecode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DropFrameTimecode
dropFrameTimecode,
            (Text
"antiAlias" Text -> AntiAlias -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AntiAlias -> Pair) -> Maybe AntiAlias -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AntiAlias
antiAlias,
            (Text
"fixedAfd" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
fixedAfd,
            (Text
"colorMetadata" Text -> ColorMetadata -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ColorMetadata -> Pair) -> Maybe ColorMetadata -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ColorMetadata
colorMetadata,
            (Text
"codecSettings" Text -> VideoCodecSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VideoCodecSettings -> Pair)
-> Maybe VideoCodecSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VideoCodecSettings
codecSettings,
            (Text
"videoPreprocessors" Text -> VideoPreprocessor -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (VideoPreprocessor -> Pair)
-> Maybe VideoPreprocessor -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VideoPreprocessor
videoPreprocessors,
            (Text
"position" Text -> Rectangle -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Rectangle -> Pair) -> Maybe Rectangle -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Rectangle
position
          ]
      )