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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.Vp9FramerateControl
import Amazonka.MediaConvert.Types.Vp9FramerateConversionAlgorithm
import Amazonka.MediaConvert.Types.Vp9ParControl
import Amazonka.MediaConvert.Types.Vp9QualityTuningLevel
import Amazonka.MediaConvert.Types.Vp9RateControlMode
import qualified Amazonka.Prelude as Prelude

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value VP9.
--
-- /See:/ 'newVp9Settings' smart constructor.
data Vp9Settings = Vp9Settings'
  { -- | Optional. Use Quality tuning level (qualityTuningLevel) to choose how
    -- you want to trade off encoding speed for output video quality. The
    -- default behavior is faster, lower quality, multi-pass encoding.
    Vp9Settings -> Maybe Vp9QualityTuningLevel
qualityTuningLevel :: Prelude.Maybe Vp9QualityTuningLevel,
    -- | Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
    -- the console, this corresponds to any value other than Follow source.
    -- When you specify an output pixel aspect ratio (PAR) that is different
    -- from your input video PAR, provide your output PAR as a ratio. For
    -- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
    -- In this example, the value for parNumerator is 40.
    Vp9Settings -> Maybe Natural
parNumerator :: Prelude.Maybe Prelude.Natural,
    -- | GOP Length (keyframe interval) in frames. Must be greater than zero.
    Vp9Settings -> Maybe Double
gopSize :: Prelude.Maybe Prelude.Double,
    -- | Size of buffer (HRD buffer model) in bits. For example, enter five
    -- megabits as 5000000.
    Vp9Settings -> Maybe Natural
hrdBufferSize :: Prelude.Maybe Prelude.Natural,
    -- | With the VP9 codec, you can use only the variable bitrate (VBR) rate
    -- control mode.
    Vp9Settings -> Maybe Vp9RateControlMode
rateControlMode :: Prelude.Maybe Vp9RateControlMode,
    -- | Optional. Specify how the service determines the pixel aspect ratio for
    -- this output. The default behavior is to use the same pixel aspect ratio
    -- as your input video.
    Vp9Settings -> Maybe Vp9ParControl
parControl :: Prelude.Maybe Vp9ParControl,
    -- | Target bitrate in bits\/second. For example, enter five megabits per
    -- second as 5000000.
    Vp9Settings -> Maybe Natural
bitrate :: Prelude.Maybe Prelude.Natural,
    -- | When you use the API for transcode jobs that use frame rate conversion,
    -- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
    -- 23.976 fps. Use FramerateDenominator to specify the denominator of this
    -- fraction. In this example, use 1001 for the value of
    -- FramerateDenominator. When you use the console for transcode jobs that
    -- use frame rate conversion, provide the value as a decimal number for
    -- Framerate. In this example, specify 23.976.
    Vp9Settings -> Maybe Natural
framerateDenominator :: Prelude.Maybe Prelude.Natural,
    -- | Choose the method that you want MediaConvert to use when increasing or
    -- decreasing the frame rate. We recommend using drop duplicate
    -- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
    -- 30 fps. For numerically complex conversions, you can use interpolate
    -- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
    -- might introduce undesirable video artifacts. For complex frame rate
    -- conversions, especially if your source video has already been converted
    -- from its original cadence, use FrameFormer (FRAMEFORMER) to do
    -- motion-compensated interpolation. FrameFormer chooses the best
    -- conversion method frame by frame. Note that using FrameFormer increases
    -- the transcoding time and incurs a significant add-on cost.
    Vp9Settings -> Maybe Vp9FramerateConversionAlgorithm
framerateConversionAlgorithm :: Prelude.Maybe Vp9FramerateConversionAlgorithm,
    -- | If you are using the console, use the Framerate setting to specify the
    -- frame rate for this output. If you want to keep the same frame rate as
    -- the input video, choose Follow source. If you want to do frame rate
    -- conversion, choose a frame rate from the dropdown list or choose Custom.
    -- The framerates shown in the dropdown list are decimal approximations of
    -- fractions. If you choose Custom, specify your frame rate as a fraction.
    -- If you are creating your transcoding job specification as a JSON file
    -- without the console, use FramerateControl to specify which value the
    -- service uses for the frame rate for this output. Choose
    -- INITIALIZE_FROM_SOURCE if you want the service to use the frame rate
    -- from the input. Choose SPECIFIED if you want the service to use the
    -- frame rate you specify in the settings FramerateNumerator and
    -- FramerateDenominator.
    Vp9Settings -> Maybe Vp9FramerateControl
framerateControl :: Prelude.Maybe Vp9FramerateControl,
    -- | When you use the API for transcode jobs that use frame rate conversion,
    -- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
    -- 23.976 fps. Use FramerateNumerator to specify the numerator of this
    -- fraction. In this example, use 24000 for the value of
    -- FramerateNumerator. When you use the console for transcode jobs that use
    -- frame rate conversion, provide the value as a decimal number for
    -- Framerate. In this example, specify 23.976.
    Vp9Settings -> Maybe Natural
framerateNumerator :: Prelude.Maybe Prelude.Natural,
    -- | Ignore this setting unless you set qualityTuningLevel to MULTI_PASS.
    -- Optional. Specify the maximum bitrate in bits\/second. For example,
    -- enter five megabits per second as 5000000. The default behavior uses
    -- twice the target bitrate as the maximum bitrate.
    Vp9Settings -> Maybe Natural
maxBitrate :: Prelude.Maybe Prelude.Natural,
    -- | Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
    -- the console, this corresponds to any value other than Follow source.
    -- When you specify an output pixel aspect ratio (PAR) that is different
    -- from your input video PAR, provide your output PAR as a ratio. For
    -- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
    -- In this example, the value for parDenominator is 33.
    Vp9Settings -> Maybe Natural
parDenominator :: Prelude.Maybe Prelude.Natural
  }
  deriving (Vp9Settings -> Vp9Settings -> Bool
(Vp9Settings -> Vp9Settings -> Bool)
-> (Vp9Settings -> Vp9Settings -> Bool) -> Eq Vp9Settings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Vp9Settings -> Vp9Settings -> Bool
$c/= :: Vp9Settings -> Vp9Settings -> Bool
== :: Vp9Settings -> Vp9Settings -> Bool
$c== :: Vp9Settings -> Vp9Settings -> Bool
Prelude.Eq, ReadPrec [Vp9Settings]
ReadPrec Vp9Settings
Int -> ReadS Vp9Settings
ReadS [Vp9Settings]
(Int -> ReadS Vp9Settings)
-> ReadS [Vp9Settings]
-> ReadPrec Vp9Settings
-> ReadPrec [Vp9Settings]
-> Read Vp9Settings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Vp9Settings]
$creadListPrec :: ReadPrec [Vp9Settings]
readPrec :: ReadPrec Vp9Settings
$creadPrec :: ReadPrec Vp9Settings
readList :: ReadS [Vp9Settings]
$creadList :: ReadS [Vp9Settings]
readsPrec :: Int -> ReadS Vp9Settings
$creadsPrec :: Int -> ReadS Vp9Settings
Prelude.Read, Int -> Vp9Settings -> ShowS
[Vp9Settings] -> ShowS
Vp9Settings -> String
(Int -> Vp9Settings -> ShowS)
-> (Vp9Settings -> String)
-> ([Vp9Settings] -> ShowS)
-> Show Vp9Settings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Vp9Settings] -> ShowS
$cshowList :: [Vp9Settings] -> ShowS
show :: Vp9Settings -> String
$cshow :: Vp9Settings -> String
showsPrec :: Int -> Vp9Settings -> ShowS
$cshowsPrec :: Int -> Vp9Settings -> ShowS
Prelude.Show, (forall x. Vp9Settings -> Rep Vp9Settings x)
-> (forall x. Rep Vp9Settings x -> Vp9Settings)
-> Generic Vp9Settings
forall x. Rep Vp9Settings x -> Vp9Settings
forall x. Vp9Settings -> Rep Vp9Settings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Vp9Settings x -> Vp9Settings
$cfrom :: forall x. Vp9Settings -> Rep Vp9Settings x
Prelude.Generic)

-- |
-- Create a value of 'Vp9Settings' 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:
--
-- 'qualityTuningLevel', 'vp9Settings_qualityTuningLevel' - Optional. Use Quality tuning level (qualityTuningLevel) to choose how
-- you want to trade off encoding speed for output video quality. The
-- default behavior is faster, lower quality, multi-pass encoding.
--
-- 'parNumerator', 'vp9Settings_parNumerator' - Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
-- the console, this corresponds to any value other than Follow source.
-- When you specify an output pixel aspect ratio (PAR) that is different
-- from your input video PAR, provide your output PAR as a ratio. For
-- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
-- In this example, the value for parNumerator is 40.
--
-- 'gopSize', 'vp9Settings_gopSize' - GOP Length (keyframe interval) in frames. Must be greater than zero.
--
-- 'hrdBufferSize', 'vp9Settings_hrdBufferSize' - Size of buffer (HRD buffer model) in bits. For example, enter five
-- megabits as 5000000.
--
-- 'rateControlMode', 'vp9Settings_rateControlMode' - With the VP9 codec, you can use only the variable bitrate (VBR) rate
-- control mode.
--
-- 'parControl', 'vp9Settings_parControl' - Optional. Specify how the service determines the pixel aspect ratio for
-- this output. The default behavior is to use the same pixel aspect ratio
-- as your input video.
--
-- 'bitrate', 'vp9Settings_bitrate' - Target bitrate in bits\/second. For example, enter five megabits per
-- second as 5000000.
--
-- 'framerateDenominator', 'vp9Settings_framerateDenominator' - When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateDenominator to specify the denominator of this
-- fraction. In this example, use 1001 for the value of
-- FramerateDenominator. When you use the console for transcode jobs that
-- use frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
--
-- 'framerateConversionAlgorithm', 'vp9Settings_framerateConversionAlgorithm' - Choose the method that you want MediaConvert to use when increasing or
-- decreasing the frame rate. We recommend using drop duplicate
-- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
-- 30 fps. For numerically complex conversions, you can use interpolate
-- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
-- might introduce undesirable video artifacts. For complex frame rate
-- conversions, especially if your source video has already been converted
-- from its original cadence, use FrameFormer (FRAMEFORMER) to do
-- motion-compensated interpolation. FrameFormer chooses the best
-- conversion method frame by frame. Note that using FrameFormer increases
-- the transcoding time and incurs a significant add-on cost.
--
-- 'framerateControl', 'vp9Settings_framerateControl' - If you are using the console, use the Framerate setting to specify the
-- frame rate for this output. If you want to keep the same frame rate as
-- the input video, choose Follow source. If you want to do frame rate
-- conversion, choose a frame rate from the dropdown list or choose Custom.
-- The framerates shown in the dropdown list are decimal approximations of
-- fractions. If you choose Custom, specify your frame rate as a fraction.
-- If you are creating your transcoding job specification as a JSON file
-- without the console, use FramerateControl to specify which value the
-- service uses for the frame rate for this output. Choose
-- INITIALIZE_FROM_SOURCE if you want the service to use the frame rate
-- from the input. Choose SPECIFIED if you want the service to use the
-- frame rate you specify in the settings FramerateNumerator and
-- FramerateDenominator.
--
-- 'framerateNumerator', 'vp9Settings_framerateNumerator' - When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateNumerator to specify the numerator of this
-- fraction. In this example, use 24000 for the value of
-- FramerateNumerator. When you use the console for transcode jobs that use
-- frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
--
-- 'maxBitrate', 'vp9Settings_maxBitrate' - Ignore this setting unless you set qualityTuningLevel to MULTI_PASS.
-- Optional. Specify the maximum bitrate in bits\/second. For example,
-- enter five megabits per second as 5000000. The default behavior uses
-- twice the target bitrate as the maximum bitrate.
--
-- 'parDenominator', 'vp9Settings_parDenominator' - Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
-- the console, this corresponds to any value other than Follow source.
-- When you specify an output pixel aspect ratio (PAR) that is different
-- from your input video PAR, provide your output PAR as a ratio. For
-- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
-- In this example, the value for parDenominator is 33.
newVp9Settings ::
  Vp9Settings
newVp9Settings :: Vp9Settings
newVp9Settings =
  Vp9Settings' :: Maybe Vp9QualityTuningLevel
-> Maybe Natural
-> Maybe Double
-> Maybe Natural
-> Maybe Vp9RateControlMode
-> Maybe Vp9ParControl
-> Maybe Natural
-> Maybe Natural
-> Maybe Vp9FramerateConversionAlgorithm
-> Maybe Vp9FramerateControl
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Vp9Settings
Vp9Settings'
    { $sel:qualityTuningLevel:Vp9Settings' :: Maybe Vp9QualityTuningLevel
qualityTuningLevel = Maybe Vp9QualityTuningLevel
forall a. Maybe a
Prelude.Nothing,
      $sel:parNumerator:Vp9Settings' :: Maybe Natural
parNumerator = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:gopSize:Vp9Settings' :: Maybe Double
gopSize = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:hrdBufferSize:Vp9Settings' :: Maybe Natural
hrdBufferSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:rateControlMode:Vp9Settings' :: Maybe Vp9RateControlMode
rateControlMode = Maybe Vp9RateControlMode
forall a. Maybe a
Prelude.Nothing,
      $sel:parControl:Vp9Settings' :: Maybe Vp9ParControl
parControl = Maybe Vp9ParControl
forall a. Maybe a
Prelude.Nothing,
      $sel:bitrate:Vp9Settings' :: Maybe Natural
bitrate = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateDenominator:Vp9Settings' :: Maybe Natural
framerateDenominator = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateConversionAlgorithm:Vp9Settings' :: Maybe Vp9FramerateConversionAlgorithm
framerateConversionAlgorithm = Maybe Vp9FramerateConversionAlgorithm
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateControl:Vp9Settings' :: Maybe Vp9FramerateControl
framerateControl = Maybe Vp9FramerateControl
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateNumerator:Vp9Settings' :: Maybe Natural
framerateNumerator = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:maxBitrate:Vp9Settings' :: Maybe Natural
maxBitrate = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:parDenominator:Vp9Settings' :: Maybe Natural
parDenominator = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Optional. Use Quality tuning level (qualityTuningLevel) to choose how
-- you want to trade off encoding speed for output video quality. The
-- default behavior is faster, lower quality, multi-pass encoding.
vp9Settings_qualityTuningLevel :: Lens.Lens' Vp9Settings (Prelude.Maybe Vp9QualityTuningLevel)
vp9Settings_qualityTuningLevel :: (Maybe Vp9QualityTuningLevel -> f (Maybe Vp9QualityTuningLevel))
-> Vp9Settings -> f Vp9Settings
vp9Settings_qualityTuningLevel = (Vp9Settings -> Maybe Vp9QualityTuningLevel)
-> (Vp9Settings -> Maybe Vp9QualityTuningLevel -> Vp9Settings)
-> Lens
     Vp9Settings
     Vp9Settings
     (Maybe Vp9QualityTuningLevel)
     (Maybe Vp9QualityTuningLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Vp9QualityTuningLevel
qualityTuningLevel :: Maybe Vp9QualityTuningLevel
$sel:qualityTuningLevel:Vp9Settings' :: Vp9Settings -> Maybe Vp9QualityTuningLevel
qualityTuningLevel} -> Maybe Vp9QualityTuningLevel
qualityTuningLevel) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Vp9QualityTuningLevel
a -> Vp9Settings
s {$sel:qualityTuningLevel:Vp9Settings' :: Maybe Vp9QualityTuningLevel
qualityTuningLevel = Maybe Vp9QualityTuningLevel
a} :: Vp9Settings)

-- | Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
-- the console, this corresponds to any value other than Follow source.
-- When you specify an output pixel aspect ratio (PAR) that is different
-- from your input video PAR, provide your output PAR as a ratio. For
-- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
-- In this example, the value for parNumerator is 40.
vp9Settings_parNumerator :: Lens.Lens' Vp9Settings (Prelude.Maybe Prelude.Natural)
vp9Settings_parNumerator :: (Maybe Natural -> f (Maybe Natural))
-> Vp9Settings -> f Vp9Settings
vp9Settings_parNumerator = (Vp9Settings -> Maybe Natural)
-> (Vp9Settings -> Maybe Natural -> Vp9Settings)
-> Lens Vp9Settings Vp9Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Natural
parNumerator :: Maybe Natural
$sel:parNumerator:Vp9Settings' :: Vp9Settings -> Maybe Natural
parNumerator} -> Maybe Natural
parNumerator) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Natural
a -> Vp9Settings
s {$sel:parNumerator:Vp9Settings' :: Maybe Natural
parNumerator = Maybe Natural
a} :: Vp9Settings)

-- | GOP Length (keyframe interval) in frames. Must be greater than zero.
vp9Settings_gopSize :: Lens.Lens' Vp9Settings (Prelude.Maybe Prelude.Double)
vp9Settings_gopSize :: (Maybe Double -> f (Maybe Double)) -> Vp9Settings -> f Vp9Settings
vp9Settings_gopSize = (Vp9Settings -> Maybe Double)
-> (Vp9Settings -> Maybe Double -> Vp9Settings)
-> Lens Vp9Settings Vp9Settings (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Double
gopSize :: Maybe Double
$sel:gopSize:Vp9Settings' :: Vp9Settings -> Maybe Double
gopSize} -> Maybe Double
gopSize) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Double
a -> Vp9Settings
s {$sel:gopSize:Vp9Settings' :: Maybe Double
gopSize = Maybe Double
a} :: Vp9Settings)

-- | Size of buffer (HRD buffer model) in bits. For example, enter five
-- megabits as 5000000.
vp9Settings_hrdBufferSize :: Lens.Lens' Vp9Settings (Prelude.Maybe Prelude.Natural)
vp9Settings_hrdBufferSize :: (Maybe Natural -> f (Maybe Natural))
-> Vp9Settings -> f Vp9Settings
vp9Settings_hrdBufferSize = (Vp9Settings -> Maybe Natural)
-> (Vp9Settings -> Maybe Natural -> Vp9Settings)
-> Lens Vp9Settings Vp9Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Natural
hrdBufferSize :: Maybe Natural
$sel:hrdBufferSize:Vp9Settings' :: Vp9Settings -> Maybe Natural
hrdBufferSize} -> Maybe Natural
hrdBufferSize) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Natural
a -> Vp9Settings
s {$sel:hrdBufferSize:Vp9Settings' :: Maybe Natural
hrdBufferSize = Maybe Natural
a} :: Vp9Settings)

-- | With the VP9 codec, you can use only the variable bitrate (VBR) rate
-- control mode.
vp9Settings_rateControlMode :: Lens.Lens' Vp9Settings (Prelude.Maybe Vp9RateControlMode)
vp9Settings_rateControlMode :: (Maybe Vp9RateControlMode -> f (Maybe Vp9RateControlMode))
-> Vp9Settings -> f Vp9Settings
vp9Settings_rateControlMode = (Vp9Settings -> Maybe Vp9RateControlMode)
-> (Vp9Settings -> Maybe Vp9RateControlMode -> Vp9Settings)
-> Lens
     Vp9Settings
     Vp9Settings
     (Maybe Vp9RateControlMode)
     (Maybe Vp9RateControlMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Vp9RateControlMode
rateControlMode :: Maybe Vp9RateControlMode
$sel:rateControlMode:Vp9Settings' :: Vp9Settings -> Maybe Vp9RateControlMode
rateControlMode} -> Maybe Vp9RateControlMode
rateControlMode) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Vp9RateControlMode
a -> Vp9Settings
s {$sel:rateControlMode:Vp9Settings' :: Maybe Vp9RateControlMode
rateControlMode = Maybe Vp9RateControlMode
a} :: Vp9Settings)

-- | Optional. Specify how the service determines the pixel aspect ratio for
-- this output. The default behavior is to use the same pixel aspect ratio
-- as your input video.
vp9Settings_parControl :: Lens.Lens' Vp9Settings (Prelude.Maybe Vp9ParControl)
vp9Settings_parControl :: (Maybe Vp9ParControl -> f (Maybe Vp9ParControl))
-> Vp9Settings -> f Vp9Settings
vp9Settings_parControl = (Vp9Settings -> Maybe Vp9ParControl)
-> (Vp9Settings -> Maybe Vp9ParControl -> Vp9Settings)
-> Lens
     Vp9Settings Vp9Settings (Maybe Vp9ParControl) (Maybe Vp9ParControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Vp9ParControl
parControl :: Maybe Vp9ParControl
$sel:parControl:Vp9Settings' :: Vp9Settings -> Maybe Vp9ParControl
parControl} -> Maybe Vp9ParControl
parControl) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Vp9ParControl
a -> Vp9Settings
s {$sel:parControl:Vp9Settings' :: Maybe Vp9ParControl
parControl = Maybe Vp9ParControl
a} :: Vp9Settings)

-- | Target bitrate in bits\/second. For example, enter five megabits per
-- second as 5000000.
vp9Settings_bitrate :: Lens.Lens' Vp9Settings (Prelude.Maybe Prelude.Natural)
vp9Settings_bitrate :: (Maybe Natural -> f (Maybe Natural))
-> Vp9Settings -> f Vp9Settings
vp9Settings_bitrate = (Vp9Settings -> Maybe Natural)
-> (Vp9Settings -> Maybe Natural -> Vp9Settings)
-> Lens Vp9Settings Vp9Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Natural
bitrate :: Maybe Natural
$sel:bitrate:Vp9Settings' :: Vp9Settings -> Maybe Natural
bitrate} -> Maybe Natural
bitrate) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Natural
a -> Vp9Settings
s {$sel:bitrate:Vp9Settings' :: Maybe Natural
bitrate = Maybe Natural
a} :: Vp9Settings)

-- | When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateDenominator to specify the denominator of this
-- fraction. In this example, use 1001 for the value of
-- FramerateDenominator. When you use the console for transcode jobs that
-- use frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
vp9Settings_framerateDenominator :: Lens.Lens' Vp9Settings (Prelude.Maybe Prelude.Natural)
vp9Settings_framerateDenominator :: (Maybe Natural -> f (Maybe Natural))
-> Vp9Settings -> f Vp9Settings
vp9Settings_framerateDenominator = (Vp9Settings -> Maybe Natural)
-> (Vp9Settings -> Maybe Natural -> Vp9Settings)
-> Lens Vp9Settings Vp9Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Natural
framerateDenominator :: Maybe Natural
$sel:framerateDenominator:Vp9Settings' :: Vp9Settings -> Maybe Natural
framerateDenominator} -> Maybe Natural
framerateDenominator) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Natural
a -> Vp9Settings
s {$sel:framerateDenominator:Vp9Settings' :: Maybe Natural
framerateDenominator = Maybe Natural
a} :: Vp9Settings)

-- | Choose the method that you want MediaConvert to use when increasing or
-- decreasing the frame rate. We recommend using drop duplicate
-- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
-- 30 fps. For numerically complex conversions, you can use interpolate
-- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
-- might introduce undesirable video artifacts. For complex frame rate
-- conversions, especially if your source video has already been converted
-- from its original cadence, use FrameFormer (FRAMEFORMER) to do
-- motion-compensated interpolation. FrameFormer chooses the best
-- conversion method frame by frame. Note that using FrameFormer increases
-- the transcoding time and incurs a significant add-on cost.
vp9Settings_framerateConversionAlgorithm :: Lens.Lens' Vp9Settings (Prelude.Maybe Vp9FramerateConversionAlgorithm)
vp9Settings_framerateConversionAlgorithm :: (Maybe Vp9FramerateConversionAlgorithm
 -> f (Maybe Vp9FramerateConversionAlgorithm))
-> Vp9Settings -> f Vp9Settings
vp9Settings_framerateConversionAlgorithm = (Vp9Settings -> Maybe Vp9FramerateConversionAlgorithm)
-> (Vp9Settings
    -> Maybe Vp9FramerateConversionAlgorithm -> Vp9Settings)
-> Lens
     Vp9Settings
     Vp9Settings
     (Maybe Vp9FramerateConversionAlgorithm)
     (Maybe Vp9FramerateConversionAlgorithm)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Vp9FramerateConversionAlgorithm
framerateConversionAlgorithm :: Maybe Vp9FramerateConversionAlgorithm
$sel:framerateConversionAlgorithm:Vp9Settings' :: Vp9Settings -> Maybe Vp9FramerateConversionAlgorithm
framerateConversionAlgorithm} -> Maybe Vp9FramerateConversionAlgorithm
framerateConversionAlgorithm) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Vp9FramerateConversionAlgorithm
a -> Vp9Settings
s {$sel:framerateConversionAlgorithm:Vp9Settings' :: Maybe Vp9FramerateConversionAlgorithm
framerateConversionAlgorithm = Maybe Vp9FramerateConversionAlgorithm
a} :: Vp9Settings)

-- | If you are using the console, use the Framerate setting to specify the
-- frame rate for this output. If you want to keep the same frame rate as
-- the input video, choose Follow source. If you want to do frame rate
-- conversion, choose a frame rate from the dropdown list or choose Custom.
-- The framerates shown in the dropdown list are decimal approximations of
-- fractions. If you choose Custom, specify your frame rate as a fraction.
-- If you are creating your transcoding job specification as a JSON file
-- without the console, use FramerateControl to specify which value the
-- service uses for the frame rate for this output. Choose
-- INITIALIZE_FROM_SOURCE if you want the service to use the frame rate
-- from the input. Choose SPECIFIED if you want the service to use the
-- frame rate you specify in the settings FramerateNumerator and
-- FramerateDenominator.
vp9Settings_framerateControl :: Lens.Lens' Vp9Settings (Prelude.Maybe Vp9FramerateControl)
vp9Settings_framerateControl :: (Maybe Vp9FramerateControl -> f (Maybe Vp9FramerateControl))
-> Vp9Settings -> f Vp9Settings
vp9Settings_framerateControl = (Vp9Settings -> Maybe Vp9FramerateControl)
-> (Vp9Settings -> Maybe Vp9FramerateControl -> Vp9Settings)
-> Lens
     Vp9Settings
     Vp9Settings
     (Maybe Vp9FramerateControl)
     (Maybe Vp9FramerateControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Vp9FramerateControl
framerateControl :: Maybe Vp9FramerateControl
$sel:framerateControl:Vp9Settings' :: Vp9Settings -> Maybe Vp9FramerateControl
framerateControl} -> Maybe Vp9FramerateControl
framerateControl) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Vp9FramerateControl
a -> Vp9Settings
s {$sel:framerateControl:Vp9Settings' :: Maybe Vp9FramerateControl
framerateControl = Maybe Vp9FramerateControl
a} :: Vp9Settings)

-- | When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateNumerator to specify the numerator of this
-- fraction. In this example, use 24000 for the value of
-- FramerateNumerator. When you use the console for transcode jobs that use
-- frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
vp9Settings_framerateNumerator :: Lens.Lens' Vp9Settings (Prelude.Maybe Prelude.Natural)
vp9Settings_framerateNumerator :: (Maybe Natural -> f (Maybe Natural))
-> Vp9Settings -> f Vp9Settings
vp9Settings_framerateNumerator = (Vp9Settings -> Maybe Natural)
-> (Vp9Settings -> Maybe Natural -> Vp9Settings)
-> Lens Vp9Settings Vp9Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Natural
framerateNumerator :: Maybe Natural
$sel:framerateNumerator:Vp9Settings' :: Vp9Settings -> Maybe Natural
framerateNumerator} -> Maybe Natural
framerateNumerator) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Natural
a -> Vp9Settings
s {$sel:framerateNumerator:Vp9Settings' :: Maybe Natural
framerateNumerator = Maybe Natural
a} :: Vp9Settings)

-- | Ignore this setting unless you set qualityTuningLevel to MULTI_PASS.
-- Optional. Specify the maximum bitrate in bits\/second. For example,
-- enter five megabits per second as 5000000. The default behavior uses
-- twice the target bitrate as the maximum bitrate.
vp9Settings_maxBitrate :: Lens.Lens' Vp9Settings (Prelude.Maybe Prelude.Natural)
vp9Settings_maxBitrate :: (Maybe Natural -> f (Maybe Natural))
-> Vp9Settings -> f Vp9Settings
vp9Settings_maxBitrate = (Vp9Settings -> Maybe Natural)
-> (Vp9Settings -> Maybe Natural -> Vp9Settings)
-> Lens Vp9Settings Vp9Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Natural
maxBitrate :: Maybe Natural
$sel:maxBitrate:Vp9Settings' :: Vp9Settings -> Maybe Natural
maxBitrate} -> Maybe Natural
maxBitrate) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Natural
a -> Vp9Settings
s {$sel:maxBitrate:Vp9Settings' :: Maybe Natural
maxBitrate = Maybe Natural
a} :: Vp9Settings)

-- | Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On
-- the console, this corresponds to any value other than Follow source.
-- When you specify an output pixel aspect ratio (PAR) that is different
-- from your input video PAR, provide your output PAR as a ratio. For
-- example, for D1\/DV NTSC widescreen, you would specify the ratio 40:33.
-- In this example, the value for parDenominator is 33.
vp9Settings_parDenominator :: Lens.Lens' Vp9Settings (Prelude.Maybe Prelude.Natural)
vp9Settings_parDenominator :: (Maybe Natural -> f (Maybe Natural))
-> Vp9Settings -> f Vp9Settings
vp9Settings_parDenominator = (Vp9Settings -> Maybe Natural)
-> (Vp9Settings -> Maybe Natural -> Vp9Settings)
-> Lens Vp9Settings Vp9Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Vp9Settings' {Maybe Natural
parDenominator :: Maybe Natural
$sel:parDenominator:Vp9Settings' :: Vp9Settings -> Maybe Natural
parDenominator} -> Maybe Natural
parDenominator) (\s :: Vp9Settings
s@Vp9Settings' {} Maybe Natural
a -> Vp9Settings
s {$sel:parDenominator:Vp9Settings' :: Maybe Natural
parDenominator = Maybe Natural
a} :: Vp9Settings)

instance Core.FromJSON Vp9Settings where
  parseJSON :: Value -> Parser Vp9Settings
parseJSON =
    String
-> (Object -> Parser Vp9Settings) -> Value -> Parser Vp9Settings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Vp9Settings"
      ( \Object
x ->
          Maybe Vp9QualityTuningLevel
-> Maybe Natural
-> Maybe Double
-> Maybe Natural
-> Maybe Vp9RateControlMode
-> Maybe Vp9ParControl
-> Maybe Natural
-> Maybe Natural
-> Maybe Vp9FramerateConversionAlgorithm
-> Maybe Vp9FramerateControl
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Vp9Settings
Vp9Settings'
            (Maybe Vp9QualityTuningLevel
 -> Maybe Natural
 -> Maybe Double
 -> Maybe Natural
 -> Maybe Vp9RateControlMode
 -> Maybe Vp9ParControl
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Vp9FramerateConversionAlgorithm
 -> Maybe Vp9FramerateControl
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Natural
 -> Vp9Settings)
-> Parser (Maybe Vp9QualityTuningLevel)
-> Parser
     (Maybe Natural
      -> Maybe Double
      -> Maybe Natural
      -> Maybe Vp9RateControlMode
      -> Maybe Vp9ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp9FramerateConversionAlgorithm
      -> Maybe Vp9FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp9Settings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Vp9QualityTuningLevel)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"qualityTuningLevel")
            Parser
  (Maybe Natural
   -> Maybe Double
   -> Maybe Natural
   -> Maybe Vp9RateControlMode
   -> Maybe Vp9ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp9FramerateConversionAlgorithm
   -> Maybe Vp9FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp9Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Double
      -> Maybe Natural
      -> Maybe Vp9RateControlMode
      -> Maybe Vp9ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp9FramerateConversionAlgorithm
      -> Maybe Vp9FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp9Settings)
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
"parNumerator")
            Parser
  (Maybe Double
   -> Maybe Natural
   -> Maybe Vp9RateControlMode
   -> Maybe Vp9ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp9FramerateConversionAlgorithm
   -> Maybe Vp9FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp9Settings)
-> Parser (Maybe Double)
-> Parser
     (Maybe Natural
      -> Maybe Vp9RateControlMode
      -> Maybe Vp9ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp9FramerateConversionAlgorithm
      -> Maybe Vp9FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp9Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"gopSize")
            Parser
  (Maybe Natural
   -> Maybe Vp9RateControlMode
   -> Maybe Vp9ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp9FramerateConversionAlgorithm
   -> Maybe Vp9FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp9Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Vp9RateControlMode
      -> Maybe Vp9ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp9FramerateConversionAlgorithm
      -> Maybe Vp9FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp9Settings)
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
"hrdBufferSize")
            Parser
  (Maybe Vp9RateControlMode
   -> Maybe Vp9ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp9FramerateConversionAlgorithm
   -> Maybe Vp9FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp9Settings)
-> Parser (Maybe Vp9RateControlMode)
-> Parser
     (Maybe Vp9ParControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Vp9FramerateConversionAlgorithm
      -> Maybe Vp9FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp9Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Vp9RateControlMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rateControlMode")
            Parser
  (Maybe Vp9ParControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Vp9FramerateConversionAlgorithm
   -> Maybe Vp9FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp9Settings)
-> Parser (Maybe Vp9ParControl)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Vp9FramerateConversionAlgorithm
      -> Maybe Vp9FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp9Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Vp9ParControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"parControl")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Vp9FramerateConversionAlgorithm
   -> Maybe Vp9FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp9Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Vp9FramerateConversionAlgorithm
      -> Maybe Vp9FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp9Settings)
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
"bitrate")
            Parser
  (Maybe Natural
   -> Maybe Vp9FramerateConversionAlgorithm
   -> Maybe Vp9FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp9Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Vp9FramerateConversionAlgorithm
      -> Maybe Vp9FramerateControl
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Vp9Settings)
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
"framerateDenominator")
            Parser
  (Maybe Vp9FramerateConversionAlgorithm
   -> Maybe Vp9FramerateControl
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Vp9Settings)
-> Parser (Maybe Vp9FramerateConversionAlgorithm)
-> Parser
     (Maybe Vp9FramerateControl
      -> Maybe Natural -> Maybe Natural -> Maybe Natural -> Vp9Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Vp9FramerateConversionAlgorithm)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerateConversionAlgorithm")
            Parser
  (Maybe Vp9FramerateControl
   -> Maybe Natural -> Maybe Natural -> Maybe Natural -> Vp9Settings)
-> Parser (Maybe Vp9FramerateControl)
-> Parser
     (Maybe Natural -> Maybe Natural -> Maybe Natural -> Vp9Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Vp9FramerateControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerateControl")
            Parser
  (Maybe Natural -> Maybe Natural -> Maybe Natural -> Vp9Settings)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> Maybe Natural -> Vp9Settings)
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
"framerateNumerator")
            Parser (Maybe Natural -> Maybe Natural -> Vp9Settings)
-> Parser (Maybe Natural) -> Parser (Maybe Natural -> Vp9Settings)
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
"maxBitrate")
            Parser (Maybe Natural -> Vp9Settings)
-> Parser (Maybe Natural) -> Parser Vp9Settings
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
"parDenominator")
      )

instance Prelude.Hashable Vp9Settings

instance Prelude.NFData Vp9Settings

instance Core.ToJSON Vp9Settings where
  toJSON :: Vp9Settings -> Value
toJSON Vp9Settings' {Maybe Double
Maybe Natural
Maybe Vp9FramerateControl
Maybe Vp9FramerateConversionAlgorithm
Maybe Vp9ParControl
Maybe Vp9QualityTuningLevel
Maybe Vp9RateControlMode
parDenominator :: Maybe Natural
maxBitrate :: Maybe Natural
framerateNumerator :: Maybe Natural
framerateControl :: Maybe Vp9FramerateControl
framerateConversionAlgorithm :: Maybe Vp9FramerateConversionAlgorithm
framerateDenominator :: Maybe Natural
bitrate :: Maybe Natural
parControl :: Maybe Vp9ParControl
rateControlMode :: Maybe Vp9RateControlMode
hrdBufferSize :: Maybe Natural
gopSize :: Maybe Double
parNumerator :: Maybe Natural
qualityTuningLevel :: Maybe Vp9QualityTuningLevel
$sel:parDenominator:Vp9Settings' :: Vp9Settings -> Maybe Natural
$sel:maxBitrate:Vp9Settings' :: Vp9Settings -> Maybe Natural
$sel:framerateNumerator:Vp9Settings' :: Vp9Settings -> Maybe Natural
$sel:framerateControl:Vp9Settings' :: Vp9Settings -> Maybe Vp9FramerateControl
$sel:framerateConversionAlgorithm:Vp9Settings' :: Vp9Settings -> Maybe Vp9FramerateConversionAlgorithm
$sel:framerateDenominator:Vp9Settings' :: Vp9Settings -> Maybe Natural
$sel:bitrate:Vp9Settings' :: Vp9Settings -> Maybe Natural
$sel:parControl:Vp9Settings' :: Vp9Settings -> Maybe Vp9ParControl
$sel:rateControlMode:Vp9Settings' :: Vp9Settings -> Maybe Vp9RateControlMode
$sel:hrdBufferSize:Vp9Settings' :: Vp9Settings -> Maybe Natural
$sel:gopSize:Vp9Settings' :: Vp9Settings -> Maybe Double
$sel:parNumerator:Vp9Settings' :: Vp9Settings -> Maybe Natural
$sel:qualityTuningLevel:Vp9Settings' :: Vp9Settings -> Maybe Vp9QualityTuningLevel
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"qualityTuningLevel" Text -> Vp9QualityTuningLevel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Vp9QualityTuningLevel -> Pair)
-> Maybe Vp9QualityTuningLevel -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp9QualityTuningLevel
qualityTuningLevel,
            (Text
"parNumerator" 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
parNumerator,
            (Text
"gopSize" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
gopSize,
            (Text
"hrdBufferSize" 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
hrdBufferSize,
            (Text
"rateControlMode" Text -> Vp9RateControlMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Vp9RateControlMode -> Pair)
-> Maybe Vp9RateControlMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp9RateControlMode
rateControlMode,
            (Text
"parControl" Text -> Vp9ParControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Vp9ParControl -> Pair) -> Maybe Vp9ParControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp9ParControl
parControl,
            (Text
"bitrate" 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
bitrate,
            (Text
"framerateDenominator" 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
framerateDenominator,
            (Text
"framerateConversionAlgorithm" Text -> Vp9FramerateConversionAlgorithm -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Vp9FramerateConversionAlgorithm -> Pair)
-> Maybe Vp9FramerateConversionAlgorithm -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp9FramerateConversionAlgorithm
framerateConversionAlgorithm,
            (Text
"framerateControl" Text -> Vp9FramerateControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Vp9FramerateControl -> Pair)
-> Maybe Vp9FramerateControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp9FramerateControl
framerateControl,
            (Text
"framerateNumerator" 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
framerateNumerator,
            (Text
"maxBitrate" 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
maxBitrate,
            (Text
"parDenominator" 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
parDenominator
          ]
      )