{-# 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.MediaLive.Types.EncoderSettings
-- 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.MediaLive.Types.EncoderSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.AudioDescription
import Amazonka.MediaLive.Types.AvailBlanking
import Amazonka.MediaLive.Types.AvailConfiguration
import Amazonka.MediaLive.Types.BlackoutSlate
import Amazonka.MediaLive.Types.CaptionDescription
import Amazonka.MediaLive.Types.FeatureActivations
import Amazonka.MediaLive.Types.GlobalConfiguration
import Amazonka.MediaLive.Types.MotionGraphicsConfiguration
import Amazonka.MediaLive.Types.NielsenConfiguration
import Amazonka.MediaLive.Types.OutputGroup
import Amazonka.MediaLive.Types.TimecodeConfig
import Amazonka.MediaLive.Types.VideoDescription
import qualified Amazonka.Prelude as Prelude

-- | Encoder Settings
--
-- /See:/ 'newEncoderSettings' smart constructor.
data EncoderSettings = EncoderSettings'
  { -- | Settings for ad avail blanking.
    EncoderSettings -> Maybe AvailBlanking
availBlanking :: Prelude.Maybe AvailBlanking,
    -- | Event-wide configuration settings for ad avail insertion.
    EncoderSettings -> Maybe AvailConfiguration
availConfiguration :: Prelude.Maybe AvailConfiguration,
    -- | Settings for blackout slate.
    EncoderSettings -> Maybe BlackoutSlate
blackoutSlate :: Prelude.Maybe BlackoutSlate,
    -- | Settings for caption decriptions
    EncoderSettings -> Maybe [CaptionDescription]
captionDescriptions :: Prelude.Maybe [CaptionDescription],
    -- | Feature Activations
    EncoderSettings -> Maybe FeatureActivations
featureActivations :: Prelude.Maybe FeatureActivations,
    -- | Configuration settings that apply to the event as a whole.
    EncoderSettings -> Maybe GlobalConfiguration
globalConfiguration :: Prelude.Maybe GlobalConfiguration,
    -- | Settings for motion graphics.
    EncoderSettings -> Maybe MotionGraphicsConfiguration
motionGraphicsConfiguration :: Prelude.Maybe MotionGraphicsConfiguration,
    -- | Nielsen configuration settings.
    EncoderSettings -> Maybe NielsenConfiguration
nielsenConfiguration :: Prelude.Maybe NielsenConfiguration,
    EncoderSettings -> [VideoDescription]
videoDescriptions :: [VideoDescription],
    EncoderSettings -> [AudioDescription]
audioDescriptions :: [AudioDescription],
    EncoderSettings -> [OutputGroup]
outputGroups :: [OutputGroup],
    -- | Contains settings used to acquire and adjust timecode information from
    -- inputs.
    EncoderSettings -> TimecodeConfig
timecodeConfig :: TimecodeConfig
  }
  deriving (EncoderSettings -> EncoderSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EncoderSettings -> EncoderSettings -> Bool
$c/= :: EncoderSettings -> EncoderSettings -> Bool
== :: EncoderSettings -> EncoderSettings -> Bool
$c== :: EncoderSettings -> EncoderSettings -> Bool
Prelude.Eq, ReadPrec [EncoderSettings]
ReadPrec EncoderSettings
Int -> ReadS EncoderSettings
ReadS [EncoderSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EncoderSettings]
$creadListPrec :: ReadPrec [EncoderSettings]
readPrec :: ReadPrec EncoderSettings
$creadPrec :: ReadPrec EncoderSettings
readList :: ReadS [EncoderSettings]
$creadList :: ReadS [EncoderSettings]
readsPrec :: Int -> ReadS EncoderSettings
$creadsPrec :: Int -> ReadS EncoderSettings
Prelude.Read, Int -> EncoderSettings -> ShowS
[EncoderSettings] -> ShowS
EncoderSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EncoderSettings] -> ShowS
$cshowList :: [EncoderSettings] -> ShowS
show :: EncoderSettings -> String
$cshow :: EncoderSettings -> String
showsPrec :: Int -> EncoderSettings -> ShowS
$cshowsPrec :: Int -> EncoderSettings -> ShowS
Prelude.Show, forall x. Rep EncoderSettings x -> EncoderSettings
forall x. EncoderSettings -> Rep EncoderSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EncoderSettings x -> EncoderSettings
$cfrom :: forall x. EncoderSettings -> Rep EncoderSettings x
Prelude.Generic)

-- |
-- Create a value of 'EncoderSettings' 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:
--
-- 'availBlanking', 'encoderSettings_availBlanking' - Settings for ad avail blanking.
--
-- 'availConfiguration', 'encoderSettings_availConfiguration' - Event-wide configuration settings for ad avail insertion.
--
-- 'blackoutSlate', 'encoderSettings_blackoutSlate' - Settings for blackout slate.
--
-- 'captionDescriptions', 'encoderSettings_captionDescriptions' - Settings for caption decriptions
--
-- 'featureActivations', 'encoderSettings_featureActivations' - Feature Activations
--
-- 'globalConfiguration', 'encoderSettings_globalConfiguration' - Configuration settings that apply to the event as a whole.
--
-- 'motionGraphicsConfiguration', 'encoderSettings_motionGraphicsConfiguration' - Settings for motion graphics.
--
-- 'nielsenConfiguration', 'encoderSettings_nielsenConfiguration' - Nielsen configuration settings.
--
-- 'videoDescriptions', 'encoderSettings_videoDescriptions' - Undocumented member.
--
-- 'audioDescriptions', 'encoderSettings_audioDescriptions' - Undocumented member.
--
-- 'outputGroups', 'encoderSettings_outputGroups' - Undocumented member.
--
-- 'timecodeConfig', 'encoderSettings_timecodeConfig' - Contains settings used to acquire and adjust timecode information from
-- inputs.
newEncoderSettings ::
  -- | 'timecodeConfig'
  TimecodeConfig ->
  EncoderSettings
newEncoderSettings :: TimecodeConfig -> EncoderSettings
newEncoderSettings TimecodeConfig
pTimecodeConfig_ =
  EncoderSettings'
    { $sel:availBlanking:EncoderSettings' :: Maybe AvailBlanking
availBlanking = forall a. Maybe a
Prelude.Nothing,
      $sel:availConfiguration:EncoderSettings' :: Maybe AvailConfiguration
availConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:blackoutSlate:EncoderSettings' :: Maybe BlackoutSlate
blackoutSlate = forall a. Maybe a
Prelude.Nothing,
      $sel:captionDescriptions:EncoderSettings' :: Maybe [CaptionDescription]
captionDescriptions = forall a. Maybe a
Prelude.Nothing,
      $sel:featureActivations:EncoderSettings' :: Maybe FeatureActivations
featureActivations = forall a. Maybe a
Prelude.Nothing,
      $sel:globalConfiguration:EncoderSettings' :: Maybe GlobalConfiguration
globalConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:motionGraphicsConfiguration:EncoderSettings' :: Maybe MotionGraphicsConfiguration
motionGraphicsConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:nielsenConfiguration:EncoderSettings' :: Maybe NielsenConfiguration
nielsenConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:videoDescriptions:EncoderSettings' :: [VideoDescription]
videoDescriptions = forall a. Monoid a => a
Prelude.mempty,
      $sel:audioDescriptions:EncoderSettings' :: [AudioDescription]
audioDescriptions = forall a. Monoid a => a
Prelude.mempty,
      $sel:outputGroups:EncoderSettings' :: [OutputGroup]
outputGroups = forall a. Monoid a => a
Prelude.mempty,
      $sel:timecodeConfig:EncoderSettings' :: TimecodeConfig
timecodeConfig = TimecodeConfig
pTimecodeConfig_
    }

-- | Settings for ad avail blanking.
encoderSettings_availBlanking :: Lens.Lens' EncoderSettings (Prelude.Maybe AvailBlanking)
encoderSettings_availBlanking :: Lens' EncoderSettings (Maybe AvailBlanking)
encoderSettings_availBlanking = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {Maybe AvailBlanking
availBlanking :: Maybe AvailBlanking
$sel:availBlanking:EncoderSettings' :: EncoderSettings -> Maybe AvailBlanking
availBlanking} -> Maybe AvailBlanking
availBlanking) (\s :: EncoderSettings
s@EncoderSettings' {} Maybe AvailBlanking
a -> EncoderSettings
s {$sel:availBlanking:EncoderSettings' :: Maybe AvailBlanking
availBlanking = Maybe AvailBlanking
a} :: EncoderSettings)

-- | Event-wide configuration settings for ad avail insertion.
encoderSettings_availConfiguration :: Lens.Lens' EncoderSettings (Prelude.Maybe AvailConfiguration)
encoderSettings_availConfiguration :: Lens' EncoderSettings (Maybe AvailConfiguration)
encoderSettings_availConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {Maybe AvailConfiguration
availConfiguration :: Maybe AvailConfiguration
$sel:availConfiguration:EncoderSettings' :: EncoderSettings -> Maybe AvailConfiguration
availConfiguration} -> Maybe AvailConfiguration
availConfiguration) (\s :: EncoderSettings
s@EncoderSettings' {} Maybe AvailConfiguration
a -> EncoderSettings
s {$sel:availConfiguration:EncoderSettings' :: Maybe AvailConfiguration
availConfiguration = Maybe AvailConfiguration
a} :: EncoderSettings)

-- | Settings for blackout slate.
encoderSettings_blackoutSlate :: Lens.Lens' EncoderSettings (Prelude.Maybe BlackoutSlate)
encoderSettings_blackoutSlate :: Lens' EncoderSettings (Maybe BlackoutSlate)
encoderSettings_blackoutSlate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {Maybe BlackoutSlate
blackoutSlate :: Maybe BlackoutSlate
$sel:blackoutSlate:EncoderSettings' :: EncoderSettings -> Maybe BlackoutSlate
blackoutSlate} -> Maybe BlackoutSlate
blackoutSlate) (\s :: EncoderSettings
s@EncoderSettings' {} Maybe BlackoutSlate
a -> EncoderSettings
s {$sel:blackoutSlate:EncoderSettings' :: Maybe BlackoutSlate
blackoutSlate = Maybe BlackoutSlate
a} :: EncoderSettings)

-- | Settings for caption decriptions
encoderSettings_captionDescriptions :: Lens.Lens' EncoderSettings (Prelude.Maybe [CaptionDescription])
encoderSettings_captionDescriptions :: Lens' EncoderSettings (Maybe [CaptionDescription])
encoderSettings_captionDescriptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {Maybe [CaptionDescription]
captionDescriptions :: Maybe [CaptionDescription]
$sel:captionDescriptions:EncoderSettings' :: EncoderSettings -> Maybe [CaptionDescription]
captionDescriptions} -> Maybe [CaptionDescription]
captionDescriptions) (\s :: EncoderSettings
s@EncoderSettings' {} Maybe [CaptionDescription]
a -> EncoderSettings
s {$sel:captionDescriptions:EncoderSettings' :: Maybe [CaptionDescription]
captionDescriptions = Maybe [CaptionDescription]
a} :: EncoderSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Feature Activations
encoderSettings_featureActivations :: Lens.Lens' EncoderSettings (Prelude.Maybe FeatureActivations)
encoderSettings_featureActivations :: Lens' EncoderSettings (Maybe FeatureActivations)
encoderSettings_featureActivations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {Maybe FeatureActivations
featureActivations :: Maybe FeatureActivations
$sel:featureActivations:EncoderSettings' :: EncoderSettings -> Maybe FeatureActivations
featureActivations} -> Maybe FeatureActivations
featureActivations) (\s :: EncoderSettings
s@EncoderSettings' {} Maybe FeatureActivations
a -> EncoderSettings
s {$sel:featureActivations:EncoderSettings' :: Maybe FeatureActivations
featureActivations = Maybe FeatureActivations
a} :: EncoderSettings)

-- | Configuration settings that apply to the event as a whole.
encoderSettings_globalConfiguration :: Lens.Lens' EncoderSettings (Prelude.Maybe GlobalConfiguration)
encoderSettings_globalConfiguration :: Lens' EncoderSettings (Maybe GlobalConfiguration)
encoderSettings_globalConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {Maybe GlobalConfiguration
globalConfiguration :: Maybe GlobalConfiguration
$sel:globalConfiguration:EncoderSettings' :: EncoderSettings -> Maybe GlobalConfiguration
globalConfiguration} -> Maybe GlobalConfiguration
globalConfiguration) (\s :: EncoderSettings
s@EncoderSettings' {} Maybe GlobalConfiguration
a -> EncoderSettings
s {$sel:globalConfiguration:EncoderSettings' :: Maybe GlobalConfiguration
globalConfiguration = Maybe GlobalConfiguration
a} :: EncoderSettings)

-- | Settings for motion graphics.
encoderSettings_motionGraphicsConfiguration :: Lens.Lens' EncoderSettings (Prelude.Maybe MotionGraphicsConfiguration)
encoderSettings_motionGraphicsConfiguration :: Lens' EncoderSettings (Maybe MotionGraphicsConfiguration)
encoderSettings_motionGraphicsConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {Maybe MotionGraphicsConfiguration
motionGraphicsConfiguration :: Maybe MotionGraphicsConfiguration
$sel:motionGraphicsConfiguration:EncoderSettings' :: EncoderSettings -> Maybe MotionGraphicsConfiguration
motionGraphicsConfiguration} -> Maybe MotionGraphicsConfiguration
motionGraphicsConfiguration) (\s :: EncoderSettings
s@EncoderSettings' {} Maybe MotionGraphicsConfiguration
a -> EncoderSettings
s {$sel:motionGraphicsConfiguration:EncoderSettings' :: Maybe MotionGraphicsConfiguration
motionGraphicsConfiguration = Maybe MotionGraphicsConfiguration
a} :: EncoderSettings)

-- | Nielsen configuration settings.
encoderSettings_nielsenConfiguration :: Lens.Lens' EncoderSettings (Prelude.Maybe NielsenConfiguration)
encoderSettings_nielsenConfiguration :: Lens' EncoderSettings (Maybe NielsenConfiguration)
encoderSettings_nielsenConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {Maybe NielsenConfiguration
nielsenConfiguration :: Maybe NielsenConfiguration
$sel:nielsenConfiguration:EncoderSettings' :: EncoderSettings -> Maybe NielsenConfiguration
nielsenConfiguration} -> Maybe NielsenConfiguration
nielsenConfiguration) (\s :: EncoderSettings
s@EncoderSettings' {} Maybe NielsenConfiguration
a -> EncoderSettings
s {$sel:nielsenConfiguration:EncoderSettings' :: Maybe NielsenConfiguration
nielsenConfiguration = Maybe NielsenConfiguration
a} :: EncoderSettings)

-- | Undocumented member.
encoderSettings_videoDescriptions :: Lens.Lens' EncoderSettings [VideoDescription]
encoderSettings_videoDescriptions :: Lens' EncoderSettings [VideoDescription]
encoderSettings_videoDescriptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {[VideoDescription]
videoDescriptions :: [VideoDescription]
$sel:videoDescriptions:EncoderSettings' :: EncoderSettings -> [VideoDescription]
videoDescriptions} -> [VideoDescription]
videoDescriptions) (\s :: EncoderSettings
s@EncoderSettings' {} [VideoDescription]
a -> EncoderSettings
s {$sel:videoDescriptions:EncoderSettings' :: [VideoDescription]
videoDescriptions = [VideoDescription]
a} :: EncoderSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
encoderSettings_audioDescriptions :: Lens.Lens' EncoderSettings [AudioDescription]
encoderSettings_audioDescriptions :: Lens' EncoderSettings [AudioDescription]
encoderSettings_audioDescriptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {[AudioDescription]
audioDescriptions :: [AudioDescription]
$sel:audioDescriptions:EncoderSettings' :: EncoderSettings -> [AudioDescription]
audioDescriptions} -> [AudioDescription]
audioDescriptions) (\s :: EncoderSettings
s@EncoderSettings' {} [AudioDescription]
a -> EncoderSettings
s {$sel:audioDescriptions:EncoderSettings' :: [AudioDescription]
audioDescriptions = [AudioDescription]
a} :: EncoderSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
encoderSettings_outputGroups :: Lens.Lens' EncoderSettings [OutputGroup]
encoderSettings_outputGroups :: Lens' EncoderSettings [OutputGroup]
encoderSettings_outputGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {[OutputGroup]
outputGroups :: [OutputGroup]
$sel:outputGroups:EncoderSettings' :: EncoderSettings -> [OutputGroup]
outputGroups} -> [OutputGroup]
outputGroups) (\s :: EncoderSettings
s@EncoderSettings' {} [OutputGroup]
a -> EncoderSettings
s {$sel:outputGroups:EncoderSettings' :: [OutputGroup]
outputGroups = [OutputGroup]
a} :: EncoderSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Contains settings used to acquire and adjust timecode information from
-- inputs.
encoderSettings_timecodeConfig :: Lens.Lens' EncoderSettings TimecodeConfig
encoderSettings_timecodeConfig :: Lens' EncoderSettings TimecodeConfig
encoderSettings_timecodeConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncoderSettings' {TimecodeConfig
timecodeConfig :: TimecodeConfig
$sel:timecodeConfig:EncoderSettings' :: EncoderSettings -> TimecodeConfig
timecodeConfig} -> TimecodeConfig
timecodeConfig) (\s :: EncoderSettings
s@EncoderSettings' {} TimecodeConfig
a -> EncoderSettings
s {$sel:timecodeConfig:EncoderSettings' :: TimecodeConfig
timecodeConfig = TimecodeConfig
a} :: EncoderSettings)

instance Data.FromJSON EncoderSettings where
  parseJSON :: Value -> Parser EncoderSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"EncoderSettings"
      ( \Object
x ->
          Maybe AvailBlanking
-> Maybe AvailConfiguration
-> Maybe BlackoutSlate
-> Maybe [CaptionDescription]
-> Maybe FeatureActivations
-> Maybe GlobalConfiguration
-> Maybe MotionGraphicsConfiguration
-> Maybe NielsenConfiguration
-> [VideoDescription]
-> [AudioDescription]
-> [OutputGroup]
-> TimecodeConfig
-> EncoderSettings
EncoderSettings'
            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
"availBlanking")
            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
"availConfiguration")
            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
"blackoutSlate")
            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
"captionDescriptions"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            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
"featureActivations")
            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
"globalConfiguration")
            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
"motionGraphicsConfiguration")
            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
"nielsenConfiguration")
            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
"videoDescriptions"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            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
"audioDescriptions"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            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
"outputGroups" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"timecodeConfig")
      )

instance Prelude.Hashable EncoderSettings where
  hashWithSalt :: Int -> EncoderSettings -> Int
hashWithSalt Int
_salt EncoderSettings' {[OutputGroup]
[VideoDescription]
[AudioDescription]
Maybe [CaptionDescription]
Maybe FeatureActivations
Maybe BlackoutSlate
Maybe AvailBlanking
Maybe GlobalConfiguration
Maybe MotionGraphicsConfiguration
Maybe NielsenConfiguration
Maybe AvailConfiguration
TimecodeConfig
timecodeConfig :: TimecodeConfig
outputGroups :: [OutputGroup]
audioDescriptions :: [AudioDescription]
videoDescriptions :: [VideoDescription]
nielsenConfiguration :: Maybe NielsenConfiguration
motionGraphicsConfiguration :: Maybe MotionGraphicsConfiguration
globalConfiguration :: Maybe GlobalConfiguration
featureActivations :: Maybe FeatureActivations
captionDescriptions :: Maybe [CaptionDescription]
blackoutSlate :: Maybe BlackoutSlate
availConfiguration :: Maybe AvailConfiguration
availBlanking :: Maybe AvailBlanking
$sel:timecodeConfig:EncoderSettings' :: EncoderSettings -> TimecodeConfig
$sel:outputGroups:EncoderSettings' :: EncoderSettings -> [OutputGroup]
$sel:audioDescriptions:EncoderSettings' :: EncoderSettings -> [AudioDescription]
$sel:videoDescriptions:EncoderSettings' :: EncoderSettings -> [VideoDescription]
$sel:nielsenConfiguration:EncoderSettings' :: EncoderSettings -> Maybe NielsenConfiguration
$sel:motionGraphicsConfiguration:EncoderSettings' :: EncoderSettings -> Maybe MotionGraphicsConfiguration
$sel:globalConfiguration:EncoderSettings' :: EncoderSettings -> Maybe GlobalConfiguration
$sel:featureActivations:EncoderSettings' :: EncoderSettings -> Maybe FeatureActivations
$sel:captionDescriptions:EncoderSettings' :: EncoderSettings -> Maybe [CaptionDescription]
$sel:blackoutSlate:EncoderSettings' :: EncoderSettings -> Maybe BlackoutSlate
$sel:availConfiguration:EncoderSettings' :: EncoderSettings -> Maybe AvailConfiguration
$sel:availBlanking:EncoderSettings' :: EncoderSettings -> Maybe AvailBlanking
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AvailBlanking
availBlanking
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AvailConfiguration
availConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BlackoutSlate
blackoutSlate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [CaptionDescription]
captionDescriptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FeatureActivations
featureActivations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GlobalConfiguration
globalConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MotionGraphicsConfiguration
motionGraphicsConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NielsenConfiguration
nielsenConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [VideoDescription]
videoDescriptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [AudioDescription]
audioDescriptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [OutputGroup]
outputGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TimecodeConfig
timecodeConfig

instance Prelude.NFData EncoderSettings where
  rnf :: EncoderSettings -> ()
rnf EncoderSettings' {[OutputGroup]
[VideoDescription]
[AudioDescription]
Maybe [CaptionDescription]
Maybe FeatureActivations
Maybe BlackoutSlate
Maybe AvailBlanking
Maybe GlobalConfiguration
Maybe MotionGraphicsConfiguration
Maybe NielsenConfiguration
Maybe AvailConfiguration
TimecodeConfig
timecodeConfig :: TimecodeConfig
outputGroups :: [OutputGroup]
audioDescriptions :: [AudioDescription]
videoDescriptions :: [VideoDescription]
nielsenConfiguration :: Maybe NielsenConfiguration
motionGraphicsConfiguration :: Maybe MotionGraphicsConfiguration
globalConfiguration :: Maybe GlobalConfiguration
featureActivations :: Maybe FeatureActivations
captionDescriptions :: Maybe [CaptionDescription]
blackoutSlate :: Maybe BlackoutSlate
availConfiguration :: Maybe AvailConfiguration
availBlanking :: Maybe AvailBlanking
$sel:timecodeConfig:EncoderSettings' :: EncoderSettings -> TimecodeConfig
$sel:outputGroups:EncoderSettings' :: EncoderSettings -> [OutputGroup]
$sel:audioDescriptions:EncoderSettings' :: EncoderSettings -> [AudioDescription]
$sel:videoDescriptions:EncoderSettings' :: EncoderSettings -> [VideoDescription]
$sel:nielsenConfiguration:EncoderSettings' :: EncoderSettings -> Maybe NielsenConfiguration
$sel:motionGraphicsConfiguration:EncoderSettings' :: EncoderSettings -> Maybe MotionGraphicsConfiguration
$sel:globalConfiguration:EncoderSettings' :: EncoderSettings -> Maybe GlobalConfiguration
$sel:featureActivations:EncoderSettings' :: EncoderSettings -> Maybe FeatureActivations
$sel:captionDescriptions:EncoderSettings' :: EncoderSettings -> Maybe [CaptionDescription]
$sel:blackoutSlate:EncoderSettings' :: EncoderSettings -> Maybe BlackoutSlate
$sel:availConfiguration:EncoderSettings' :: EncoderSettings -> Maybe AvailConfiguration
$sel:availBlanking:EncoderSettings' :: EncoderSettings -> Maybe AvailBlanking
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AvailBlanking
availBlanking
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AvailConfiguration
availConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BlackoutSlate
blackoutSlate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [CaptionDescription]
captionDescriptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FeatureActivations
featureActivations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe GlobalConfiguration
globalConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MotionGraphicsConfiguration
motionGraphicsConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NielsenConfiguration
nielsenConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [VideoDescription]
videoDescriptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [AudioDescription]
audioDescriptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [OutputGroup]
outputGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TimecodeConfig
timecodeConfig

instance Data.ToJSON EncoderSettings where
  toJSON :: EncoderSettings -> Value
toJSON EncoderSettings' {[OutputGroup]
[VideoDescription]
[AudioDescription]
Maybe [CaptionDescription]
Maybe FeatureActivations
Maybe BlackoutSlate
Maybe AvailBlanking
Maybe GlobalConfiguration
Maybe MotionGraphicsConfiguration
Maybe NielsenConfiguration
Maybe AvailConfiguration
TimecodeConfig
timecodeConfig :: TimecodeConfig
outputGroups :: [OutputGroup]
audioDescriptions :: [AudioDescription]
videoDescriptions :: [VideoDescription]
nielsenConfiguration :: Maybe NielsenConfiguration
motionGraphicsConfiguration :: Maybe MotionGraphicsConfiguration
globalConfiguration :: Maybe GlobalConfiguration
featureActivations :: Maybe FeatureActivations
captionDescriptions :: Maybe [CaptionDescription]
blackoutSlate :: Maybe BlackoutSlate
availConfiguration :: Maybe AvailConfiguration
availBlanking :: Maybe AvailBlanking
$sel:timecodeConfig:EncoderSettings' :: EncoderSettings -> TimecodeConfig
$sel:outputGroups:EncoderSettings' :: EncoderSettings -> [OutputGroup]
$sel:audioDescriptions:EncoderSettings' :: EncoderSettings -> [AudioDescription]
$sel:videoDescriptions:EncoderSettings' :: EncoderSettings -> [VideoDescription]
$sel:nielsenConfiguration:EncoderSettings' :: EncoderSettings -> Maybe NielsenConfiguration
$sel:motionGraphicsConfiguration:EncoderSettings' :: EncoderSettings -> Maybe MotionGraphicsConfiguration
$sel:globalConfiguration:EncoderSettings' :: EncoderSettings -> Maybe GlobalConfiguration
$sel:featureActivations:EncoderSettings' :: EncoderSettings -> Maybe FeatureActivations
$sel:captionDescriptions:EncoderSettings' :: EncoderSettings -> Maybe [CaptionDescription]
$sel:blackoutSlate:EncoderSettings' :: EncoderSettings -> Maybe BlackoutSlate
$sel:availConfiguration:EncoderSettings' :: EncoderSettings -> Maybe AvailConfiguration
$sel:availBlanking:EncoderSettings' :: EncoderSettings -> Maybe AvailBlanking
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"availBlanking" 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 AvailBlanking
availBlanking,
            (Key
"availConfiguration" 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 AvailConfiguration
availConfiguration,
            (Key
"blackoutSlate" 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 BlackoutSlate
blackoutSlate,
            (Key
"captionDescriptions" 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 [CaptionDescription]
captionDescriptions,
            (Key
"featureActivations" 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 FeatureActivations
featureActivations,
            (Key
"globalConfiguration" 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 GlobalConfiguration
globalConfiguration,
            (Key
"motionGraphicsConfiguration" 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 MotionGraphicsConfiguration
motionGraphicsConfiguration,
            (Key
"nielsenConfiguration" 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 NielsenConfiguration
nielsenConfiguration,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"videoDescriptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [VideoDescription]
videoDescriptions),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"audioDescriptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [AudioDescription]
audioDescriptions),
            forall a. a -> Maybe a
Prelude.Just (Key
"outputGroups" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [OutputGroup]
outputGroups),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"timecodeConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= TimecodeConfig
timecodeConfig)
          ]
      )