{-# 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.VideoCodecSettings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.VideoCodecSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.Av1Settings
import Amazonka.MediaConvert.Types.AvcIntraSettings
import Amazonka.MediaConvert.Types.FrameCaptureSettings
import Amazonka.MediaConvert.Types.H264Settings
import Amazonka.MediaConvert.Types.H265Settings
import Amazonka.MediaConvert.Types.Mpeg2Settings
import Amazonka.MediaConvert.Types.ProresSettings
import Amazonka.MediaConvert.Types.Vc3Settings
import Amazonka.MediaConvert.Types.VideoCodec
import Amazonka.MediaConvert.Types.Vp8Settings
import Amazonka.MediaConvert.Types.Vp9Settings
import Amazonka.MediaConvert.Types.XavcSettings
import qualified Amazonka.Prelude as Prelude

-- | 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
--
-- /See:/ 'newVideoCodecSettings' smart constructor.
data VideoCodecSettings = VideoCodecSettings'
  { -- | Required when you set Codec, under VideoDescription>CodecSettings to the
    -- value AV1.
    VideoCodecSettings -> Maybe Av1Settings
av1Settings :: Prelude.Maybe Av1Settings,
    -- | Required when you choose AVC-Intra for your output video codec. For more
    -- information about the AVC-Intra settings, see the relevant
    -- specification. For detailed information about SD and HD in AVC-Intra,
    -- see https:\/\/ieeexplore.ieee.org\/document\/7290936. For information
    -- about 4K\/2K in AVC-Intra, see
    -- https:\/\/pro-av.panasonic.net\/en\/avc-ultra\/AVC-ULTRAoverview.pdf.
    VideoCodecSettings -> Maybe AvcIntraSettings
avcIntraSettings :: Prelude.Maybe AvcIntraSettings,
    -- | Specifies the video codec. This must be equal to one of the enum values
    -- defined by the object VideoCodec.
    VideoCodecSettings -> Maybe VideoCodec
codec :: Prelude.Maybe VideoCodec,
    -- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
    -- to the value FRAME_CAPTURE.
    VideoCodecSettings -> Maybe FrameCaptureSettings
frameCaptureSettings :: Prelude.Maybe FrameCaptureSettings,
    -- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
    -- to the value H_264.
    VideoCodecSettings -> Maybe H264Settings
h264Settings :: Prelude.Maybe H264Settings,
    -- | Settings for H265 codec
    VideoCodecSettings -> Maybe H265Settings
h265Settings :: Prelude.Maybe H265Settings,
    -- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
    -- to the value MPEG2.
    VideoCodecSettings -> Maybe Mpeg2Settings
mpeg2Settings :: Prelude.Maybe Mpeg2Settings,
    -- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
    -- to the value PRORES.
    VideoCodecSettings -> Maybe ProresSettings
proresSettings :: Prelude.Maybe ProresSettings,
    -- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
    -- to the value VC3
    VideoCodecSettings -> Maybe Vc3Settings
vc3Settings :: Prelude.Maybe Vc3Settings,
    -- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
    -- to the value VP8.
    VideoCodecSettings -> Maybe Vp8Settings
vp8Settings :: Prelude.Maybe Vp8Settings,
    -- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
    -- to the value VP9.
    VideoCodecSettings -> Maybe Vp9Settings
vp9Settings :: Prelude.Maybe Vp9Settings,
    -- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
    -- to the value XAVC.
    VideoCodecSettings -> Maybe XavcSettings
xavcSettings :: Prelude.Maybe XavcSettings
  }
  deriving (VideoCodecSettings -> VideoCodecSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoCodecSettings -> VideoCodecSettings -> Bool
$c/= :: VideoCodecSettings -> VideoCodecSettings -> Bool
== :: VideoCodecSettings -> VideoCodecSettings -> Bool
$c== :: VideoCodecSettings -> VideoCodecSettings -> Bool
Prelude.Eq, ReadPrec [VideoCodecSettings]
ReadPrec VideoCodecSettings
Int -> ReadS VideoCodecSettings
ReadS [VideoCodecSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VideoCodecSettings]
$creadListPrec :: ReadPrec [VideoCodecSettings]
readPrec :: ReadPrec VideoCodecSettings
$creadPrec :: ReadPrec VideoCodecSettings
readList :: ReadS [VideoCodecSettings]
$creadList :: ReadS [VideoCodecSettings]
readsPrec :: Int -> ReadS VideoCodecSettings
$creadsPrec :: Int -> ReadS VideoCodecSettings
Prelude.Read, Int -> VideoCodecSettings -> ShowS
[VideoCodecSettings] -> ShowS
VideoCodecSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoCodecSettings] -> ShowS
$cshowList :: [VideoCodecSettings] -> ShowS
show :: VideoCodecSettings -> String
$cshow :: VideoCodecSettings -> String
showsPrec :: Int -> VideoCodecSettings -> ShowS
$cshowsPrec :: Int -> VideoCodecSettings -> ShowS
Prelude.Show, forall x. Rep VideoCodecSettings x -> VideoCodecSettings
forall x. VideoCodecSettings -> Rep VideoCodecSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VideoCodecSettings x -> VideoCodecSettings
$cfrom :: forall x. VideoCodecSettings -> Rep VideoCodecSettings x
Prelude.Generic)

-- |
-- Create a value of 'VideoCodecSettings' 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:
--
-- 'av1Settings', 'videoCodecSettings_av1Settings' - Required when you set Codec, under VideoDescription>CodecSettings to the
-- value AV1.
--
-- 'avcIntraSettings', 'videoCodecSettings_avcIntraSettings' - Required when you choose AVC-Intra for your output video codec. For more
-- information about the AVC-Intra settings, see the relevant
-- specification. For detailed information about SD and HD in AVC-Intra,
-- see https:\/\/ieeexplore.ieee.org\/document\/7290936. For information
-- about 4K\/2K in AVC-Intra, see
-- https:\/\/pro-av.panasonic.net\/en\/avc-ultra\/AVC-ULTRAoverview.pdf.
--
-- 'codec', 'videoCodecSettings_codec' - Specifies the video codec. This must be equal to one of the enum values
-- defined by the object VideoCodec.
--
-- 'frameCaptureSettings', 'videoCodecSettings_frameCaptureSettings' - Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value FRAME_CAPTURE.
--
-- 'h264Settings', 'videoCodecSettings_h264Settings' - Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value H_264.
--
-- 'h265Settings', 'videoCodecSettings_h265Settings' - Settings for H265 codec
--
-- 'mpeg2Settings', 'videoCodecSettings_mpeg2Settings' - Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value MPEG2.
--
-- 'proresSettings', 'videoCodecSettings_proresSettings' - Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value PRORES.
--
-- 'vc3Settings', 'videoCodecSettings_vc3Settings' - Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value VC3
--
-- 'vp8Settings', 'videoCodecSettings_vp8Settings' - Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value VP8.
--
-- 'vp9Settings', 'videoCodecSettings_vp9Settings' - Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value VP9.
--
-- 'xavcSettings', 'videoCodecSettings_xavcSettings' - Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value XAVC.
newVideoCodecSettings ::
  VideoCodecSettings
newVideoCodecSettings :: VideoCodecSettings
newVideoCodecSettings =
  VideoCodecSettings'
    { $sel:av1Settings:VideoCodecSettings' :: Maybe Av1Settings
av1Settings = forall a. Maybe a
Prelude.Nothing,
      $sel:avcIntraSettings:VideoCodecSettings' :: Maybe AvcIntraSettings
avcIntraSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:codec:VideoCodecSettings' :: Maybe VideoCodec
codec = forall a. Maybe a
Prelude.Nothing,
      $sel:frameCaptureSettings:VideoCodecSettings' :: Maybe FrameCaptureSettings
frameCaptureSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:h264Settings:VideoCodecSettings' :: Maybe H264Settings
h264Settings = forall a. Maybe a
Prelude.Nothing,
      $sel:h265Settings:VideoCodecSettings' :: Maybe H265Settings
h265Settings = forall a. Maybe a
Prelude.Nothing,
      $sel:mpeg2Settings:VideoCodecSettings' :: Maybe Mpeg2Settings
mpeg2Settings = forall a. Maybe a
Prelude.Nothing,
      $sel:proresSettings:VideoCodecSettings' :: Maybe ProresSettings
proresSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:vc3Settings:VideoCodecSettings' :: Maybe Vc3Settings
vc3Settings = forall a. Maybe a
Prelude.Nothing,
      $sel:vp8Settings:VideoCodecSettings' :: Maybe Vp8Settings
vp8Settings = forall a. Maybe a
Prelude.Nothing,
      $sel:vp9Settings:VideoCodecSettings' :: Maybe Vp9Settings
vp9Settings = forall a. Maybe a
Prelude.Nothing,
      $sel:xavcSettings:VideoCodecSettings' :: Maybe XavcSettings
xavcSettings = forall a. Maybe a
Prelude.Nothing
    }

-- | Required when you set Codec, under VideoDescription>CodecSettings to the
-- value AV1.
videoCodecSettings_av1Settings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe Av1Settings)
videoCodecSettings_av1Settings :: Lens' VideoCodecSettings (Maybe Av1Settings)
videoCodecSettings_av1Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe Av1Settings
av1Settings :: Maybe Av1Settings
$sel:av1Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Av1Settings
av1Settings} -> Maybe Av1Settings
av1Settings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe Av1Settings
a -> VideoCodecSettings
s {$sel:av1Settings:VideoCodecSettings' :: Maybe Av1Settings
av1Settings = Maybe Av1Settings
a} :: VideoCodecSettings)

-- | Required when you choose AVC-Intra for your output video codec. For more
-- information about the AVC-Intra settings, see the relevant
-- specification. For detailed information about SD and HD in AVC-Intra,
-- see https:\/\/ieeexplore.ieee.org\/document\/7290936. For information
-- about 4K\/2K in AVC-Intra, see
-- https:\/\/pro-av.panasonic.net\/en\/avc-ultra\/AVC-ULTRAoverview.pdf.
videoCodecSettings_avcIntraSettings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe AvcIntraSettings)
videoCodecSettings_avcIntraSettings :: Lens' VideoCodecSettings (Maybe AvcIntraSettings)
videoCodecSettings_avcIntraSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe AvcIntraSettings
avcIntraSettings :: Maybe AvcIntraSettings
$sel:avcIntraSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe AvcIntraSettings
avcIntraSettings} -> Maybe AvcIntraSettings
avcIntraSettings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe AvcIntraSettings
a -> VideoCodecSettings
s {$sel:avcIntraSettings:VideoCodecSettings' :: Maybe AvcIntraSettings
avcIntraSettings = Maybe AvcIntraSettings
a} :: VideoCodecSettings)

-- | Specifies the video codec. This must be equal to one of the enum values
-- defined by the object VideoCodec.
videoCodecSettings_codec :: Lens.Lens' VideoCodecSettings (Prelude.Maybe VideoCodec)
videoCodecSettings_codec :: Lens' VideoCodecSettings (Maybe VideoCodec)
videoCodecSettings_codec = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe VideoCodec
codec :: Maybe VideoCodec
$sel:codec:VideoCodecSettings' :: VideoCodecSettings -> Maybe VideoCodec
codec} -> Maybe VideoCodec
codec) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe VideoCodec
a -> VideoCodecSettings
s {$sel:codec:VideoCodecSettings' :: Maybe VideoCodec
codec = Maybe VideoCodec
a} :: VideoCodecSettings)

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value FRAME_CAPTURE.
videoCodecSettings_frameCaptureSettings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe FrameCaptureSettings)
videoCodecSettings_frameCaptureSettings :: Lens' VideoCodecSettings (Maybe FrameCaptureSettings)
videoCodecSettings_frameCaptureSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe FrameCaptureSettings
frameCaptureSettings :: Maybe FrameCaptureSettings
$sel:frameCaptureSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe FrameCaptureSettings
frameCaptureSettings} -> Maybe FrameCaptureSettings
frameCaptureSettings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe FrameCaptureSettings
a -> VideoCodecSettings
s {$sel:frameCaptureSettings:VideoCodecSettings' :: Maybe FrameCaptureSettings
frameCaptureSettings = Maybe FrameCaptureSettings
a} :: VideoCodecSettings)

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value H_264.
videoCodecSettings_h264Settings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe H264Settings)
videoCodecSettings_h264Settings :: Lens' VideoCodecSettings (Maybe H264Settings)
videoCodecSettings_h264Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe H264Settings
h264Settings :: Maybe H264Settings
$sel:h264Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe H264Settings
h264Settings} -> Maybe H264Settings
h264Settings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe H264Settings
a -> VideoCodecSettings
s {$sel:h264Settings:VideoCodecSettings' :: Maybe H264Settings
h264Settings = Maybe H264Settings
a} :: VideoCodecSettings)

-- | Settings for H265 codec
videoCodecSettings_h265Settings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe H265Settings)
videoCodecSettings_h265Settings :: Lens' VideoCodecSettings (Maybe H265Settings)
videoCodecSettings_h265Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe H265Settings
h265Settings :: Maybe H265Settings
$sel:h265Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe H265Settings
h265Settings} -> Maybe H265Settings
h265Settings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe H265Settings
a -> VideoCodecSettings
s {$sel:h265Settings:VideoCodecSettings' :: Maybe H265Settings
h265Settings = Maybe H265Settings
a} :: VideoCodecSettings)

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value MPEG2.
videoCodecSettings_mpeg2Settings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe Mpeg2Settings)
videoCodecSettings_mpeg2Settings :: Lens' VideoCodecSettings (Maybe Mpeg2Settings)
videoCodecSettings_mpeg2Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe Mpeg2Settings
mpeg2Settings :: Maybe Mpeg2Settings
$sel:mpeg2Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Mpeg2Settings
mpeg2Settings} -> Maybe Mpeg2Settings
mpeg2Settings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe Mpeg2Settings
a -> VideoCodecSettings
s {$sel:mpeg2Settings:VideoCodecSettings' :: Maybe Mpeg2Settings
mpeg2Settings = Maybe Mpeg2Settings
a} :: VideoCodecSettings)

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value PRORES.
videoCodecSettings_proresSettings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe ProresSettings)
videoCodecSettings_proresSettings :: Lens' VideoCodecSettings (Maybe ProresSettings)
videoCodecSettings_proresSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe ProresSettings
proresSettings :: Maybe ProresSettings
$sel:proresSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe ProresSettings
proresSettings} -> Maybe ProresSettings
proresSettings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe ProresSettings
a -> VideoCodecSettings
s {$sel:proresSettings:VideoCodecSettings' :: Maybe ProresSettings
proresSettings = Maybe ProresSettings
a} :: VideoCodecSettings)

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value VC3
videoCodecSettings_vc3Settings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe Vc3Settings)
videoCodecSettings_vc3Settings :: Lens' VideoCodecSettings (Maybe Vc3Settings)
videoCodecSettings_vc3Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe Vc3Settings
vc3Settings :: Maybe Vc3Settings
$sel:vc3Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vc3Settings
vc3Settings} -> Maybe Vc3Settings
vc3Settings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe Vc3Settings
a -> VideoCodecSettings
s {$sel:vc3Settings:VideoCodecSettings' :: Maybe Vc3Settings
vc3Settings = Maybe Vc3Settings
a} :: VideoCodecSettings)

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value VP8.
videoCodecSettings_vp8Settings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe Vp8Settings)
videoCodecSettings_vp8Settings :: Lens' VideoCodecSettings (Maybe Vp8Settings)
videoCodecSettings_vp8Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe Vp8Settings
vp8Settings :: Maybe Vp8Settings
$sel:vp8Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vp8Settings
vp8Settings} -> Maybe Vp8Settings
vp8Settings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe Vp8Settings
a -> VideoCodecSettings
s {$sel:vp8Settings:VideoCodecSettings' :: Maybe Vp8Settings
vp8Settings = Maybe Vp8Settings
a} :: VideoCodecSettings)

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value VP9.
videoCodecSettings_vp9Settings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe Vp9Settings)
videoCodecSettings_vp9Settings :: Lens' VideoCodecSettings (Maybe Vp9Settings)
videoCodecSettings_vp9Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe Vp9Settings
vp9Settings :: Maybe Vp9Settings
$sel:vp9Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vp9Settings
vp9Settings} -> Maybe Vp9Settings
vp9Settings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe Vp9Settings
a -> VideoCodecSettings
s {$sel:vp9Settings:VideoCodecSettings' :: Maybe Vp9Settings
vp9Settings = Maybe Vp9Settings
a} :: VideoCodecSettings)

-- | Required when you set (Codec) under (VideoDescription)>(CodecSettings)
-- to the value XAVC.
videoCodecSettings_xavcSettings :: Lens.Lens' VideoCodecSettings (Prelude.Maybe XavcSettings)
videoCodecSettings_xavcSettings :: Lens' VideoCodecSettings (Maybe XavcSettings)
videoCodecSettings_xavcSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoCodecSettings' {Maybe XavcSettings
xavcSettings :: Maybe XavcSettings
$sel:xavcSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe XavcSettings
xavcSettings} -> Maybe XavcSettings
xavcSettings) (\s :: VideoCodecSettings
s@VideoCodecSettings' {} Maybe XavcSettings
a -> VideoCodecSettings
s {$sel:xavcSettings:VideoCodecSettings' :: Maybe XavcSettings
xavcSettings = Maybe XavcSettings
a} :: VideoCodecSettings)

instance Data.FromJSON VideoCodecSettings where
  parseJSON :: Value -> Parser VideoCodecSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"VideoCodecSettings"
      ( \Object
x ->
          Maybe Av1Settings
-> Maybe AvcIntraSettings
-> Maybe VideoCodec
-> Maybe FrameCaptureSettings
-> Maybe H264Settings
-> Maybe H265Settings
-> Maybe Mpeg2Settings
-> Maybe ProresSettings
-> Maybe Vc3Settings
-> Maybe Vp8Settings
-> Maybe Vp9Settings
-> Maybe XavcSettings
-> VideoCodecSettings
VideoCodecSettings'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"av1Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"avcIntraSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"codec")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"frameCaptureSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"h264Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"h265Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"mpeg2Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"proresSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"vc3Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"vp8Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"vp9Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"xavcSettings")
      )

instance Prelude.Hashable VideoCodecSettings where
  hashWithSalt :: Int -> VideoCodecSettings -> Int
hashWithSalt Int
_salt VideoCodecSettings' {Maybe Av1Settings
Maybe AvcIntraSettings
Maybe FrameCaptureSettings
Maybe H264Settings
Maybe H265Settings
Maybe Mpeg2Settings
Maybe ProresSettings
Maybe Vc3Settings
Maybe VideoCodec
Maybe Vp8Settings
Maybe Vp9Settings
Maybe XavcSettings
xavcSettings :: Maybe XavcSettings
vp9Settings :: Maybe Vp9Settings
vp8Settings :: Maybe Vp8Settings
vc3Settings :: Maybe Vc3Settings
proresSettings :: Maybe ProresSettings
mpeg2Settings :: Maybe Mpeg2Settings
h265Settings :: Maybe H265Settings
h264Settings :: Maybe H264Settings
frameCaptureSettings :: Maybe FrameCaptureSettings
codec :: Maybe VideoCodec
avcIntraSettings :: Maybe AvcIntraSettings
av1Settings :: Maybe Av1Settings
$sel:xavcSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe XavcSettings
$sel:vp9Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vp9Settings
$sel:vp8Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vp8Settings
$sel:vc3Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vc3Settings
$sel:proresSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe ProresSettings
$sel:mpeg2Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Mpeg2Settings
$sel:h265Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe H265Settings
$sel:h264Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe H264Settings
$sel:frameCaptureSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe FrameCaptureSettings
$sel:codec:VideoCodecSettings' :: VideoCodecSettings -> Maybe VideoCodec
$sel:avcIntraSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe AvcIntraSettings
$sel:av1Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Av1Settings
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Av1Settings
av1Settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AvcIntraSettings
avcIntraSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VideoCodec
codec
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FrameCaptureSettings
frameCaptureSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe H264Settings
h264Settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe H265Settings
h265Settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Mpeg2Settings
mpeg2Settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProresSettings
proresSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Vc3Settings
vc3Settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Vp8Settings
vp8Settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Vp9Settings
vp9Settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe XavcSettings
xavcSettings

instance Prelude.NFData VideoCodecSettings where
  rnf :: VideoCodecSettings -> ()
rnf VideoCodecSettings' {Maybe Av1Settings
Maybe AvcIntraSettings
Maybe FrameCaptureSettings
Maybe H264Settings
Maybe H265Settings
Maybe Mpeg2Settings
Maybe ProresSettings
Maybe Vc3Settings
Maybe VideoCodec
Maybe Vp8Settings
Maybe Vp9Settings
Maybe XavcSettings
xavcSettings :: Maybe XavcSettings
vp9Settings :: Maybe Vp9Settings
vp8Settings :: Maybe Vp8Settings
vc3Settings :: Maybe Vc3Settings
proresSettings :: Maybe ProresSettings
mpeg2Settings :: Maybe Mpeg2Settings
h265Settings :: Maybe H265Settings
h264Settings :: Maybe H264Settings
frameCaptureSettings :: Maybe FrameCaptureSettings
codec :: Maybe VideoCodec
avcIntraSettings :: Maybe AvcIntraSettings
av1Settings :: Maybe Av1Settings
$sel:xavcSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe XavcSettings
$sel:vp9Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vp9Settings
$sel:vp8Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vp8Settings
$sel:vc3Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vc3Settings
$sel:proresSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe ProresSettings
$sel:mpeg2Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Mpeg2Settings
$sel:h265Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe H265Settings
$sel:h264Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe H264Settings
$sel:frameCaptureSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe FrameCaptureSettings
$sel:codec:VideoCodecSettings' :: VideoCodecSettings -> Maybe VideoCodec
$sel:avcIntraSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe AvcIntraSettings
$sel:av1Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Av1Settings
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Av1Settings
av1Settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AvcIntraSettings
avcIntraSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VideoCodec
codec
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FrameCaptureSettings
frameCaptureSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe H264Settings
h264Settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe H265Settings
h265Settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Mpeg2Settings
mpeg2Settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProresSettings
proresSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Vc3Settings
vc3Settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Vp8Settings
vp8Settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Vp9Settings
vp9Settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe XavcSettings
xavcSettings

instance Data.ToJSON VideoCodecSettings where
  toJSON :: VideoCodecSettings -> Value
toJSON VideoCodecSettings' {Maybe Av1Settings
Maybe AvcIntraSettings
Maybe FrameCaptureSettings
Maybe H264Settings
Maybe H265Settings
Maybe Mpeg2Settings
Maybe ProresSettings
Maybe Vc3Settings
Maybe VideoCodec
Maybe Vp8Settings
Maybe Vp9Settings
Maybe XavcSettings
xavcSettings :: Maybe XavcSettings
vp9Settings :: Maybe Vp9Settings
vp8Settings :: Maybe Vp8Settings
vc3Settings :: Maybe Vc3Settings
proresSettings :: Maybe ProresSettings
mpeg2Settings :: Maybe Mpeg2Settings
h265Settings :: Maybe H265Settings
h264Settings :: Maybe H264Settings
frameCaptureSettings :: Maybe FrameCaptureSettings
codec :: Maybe VideoCodec
avcIntraSettings :: Maybe AvcIntraSettings
av1Settings :: Maybe Av1Settings
$sel:xavcSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe XavcSettings
$sel:vp9Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vp9Settings
$sel:vp8Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vp8Settings
$sel:vc3Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Vc3Settings
$sel:proresSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe ProresSettings
$sel:mpeg2Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Mpeg2Settings
$sel:h265Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe H265Settings
$sel:h264Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe H264Settings
$sel:frameCaptureSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe FrameCaptureSettings
$sel:codec:VideoCodecSettings' :: VideoCodecSettings -> Maybe VideoCodec
$sel:avcIntraSettings:VideoCodecSettings' :: VideoCodecSettings -> Maybe AvcIntraSettings
$sel:av1Settings:VideoCodecSettings' :: VideoCodecSettings -> Maybe Av1Settings
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"av1Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Av1Settings
av1Settings,
            (Key
"avcIntraSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AvcIntraSettings
avcIntraSettings,
            (Key
"codec" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VideoCodec
codec,
            (Key
"frameCaptureSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FrameCaptureSettings
frameCaptureSettings,
            (Key
"h264Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe H264Settings
h264Settings,
            (Key
"h265Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe H265Settings
h265Settings,
            (Key
"mpeg2Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Mpeg2Settings
mpeg2Settings,
            (Key
"proresSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProresSettings
proresSettings,
            (Key
"vc3Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vc3Settings
vc3Settings,
            (Key
"vp8Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp8Settings
vp8Settings,
            (Key
"vp9Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Vp9Settings
vp9Settings,
            (Key
"xavcSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe XavcSettings
xavcSettings
          ]
      )