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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.ColorCorrector
import Amazonka.MediaConvert.Types.Deinterlacer
import Amazonka.MediaConvert.Types.DolbyVision
import Amazonka.MediaConvert.Types.Hdr10Plus
import Amazonka.MediaConvert.Types.ImageInserter
import Amazonka.MediaConvert.Types.NoiseReducer
import Amazonka.MediaConvert.Types.PartnerWatermarking
import Amazonka.MediaConvert.Types.TimecodeBurnin
import qualified Amazonka.Prelude as Prelude

-- | Find additional transcoding features under Preprocessors
-- (VideoPreprocessors). Enable the features at each output individually.
-- These features are disabled by default.
--
-- /See:/ 'newVideoPreprocessor' smart constructor.
data VideoPreprocessor = VideoPreprocessor'
  { -- | Settings for burning the output timecode and specified prefix into the
    -- output.
    VideoPreprocessor -> Maybe TimecodeBurnin
timecodeBurnin :: Prelude.Maybe TimecodeBurnin,
    -- | Enable Dolby Vision feature to produce Dolby Vision compatible video
    -- output.
    VideoPreprocessor -> Maybe DolbyVision
dolbyVision :: Prelude.Maybe DolbyVision,
    -- | Use these settings to convert the color space or to modify properties
    -- such as hue and contrast for this output. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/converting-the-color-space.html.
    VideoPreprocessor -> Maybe ColorCorrector
colorCorrector :: Prelude.Maybe ColorCorrector,
    -- | Use the deinterlacer to produce smoother motion and a clearer picture.
    -- For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/working-with-scan-type.html.
    VideoPreprocessor -> Maybe Deinterlacer
deinterlacer :: Prelude.Maybe Deinterlacer,
    -- | Enable the Noise reducer (NoiseReducer) feature to remove noise from
    -- your video output if necessary. Enable or disable this feature for each
    -- output individually. This setting is disabled by default.
    VideoPreprocessor -> Maybe NoiseReducer
noiseReducer :: Prelude.Maybe NoiseReducer,
    -- | Enable the Image inserter (ImageInserter) feature to include a graphic
    -- overlay on your video. Enable or disable this feature for each output
    -- individually. This setting is disabled by default.
    VideoPreprocessor -> Maybe ImageInserter
imageInserter :: Prelude.Maybe ImageInserter,
    -- | Enable HDR10+ analyis and metadata injection. Compatible with HEVC only.
    VideoPreprocessor -> Maybe Hdr10Plus
hdr10Plus :: Prelude.Maybe Hdr10Plus,
    -- | If you work with a third party video watermarking partner, use the group
    -- of settings that correspond with your watermarking partner to include
    -- watermarks in your output.
    VideoPreprocessor -> Maybe PartnerWatermarking
partnerWatermarking :: Prelude.Maybe PartnerWatermarking
  }
  deriving (VideoPreprocessor -> VideoPreprocessor -> Bool
(VideoPreprocessor -> VideoPreprocessor -> Bool)
-> (VideoPreprocessor -> VideoPreprocessor -> Bool)
-> Eq VideoPreprocessor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoPreprocessor -> VideoPreprocessor -> Bool
$c/= :: VideoPreprocessor -> VideoPreprocessor -> Bool
== :: VideoPreprocessor -> VideoPreprocessor -> Bool
$c== :: VideoPreprocessor -> VideoPreprocessor -> Bool
Prelude.Eq, ReadPrec [VideoPreprocessor]
ReadPrec VideoPreprocessor
Int -> ReadS VideoPreprocessor
ReadS [VideoPreprocessor]
(Int -> ReadS VideoPreprocessor)
-> ReadS [VideoPreprocessor]
-> ReadPrec VideoPreprocessor
-> ReadPrec [VideoPreprocessor]
-> Read VideoPreprocessor
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VideoPreprocessor]
$creadListPrec :: ReadPrec [VideoPreprocessor]
readPrec :: ReadPrec VideoPreprocessor
$creadPrec :: ReadPrec VideoPreprocessor
readList :: ReadS [VideoPreprocessor]
$creadList :: ReadS [VideoPreprocessor]
readsPrec :: Int -> ReadS VideoPreprocessor
$creadsPrec :: Int -> ReadS VideoPreprocessor
Prelude.Read, Int -> VideoPreprocessor -> ShowS
[VideoPreprocessor] -> ShowS
VideoPreprocessor -> String
(Int -> VideoPreprocessor -> ShowS)
-> (VideoPreprocessor -> String)
-> ([VideoPreprocessor] -> ShowS)
-> Show VideoPreprocessor
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoPreprocessor] -> ShowS
$cshowList :: [VideoPreprocessor] -> ShowS
show :: VideoPreprocessor -> String
$cshow :: VideoPreprocessor -> String
showsPrec :: Int -> VideoPreprocessor -> ShowS
$cshowsPrec :: Int -> VideoPreprocessor -> ShowS
Prelude.Show, (forall x. VideoPreprocessor -> Rep VideoPreprocessor x)
-> (forall x. Rep VideoPreprocessor x -> VideoPreprocessor)
-> Generic VideoPreprocessor
forall x. Rep VideoPreprocessor x -> VideoPreprocessor
forall x. VideoPreprocessor -> Rep VideoPreprocessor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VideoPreprocessor x -> VideoPreprocessor
$cfrom :: forall x. VideoPreprocessor -> Rep VideoPreprocessor x
Prelude.Generic)

-- |
-- Create a value of 'VideoPreprocessor' 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:
--
-- 'timecodeBurnin', 'videoPreprocessor_timecodeBurnin' - Settings for burning the output timecode and specified prefix into the
-- output.
--
-- 'dolbyVision', 'videoPreprocessor_dolbyVision' - Enable Dolby Vision feature to produce Dolby Vision compatible video
-- output.
--
-- 'colorCorrector', 'videoPreprocessor_colorCorrector' - Use these settings to convert the color space or to modify properties
-- such as hue and contrast for this output. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/converting-the-color-space.html.
--
-- 'deinterlacer', 'videoPreprocessor_deinterlacer' - Use the deinterlacer to produce smoother motion and a clearer picture.
-- For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/working-with-scan-type.html.
--
-- 'noiseReducer', 'videoPreprocessor_noiseReducer' - Enable the Noise reducer (NoiseReducer) feature to remove noise from
-- your video output if necessary. Enable or disable this feature for each
-- output individually. This setting is disabled by default.
--
-- 'imageInserter', 'videoPreprocessor_imageInserter' - Enable the Image inserter (ImageInserter) feature to include a graphic
-- overlay on your video. Enable or disable this feature for each output
-- individually. This setting is disabled by default.
--
-- 'hdr10Plus', 'videoPreprocessor_hdr10Plus' - Enable HDR10+ analyis and metadata injection. Compatible with HEVC only.
--
-- 'partnerWatermarking', 'videoPreprocessor_partnerWatermarking' - If you work with a third party video watermarking partner, use the group
-- of settings that correspond with your watermarking partner to include
-- watermarks in your output.
newVideoPreprocessor ::
  VideoPreprocessor
newVideoPreprocessor :: VideoPreprocessor
newVideoPreprocessor =
  VideoPreprocessor' :: Maybe TimecodeBurnin
-> Maybe DolbyVision
-> Maybe ColorCorrector
-> Maybe Deinterlacer
-> Maybe NoiseReducer
-> Maybe ImageInserter
-> Maybe Hdr10Plus
-> Maybe PartnerWatermarking
-> VideoPreprocessor
VideoPreprocessor'
    { $sel:timecodeBurnin:VideoPreprocessor' :: Maybe TimecodeBurnin
timecodeBurnin =
        Maybe TimecodeBurnin
forall a. Maybe a
Prelude.Nothing,
      $sel:dolbyVision:VideoPreprocessor' :: Maybe DolbyVision
dolbyVision = Maybe DolbyVision
forall a. Maybe a
Prelude.Nothing,
      $sel:colorCorrector:VideoPreprocessor' :: Maybe ColorCorrector
colorCorrector = Maybe ColorCorrector
forall a. Maybe a
Prelude.Nothing,
      $sel:deinterlacer:VideoPreprocessor' :: Maybe Deinterlacer
deinterlacer = Maybe Deinterlacer
forall a. Maybe a
Prelude.Nothing,
      $sel:noiseReducer:VideoPreprocessor' :: Maybe NoiseReducer
noiseReducer = Maybe NoiseReducer
forall a. Maybe a
Prelude.Nothing,
      $sel:imageInserter:VideoPreprocessor' :: Maybe ImageInserter
imageInserter = Maybe ImageInserter
forall a. Maybe a
Prelude.Nothing,
      $sel:hdr10Plus:VideoPreprocessor' :: Maybe Hdr10Plus
hdr10Plus = Maybe Hdr10Plus
forall a. Maybe a
Prelude.Nothing,
      $sel:partnerWatermarking:VideoPreprocessor' :: Maybe PartnerWatermarking
partnerWatermarking = Maybe PartnerWatermarking
forall a. Maybe a
Prelude.Nothing
    }

-- | Settings for burning the output timecode and specified prefix into the
-- output.
videoPreprocessor_timecodeBurnin :: Lens.Lens' VideoPreprocessor (Prelude.Maybe TimecodeBurnin)
videoPreprocessor_timecodeBurnin :: (Maybe TimecodeBurnin -> f (Maybe TimecodeBurnin))
-> VideoPreprocessor -> f VideoPreprocessor
videoPreprocessor_timecodeBurnin = (VideoPreprocessor -> Maybe TimecodeBurnin)
-> (VideoPreprocessor -> Maybe TimecodeBurnin -> VideoPreprocessor)
-> Lens
     VideoPreprocessor
     VideoPreprocessor
     (Maybe TimecodeBurnin)
     (Maybe TimecodeBurnin)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoPreprocessor' {Maybe TimecodeBurnin
timecodeBurnin :: Maybe TimecodeBurnin
$sel:timecodeBurnin:VideoPreprocessor' :: VideoPreprocessor -> Maybe TimecodeBurnin
timecodeBurnin} -> Maybe TimecodeBurnin
timecodeBurnin) (\s :: VideoPreprocessor
s@VideoPreprocessor' {} Maybe TimecodeBurnin
a -> VideoPreprocessor
s {$sel:timecodeBurnin:VideoPreprocessor' :: Maybe TimecodeBurnin
timecodeBurnin = Maybe TimecodeBurnin
a} :: VideoPreprocessor)

-- | Enable Dolby Vision feature to produce Dolby Vision compatible video
-- output.
videoPreprocessor_dolbyVision :: Lens.Lens' VideoPreprocessor (Prelude.Maybe DolbyVision)
videoPreprocessor_dolbyVision :: (Maybe DolbyVision -> f (Maybe DolbyVision))
-> VideoPreprocessor -> f VideoPreprocessor
videoPreprocessor_dolbyVision = (VideoPreprocessor -> Maybe DolbyVision)
-> (VideoPreprocessor -> Maybe DolbyVision -> VideoPreprocessor)
-> Lens
     VideoPreprocessor
     VideoPreprocessor
     (Maybe DolbyVision)
     (Maybe DolbyVision)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoPreprocessor' {Maybe DolbyVision
dolbyVision :: Maybe DolbyVision
$sel:dolbyVision:VideoPreprocessor' :: VideoPreprocessor -> Maybe DolbyVision
dolbyVision} -> Maybe DolbyVision
dolbyVision) (\s :: VideoPreprocessor
s@VideoPreprocessor' {} Maybe DolbyVision
a -> VideoPreprocessor
s {$sel:dolbyVision:VideoPreprocessor' :: Maybe DolbyVision
dolbyVision = Maybe DolbyVision
a} :: VideoPreprocessor)

-- | Use these settings to convert the color space or to modify properties
-- such as hue and contrast for this output. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/converting-the-color-space.html.
videoPreprocessor_colorCorrector :: Lens.Lens' VideoPreprocessor (Prelude.Maybe ColorCorrector)
videoPreprocessor_colorCorrector :: (Maybe ColorCorrector -> f (Maybe ColorCorrector))
-> VideoPreprocessor -> f VideoPreprocessor
videoPreprocessor_colorCorrector = (VideoPreprocessor -> Maybe ColorCorrector)
-> (VideoPreprocessor -> Maybe ColorCorrector -> VideoPreprocessor)
-> Lens
     VideoPreprocessor
     VideoPreprocessor
     (Maybe ColorCorrector)
     (Maybe ColorCorrector)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoPreprocessor' {Maybe ColorCorrector
colorCorrector :: Maybe ColorCorrector
$sel:colorCorrector:VideoPreprocessor' :: VideoPreprocessor -> Maybe ColorCorrector
colorCorrector} -> Maybe ColorCorrector
colorCorrector) (\s :: VideoPreprocessor
s@VideoPreprocessor' {} Maybe ColorCorrector
a -> VideoPreprocessor
s {$sel:colorCorrector:VideoPreprocessor' :: Maybe ColorCorrector
colorCorrector = Maybe ColorCorrector
a} :: VideoPreprocessor)

-- | Use the deinterlacer to produce smoother motion and a clearer picture.
-- For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/working-with-scan-type.html.
videoPreprocessor_deinterlacer :: Lens.Lens' VideoPreprocessor (Prelude.Maybe Deinterlacer)
videoPreprocessor_deinterlacer :: (Maybe Deinterlacer -> f (Maybe Deinterlacer))
-> VideoPreprocessor -> f VideoPreprocessor
videoPreprocessor_deinterlacer = (VideoPreprocessor -> Maybe Deinterlacer)
-> (VideoPreprocessor -> Maybe Deinterlacer -> VideoPreprocessor)
-> Lens
     VideoPreprocessor
     VideoPreprocessor
     (Maybe Deinterlacer)
     (Maybe Deinterlacer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoPreprocessor' {Maybe Deinterlacer
deinterlacer :: Maybe Deinterlacer
$sel:deinterlacer:VideoPreprocessor' :: VideoPreprocessor -> Maybe Deinterlacer
deinterlacer} -> Maybe Deinterlacer
deinterlacer) (\s :: VideoPreprocessor
s@VideoPreprocessor' {} Maybe Deinterlacer
a -> VideoPreprocessor
s {$sel:deinterlacer:VideoPreprocessor' :: Maybe Deinterlacer
deinterlacer = Maybe Deinterlacer
a} :: VideoPreprocessor)

-- | Enable the Noise reducer (NoiseReducer) feature to remove noise from
-- your video output if necessary. Enable or disable this feature for each
-- output individually. This setting is disabled by default.
videoPreprocessor_noiseReducer :: Lens.Lens' VideoPreprocessor (Prelude.Maybe NoiseReducer)
videoPreprocessor_noiseReducer :: (Maybe NoiseReducer -> f (Maybe NoiseReducer))
-> VideoPreprocessor -> f VideoPreprocessor
videoPreprocessor_noiseReducer = (VideoPreprocessor -> Maybe NoiseReducer)
-> (VideoPreprocessor -> Maybe NoiseReducer -> VideoPreprocessor)
-> Lens
     VideoPreprocessor
     VideoPreprocessor
     (Maybe NoiseReducer)
     (Maybe NoiseReducer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoPreprocessor' {Maybe NoiseReducer
noiseReducer :: Maybe NoiseReducer
$sel:noiseReducer:VideoPreprocessor' :: VideoPreprocessor -> Maybe NoiseReducer
noiseReducer} -> Maybe NoiseReducer
noiseReducer) (\s :: VideoPreprocessor
s@VideoPreprocessor' {} Maybe NoiseReducer
a -> VideoPreprocessor
s {$sel:noiseReducer:VideoPreprocessor' :: Maybe NoiseReducer
noiseReducer = Maybe NoiseReducer
a} :: VideoPreprocessor)

-- | Enable the Image inserter (ImageInserter) feature to include a graphic
-- overlay on your video. Enable or disable this feature for each output
-- individually. This setting is disabled by default.
videoPreprocessor_imageInserter :: Lens.Lens' VideoPreprocessor (Prelude.Maybe ImageInserter)
videoPreprocessor_imageInserter :: (Maybe ImageInserter -> f (Maybe ImageInserter))
-> VideoPreprocessor -> f VideoPreprocessor
videoPreprocessor_imageInserter = (VideoPreprocessor -> Maybe ImageInserter)
-> (VideoPreprocessor -> Maybe ImageInserter -> VideoPreprocessor)
-> Lens
     VideoPreprocessor
     VideoPreprocessor
     (Maybe ImageInserter)
     (Maybe ImageInserter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoPreprocessor' {Maybe ImageInserter
imageInserter :: Maybe ImageInserter
$sel:imageInserter:VideoPreprocessor' :: VideoPreprocessor -> Maybe ImageInserter
imageInserter} -> Maybe ImageInserter
imageInserter) (\s :: VideoPreprocessor
s@VideoPreprocessor' {} Maybe ImageInserter
a -> VideoPreprocessor
s {$sel:imageInserter:VideoPreprocessor' :: Maybe ImageInserter
imageInserter = Maybe ImageInserter
a} :: VideoPreprocessor)

-- | Enable HDR10+ analyis and metadata injection. Compatible with HEVC only.
videoPreprocessor_hdr10Plus :: Lens.Lens' VideoPreprocessor (Prelude.Maybe Hdr10Plus)
videoPreprocessor_hdr10Plus :: (Maybe Hdr10Plus -> f (Maybe Hdr10Plus))
-> VideoPreprocessor -> f VideoPreprocessor
videoPreprocessor_hdr10Plus = (VideoPreprocessor -> Maybe Hdr10Plus)
-> (VideoPreprocessor -> Maybe Hdr10Plus -> VideoPreprocessor)
-> Lens
     VideoPreprocessor
     VideoPreprocessor
     (Maybe Hdr10Plus)
     (Maybe Hdr10Plus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoPreprocessor' {Maybe Hdr10Plus
hdr10Plus :: Maybe Hdr10Plus
$sel:hdr10Plus:VideoPreprocessor' :: VideoPreprocessor -> Maybe Hdr10Plus
hdr10Plus} -> Maybe Hdr10Plus
hdr10Plus) (\s :: VideoPreprocessor
s@VideoPreprocessor' {} Maybe Hdr10Plus
a -> VideoPreprocessor
s {$sel:hdr10Plus:VideoPreprocessor' :: Maybe Hdr10Plus
hdr10Plus = Maybe Hdr10Plus
a} :: VideoPreprocessor)

-- | If you work with a third party video watermarking partner, use the group
-- of settings that correspond with your watermarking partner to include
-- watermarks in your output.
videoPreprocessor_partnerWatermarking :: Lens.Lens' VideoPreprocessor (Prelude.Maybe PartnerWatermarking)
videoPreprocessor_partnerWatermarking :: (Maybe PartnerWatermarking -> f (Maybe PartnerWatermarking))
-> VideoPreprocessor -> f VideoPreprocessor
videoPreprocessor_partnerWatermarking = (VideoPreprocessor -> Maybe PartnerWatermarking)
-> (VideoPreprocessor
    -> Maybe PartnerWatermarking -> VideoPreprocessor)
-> Lens
     VideoPreprocessor
     VideoPreprocessor
     (Maybe PartnerWatermarking)
     (Maybe PartnerWatermarking)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoPreprocessor' {Maybe PartnerWatermarking
partnerWatermarking :: Maybe PartnerWatermarking
$sel:partnerWatermarking:VideoPreprocessor' :: VideoPreprocessor -> Maybe PartnerWatermarking
partnerWatermarking} -> Maybe PartnerWatermarking
partnerWatermarking) (\s :: VideoPreprocessor
s@VideoPreprocessor' {} Maybe PartnerWatermarking
a -> VideoPreprocessor
s {$sel:partnerWatermarking:VideoPreprocessor' :: Maybe PartnerWatermarking
partnerWatermarking = Maybe PartnerWatermarking
a} :: VideoPreprocessor)

instance Core.FromJSON VideoPreprocessor where
  parseJSON :: Value -> Parser VideoPreprocessor
parseJSON =
    String
-> (Object -> Parser VideoPreprocessor)
-> Value
-> Parser VideoPreprocessor
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VideoPreprocessor"
      ( \Object
x ->
          Maybe TimecodeBurnin
-> Maybe DolbyVision
-> Maybe ColorCorrector
-> Maybe Deinterlacer
-> Maybe NoiseReducer
-> Maybe ImageInserter
-> Maybe Hdr10Plus
-> Maybe PartnerWatermarking
-> VideoPreprocessor
VideoPreprocessor'
            (Maybe TimecodeBurnin
 -> Maybe DolbyVision
 -> Maybe ColorCorrector
 -> Maybe Deinterlacer
 -> Maybe NoiseReducer
 -> Maybe ImageInserter
 -> Maybe Hdr10Plus
 -> Maybe PartnerWatermarking
 -> VideoPreprocessor)
-> Parser (Maybe TimecodeBurnin)
-> Parser
     (Maybe DolbyVision
      -> Maybe ColorCorrector
      -> Maybe Deinterlacer
      -> Maybe NoiseReducer
      -> Maybe ImageInserter
      -> Maybe Hdr10Plus
      -> Maybe PartnerWatermarking
      -> VideoPreprocessor)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe TimecodeBurnin)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timecodeBurnin")
            Parser
  (Maybe DolbyVision
   -> Maybe ColorCorrector
   -> Maybe Deinterlacer
   -> Maybe NoiseReducer
   -> Maybe ImageInserter
   -> Maybe Hdr10Plus
   -> Maybe PartnerWatermarking
   -> VideoPreprocessor)
-> Parser (Maybe DolbyVision)
-> Parser
     (Maybe ColorCorrector
      -> Maybe Deinterlacer
      -> Maybe NoiseReducer
      -> Maybe ImageInserter
      -> Maybe Hdr10Plus
      -> Maybe PartnerWatermarking
      -> VideoPreprocessor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DolbyVision)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dolbyVision")
            Parser
  (Maybe ColorCorrector
   -> Maybe Deinterlacer
   -> Maybe NoiseReducer
   -> Maybe ImageInserter
   -> Maybe Hdr10Plus
   -> Maybe PartnerWatermarking
   -> VideoPreprocessor)
-> Parser (Maybe ColorCorrector)
-> Parser
     (Maybe Deinterlacer
      -> Maybe NoiseReducer
      -> Maybe ImageInserter
      -> Maybe Hdr10Plus
      -> Maybe PartnerWatermarking
      -> VideoPreprocessor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ColorCorrector)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"colorCorrector")
            Parser
  (Maybe Deinterlacer
   -> Maybe NoiseReducer
   -> Maybe ImageInserter
   -> Maybe Hdr10Plus
   -> Maybe PartnerWatermarking
   -> VideoPreprocessor)
-> Parser (Maybe Deinterlacer)
-> Parser
     (Maybe NoiseReducer
      -> Maybe ImageInserter
      -> Maybe Hdr10Plus
      -> Maybe PartnerWatermarking
      -> VideoPreprocessor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Deinterlacer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deinterlacer")
            Parser
  (Maybe NoiseReducer
   -> Maybe ImageInserter
   -> Maybe Hdr10Plus
   -> Maybe PartnerWatermarking
   -> VideoPreprocessor)
-> Parser (Maybe NoiseReducer)
-> Parser
     (Maybe ImageInserter
      -> Maybe Hdr10Plus
      -> Maybe PartnerWatermarking
      -> VideoPreprocessor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NoiseReducer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"noiseReducer")
            Parser
  (Maybe ImageInserter
   -> Maybe Hdr10Plus
   -> Maybe PartnerWatermarking
   -> VideoPreprocessor)
-> Parser (Maybe ImageInserter)
-> Parser
     (Maybe Hdr10Plus -> Maybe PartnerWatermarking -> VideoPreprocessor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImageInserter)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageInserter")
            Parser
  (Maybe Hdr10Plus -> Maybe PartnerWatermarking -> VideoPreprocessor)
-> Parser (Maybe Hdr10Plus)
-> Parser (Maybe PartnerWatermarking -> VideoPreprocessor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Hdr10Plus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hdr10Plus")
            Parser (Maybe PartnerWatermarking -> VideoPreprocessor)
-> Parser (Maybe PartnerWatermarking) -> Parser VideoPreprocessor
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PartnerWatermarking)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"partnerWatermarking")
      )

instance Prelude.Hashable VideoPreprocessor

instance Prelude.NFData VideoPreprocessor

instance Core.ToJSON VideoPreprocessor where
  toJSON :: VideoPreprocessor -> Value
toJSON VideoPreprocessor' {Maybe Deinterlacer
Maybe DolbyVision
Maybe Hdr10Plus
Maybe ImageInserter
Maybe NoiseReducer
Maybe ColorCorrector
Maybe TimecodeBurnin
Maybe PartnerWatermarking
partnerWatermarking :: Maybe PartnerWatermarking
hdr10Plus :: Maybe Hdr10Plus
imageInserter :: Maybe ImageInserter
noiseReducer :: Maybe NoiseReducer
deinterlacer :: Maybe Deinterlacer
colorCorrector :: Maybe ColorCorrector
dolbyVision :: Maybe DolbyVision
timecodeBurnin :: Maybe TimecodeBurnin
$sel:partnerWatermarking:VideoPreprocessor' :: VideoPreprocessor -> Maybe PartnerWatermarking
$sel:hdr10Plus:VideoPreprocessor' :: VideoPreprocessor -> Maybe Hdr10Plus
$sel:imageInserter:VideoPreprocessor' :: VideoPreprocessor -> Maybe ImageInserter
$sel:noiseReducer:VideoPreprocessor' :: VideoPreprocessor -> Maybe NoiseReducer
$sel:deinterlacer:VideoPreprocessor' :: VideoPreprocessor -> Maybe Deinterlacer
$sel:colorCorrector:VideoPreprocessor' :: VideoPreprocessor -> Maybe ColorCorrector
$sel:dolbyVision:VideoPreprocessor' :: VideoPreprocessor -> Maybe DolbyVision
$sel:timecodeBurnin:VideoPreprocessor' :: VideoPreprocessor -> Maybe TimecodeBurnin
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"timecodeBurnin" Text -> TimecodeBurnin -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (TimecodeBurnin -> Pair) -> Maybe TimecodeBurnin -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimecodeBurnin
timecodeBurnin,
            (Text
"dolbyVision" Text -> DolbyVision -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DolbyVision -> Pair) -> Maybe DolbyVision -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DolbyVision
dolbyVision,
            (Text
"colorCorrector" Text -> ColorCorrector -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ColorCorrector -> Pair) -> Maybe ColorCorrector -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ColorCorrector
colorCorrector,
            (Text
"deinterlacer" Text -> Deinterlacer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Deinterlacer -> Pair) -> Maybe Deinterlacer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Deinterlacer
deinterlacer,
            (Text
"noiseReducer" Text -> NoiseReducer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NoiseReducer -> Pair) -> Maybe NoiseReducer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NoiseReducer
noiseReducer,
            (Text
"imageInserter" Text -> ImageInserter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ImageInserter -> Pair) -> Maybe ImageInserter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ImageInserter
imageInserter,
            (Text
"hdr10Plus" Text -> Hdr10Plus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Hdr10Plus -> Pair) -> Maybe Hdr10Plus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Hdr10Plus
hdr10Plus,
            (Text
"partnerWatermarking" Text -> PartnerWatermarking -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (PartnerWatermarking -> Pair)
-> Maybe PartnerWatermarking -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PartnerWatermarking
partnerWatermarking
          ]
      )