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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 caption decriptions
    EncoderSettings -> Maybe [CaptionDescription]
captionDescriptions :: Prelude.Maybe [CaptionDescription],
    -- | Event-wide configuration settings for ad avail insertion.
    EncoderSettings -> Maybe AvailConfiguration
availConfiguration :: Prelude.Maybe AvailConfiguration,
    -- | Feature Activations
    EncoderSettings -> Maybe FeatureActivations
featureActivations :: Prelude.Maybe FeatureActivations,
    -- | Nielsen configuration settings.
    EncoderSettings -> Maybe NielsenConfiguration
nielsenConfiguration :: Prelude.Maybe NielsenConfiguration,
    -- | Settings for ad avail blanking.
    EncoderSettings -> Maybe AvailBlanking
availBlanking :: Prelude.Maybe AvailBlanking,
    -- | 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,
    -- | Settings for blackout slate.
    EncoderSettings -> Maybe BlackoutSlate
blackoutSlate :: Prelude.Maybe BlackoutSlate,
    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
(EncoderSettings -> EncoderSettings -> Bool)
-> (EncoderSettings -> EncoderSettings -> Bool)
-> Eq EncoderSettings
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]
(Int -> ReadS EncoderSettings)
-> ReadS [EncoderSettings]
-> ReadPrec EncoderSettings
-> ReadPrec [EncoderSettings]
-> Read 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
(Int -> EncoderSettings -> ShowS)
-> (EncoderSettings -> String)
-> ([EncoderSettings] -> ShowS)
-> Show EncoderSettings
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. EncoderSettings -> Rep EncoderSettings x)
-> (forall x. Rep EncoderSettings x -> EncoderSettings)
-> Generic EncoderSettings
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:
--
-- 'captionDescriptions', 'encoderSettings_captionDescriptions' - Settings for caption decriptions
--
-- 'availConfiguration', 'encoderSettings_availConfiguration' - Event-wide configuration settings for ad avail insertion.
--
-- 'featureActivations', 'encoderSettings_featureActivations' - Feature Activations
--
-- 'nielsenConfiguration', 'encoderSettings_nielsenConfiguration' - Nielsen configuration settings.
--
-- 'availBlanking', 'encoderSettings_availBlanking' - Settings for ad avail blanking.
--
-- 'globalConfiguration', 'encoderSettings_globalConfiguration' - Configuration settings that apply to the event as a whole.
--
-- 'motionGraphicsConfiguration', 'encoderSettings_motionGraphicsConfiguration' - Settings for motion graphics.
--
-- 'blackoutSlate', 'encoderSettings_blackoutSlate' - Settings for blackout slate.
--
-- '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' :: Maybe [CaptionDescription]
-> Maybe AvailConfiguration
-> Maybe FeatureActivations
-> Maybe NielsenConfiguration
-> Maybe AvailBlanking
-> Maybe GlobalConfiguration
-> Maybe MotionGraphicsConfiguration
-> Maybe BlackoutSlate
-> [VideoDescription]
-> [AudioDescription]
-> [OutputGroup]
-> TimecodeConfig
-> EncoderSettings
EncoderSettings'
    { $sel:captionDescriptions:EncoderSettings' :: Maybe [CaptionDescription]
captionDescriptions =
        Maybe [CaptionDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:availConfiguration:EncoderSettings' :: Maybe AvailConfiguration
availConfiguration = Maybe AvailConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:featureActivations:EncoderSettings' :: Maybe FeatureActivations
featureActivations = Maybe FeatureActivations
forall a. Maybe a
Prelude.Nothing,
      $sel:nielsenConfiguration:EncoderSettings' :: Maybe NielsenConfiguration
nielsenConfiguration = Maybe NielsenConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:availBlanking:EncoderSettings' :: Maybe AvailBlanking
availBlanking = Maybe AvailBlanking
forall a. Maybe a
Prelude.Nothing,
      $sel:globalConfiguration:EncoderSettings' :: Maybe GlobalConfiguration
globalConfiguration = Maybe GlobalConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:motionGraphicsConfiguration:EncoderSettings' :: Maybe MotionGraphicsConfiguration
motionGraphicsConfiguration = Maybe MotionGraphicsConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:blackoutSlate:EncoderSettings' :: Maybe BlackoutSlate
blackoutSlate = Maybe BlackoutSlate
forall a. Maybe a
Prelude.Nothing,
      $sel:videoDescriptions:EncoderSettings' :: [VideoDescription]
videoDescriptions = [VideoDescription]
forall a. Monoid a => a
Prelude.mempty,
      $sel:audioDescriptions:EncoderSettings' :: [AudioDescription]
audioDescriptions = [AudioDescription]
forall a. Monoid a => a
Prelude.mempty,
      $sel:outputGroups:EncoderSettings' :: [OutputGroup]
outputGroups = [OutputGroup]
forall a. Monoid a => a
Prelude.mempty,
      $sel:timecodeConfig:EncoderSettings' :: TimecodeConfig
timecodeConfig = TimecodeConfig
pTimecodeConfig_
    }

-- | Settings for caption decriptions
encoderSettings_captionDescriptions :: Lens.Lens' EncoderSettings (Prelude.Maybe [CaptionDescription])
encoderSettings_captionDescriptions :: (Maybe [CaptionDescription] -> f (Maybe [CaptionDescription]))
-> EncoderSettings -> f EncoderSettings
encoderSettings_captionDescriptions = (EncoderSettings -> Maybe [CaptionDescription])
-> (EncoderSettings
    -> Maybe [CaptionDescription] -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     (Maybe [CaptionDescription])
     (Maybe [CaptionDescription])
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) ((Maybe [CaptionDescription] -> f (Maybe [CaptionDescription]))
 -> EncoderSettings -> f EncoderSettings)
-> ((Maybe [CaptionDescription] -> f (Maybe [CaptionDescription]))
    -> Maybe [CaptionDescription] -> f (Maybe [CaptionDescription]))
-> (Maybe [CaptionDescription] -> f (Maybe [CaptionDescription]))
-> EncoderSettings
-> f EncoderSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CaptionDescription]
  [CaptionDescription]
  [CaptionDescription]
  [CaptionDescription]
-> Iso
     (Maybe [CaptionDescription])
     (Maybe [CaptionDescription])
     (Maybe [CaptionDescription])
     (Maybe [CaptionDescription])
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 AnIso
  [CaptionDescription]
  [CaptionDescription]
  [CaptionDescription]
  [CaptionDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Event-wide configuration settings for ad avail insertion.
encoderSettings_availConfiguration :: Lens.Lens' EncoderSettings (Prelude.Maybe AvailConfiguration)
encoderSettings_availConfiguration :: (Maybe AvailConfiguration -> f (Maybe AvailConfiguration))
-> EncoderSettings -> f EncoderSettings
encoderSettings_availConfiguration = (EncoderSettings -> Maybe AvailConfiguration)
-> (EncoderSettings -> Maybe AvailConfiguration -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     (Maybe AvailConfiguration)
     (Maybe 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)

-- | Feature Activations
encoderSettings_featureActivations :: Lens.Lens' EncoderSettings (Prelude.Maybe FeatureActivations)
encoderSettings_featureActivations :: (Maybe FeatureActivations -> f (Maybe FeatureActivations))
-> EncoderSettings -> f EncoderSettings
encoderSettings_featureActivations = (EncoderSettings -> Maybe FeatureActivations)
-> (EncoderSettings -> Maybe FeatureActivations -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     (Maybe FeatureActivations)
     (Maybe 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)

-- | Nielsen configuration settings.
encoderSettings_nielsenConfiguration :: Lens.Lens' EncoderSettings (Prelude.Maybe NielsenConfiguration)
encoderSettings_nielsenConfiguration :: (Maybe NielsenConfiguration -> f (Maybe NielsenConfiguration))
-> EncoderSettings -> f EncoderSettings
encoderSettings_nielsenConfiguration = (EncoderSettings -> Maybe NielsenConfiguration)
-> (EncoderSettings
    -> Maybe NielsenConfiguration -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     (Maybe NielsenConfiguration)
     (Maybe 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)

-- | Settings for ad avail blanking.
encoderSettings_availBlanking :: Lens.Lens' EncoderSettings (Prelude.Maybe AvailBlanking)
encoderSettings_availBlanking :: (Maybe AvailBlanking -> f (Maybe AvailBlanking))
-> EncoderSettings -> f EncoderSettings
encoderSettings_availBlanking = (EncoderSettings -> Maybe AvailBlanking)
-> (EncoderSettings -> Maybe AvailBlanking -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     (Maybe AvailBlanking)
     (Maybe 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)

-- | Configuration settings that apply to the event as a whole.
encoderSettings_globalConfiguration :: Lens.Lens' EncoderSettings (Prelude.Maybe GlobalConfiguration)
encoderSettings_globalConfiguration :: (Maybe GlobalConfiguration -> f (Maybe GlobalConfiguration))
-> EncoderSettings -> f EncoderSettings
encoderSettings_globalConfiguration = (EncoderSettings -> Maybe GlobalConfiguration)
-> (EncoderSettings
    -> Maybe GlobalConfiguration -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     (Maybe GlobalConfiguration)
     (Maybe 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 :: (Maybe MotionGraphicsConfiguration
 -> f (Maybe MotionGraphicsConfiguration))
-> EncoderSettings -> f EncoderSettings
encoderSettings_motionGraphicsConfiguration = (EncoderSettings -> Maybe MotionGraphicsConfiguration)
-> (EncoderSettings
    -> Maybe MotionGraphicsConfiguration -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     (Maybe MotionGraphicsConfiguration)
     (Maybe 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)

-- | Settings for blackout slate.
encoderSettings_blackoutSlate :: Lens.Lens' EncoderSettings (Prelude.Maybe BlackoutSlate)
encoderSettings_blackoutSlate :: (Maybe BlackoutSlate -> f (Maybe BlackoutSlate))
-> EncoderSettings -> f EncoderSettings
encoderSettings_blackoutSlate = (EncoderSettings -> Maybe BlackoutSlate)
-> (EncoderSettings -> Maybe BlackoutSlate -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     (Maybe BlackoutSlate)
     (Maybe 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)

-- | Undocumented member.
encoderSettings_videoDescriptions :: Lens.Lens' EncoderSettings [VideoDescription]
encoderSettings_videoDescriptions :: ([VideoDescription] -> f [VideoDescription])
-> EncoderSettings -> f EncoderSettings
encoderSettings_videoDescriptions = (EncoderSettings -> [VideoDescription])
-> (EncoderSettings -> [VideoDescription] -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     [VideoDescription]
     [VideoDescription]
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) (([VideoDescription] -> f [VideoDescription])
 -> EncoderSettings -> f EncoderSettings)
-> (([VideoDescription] -> f [VideoDescription])
    -> [VideoDescription] -> f [VideoDescription])
-> ([VideoDescription] -> f [VideoDescription])
-> EncoderSettings
-> f EncoderSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([VideoDescription] -> f [VideoDescription])
-> [VideoDescription] -> f [VideoDescription]
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 :: ([AudioDescription] -> f [AudioDescription])
-> EncoderSettings -> f EncoderSettings
encoderSettings_audioDescriptions = (EncoderSettings -> [AudioDescription])
-> (EncoderSettings -> [AudioDescription] -> EncoderSettings)
-> Lens
     EncoderSettings
     EncoderSettings
     [AudioDescription]
     [AudioDescription]
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) (([AudioDescription] -> f [AudioDescription])
 -> EncoderSettings -> f EncoderSettings)
-> (([AudioDescription] -> f [AudioDescription])
    -> [AudioDescription] -> f [AudioDescription])
-> ([AudioDescription] -> f [AudioDescription])
-> EncoderSettings
-> f EncoderSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AudioDescription] -> f [AudioDescription])
-> [AudioDescription] -> f [AudioDescription]
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 :: ([OutputGroup] -> f [OutputGroup])
-> EncoderSettings -> f EncoderSettings
encoderSettings_outputGroups = (EncoderSettings -> [OutputGroup])
-> (EncoderSettings -> [OutputGroup] -> EncoderSettings)
-> Lens EncoderSettings EncoderSettings [OutputGroup] [OutputGroup]
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) (([OutputGroup] -> f [OutputGroup])
 -> EncoderSettings -> f EncoderSettings)
-> (([OutputGroup] -> f [OutputGroup])
    -> [OutputGroup] -> f [OutputGroup])
-> ([OutputGroup] -> f [OutputGroup])
-> EncoderSettings
-> f EncoderSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([OutputGroup] -> f [OutputGroup])
-> [OutputGroup] -> f [OutputGroup]
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 :: (TimecodeConfig -> f TimecodeConfig)
-> EncoderSettings -> f EncoderSettings
encoderSettings_timecodeConfig = (EncoderSettings -> TimecodeConfig)
-> (EncoderSettings -> TimecodeConfig -> EncoderSettings)
-> Lens
     EncoderSettings EncoderSettings TimecodeConfig 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 Core.FromJSON EncoderSettings where
  parseJSON :: Value -> Parser EncoderSettings
parseJSON =
    String
-> (Object -> Parser EncoderSettings)
-> Value
-> Parser EncoderSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EncoderSettings"
      ( \Object
x ->
          Maybe [CaptionDescription]
-> Maybe AvailConfiguration
-> Maybe FeatureActivations
-> Maybe NielsenConfiguration
-> Maybe AvailBlanking
-> Maybe GlobalConfiguration
-> Maybe MotionGraphicsConfiguration
-> Maybe BlackoutSlate
-> [VideoDescription]
-> [AudioDescription]
-> [OutputGroup]
-> TimecodeConfig
-> EncoderSettings
EncoderSettings'
            (Maybe [CaptionDescription]
 -> Maybe AvailConfiguration
 -> Maybe FeatureActivations
 -> Maybe NielsenConfiguration
 -> Maybe AvailBlanking
 -> Maybe GlobalConfiguration
 -> Maybe MotionGraphicsConfiguration
 -> Maybe BlackoutSlate
 -> [VideoDescription]
 -> [AudioDescription]
 -> [OutputGroup]
 -> TimecodeConfig
 -> EncoderSettings)
-> Parser (Maybe [CaptionDescription])
-> Parser
     (Maybe AvailConfiguration
      -> Maybe FeatureActivations
      -> Maybe NielsenConfiguration
      -> Maybe AvailBlanking
      -> Maybe GlobalConfiguration
      -> Maybe MotionGraphicsConfiguration
      -> Maybe BlackoutSlate
      -> [VideoDescription]
      -> [AudioDescription]
      -> [OutputGroup]
      -> TimecodeConfig
      -> EncoderSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [CaptionDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"captionDescriptions"
                            Parser (Maybe (Maybe [CaptionDescription]))
-> Maybe [CaptionDescription]
-> Parser (Maybe [CaptionDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [CaptionDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe AvailConfiguration
   -> Maybe FeatureActivations
   -> Maybe NielsenConfiguration
   -> Maybe AvailBlanking
   -> Maybe GlobalConfiguration
   -> Maybe MotionGraphicsConfiguration
   -> Maybe BlackoutSlate
   -> [VideoDescription]
   -> [AudioDescription]
   -> [OutputGroup]
   -> TimecodeConfig
   -> EncoderSettings)
-> Parser (Maybe AvailConfiguration)
-> Parser
     (Maybe FeatureActivations
      -> Maybe NielsenConfiguration
      -> Maybe AvailBlanking
      -> Maybe GlobalConfiguration
      -> Maybe MotionGraphicsConfiguration
      -> Maybe BlackoutSlate
      -> [VideoDescription]
      -> [AudioDescription]
      -> [OutputGroup]
      -> TimecodeConfig
      -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AvailConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"availConfiguration")
            Parser
  (Maybe FeatureActivations
   -> Maybe NielsenConfiguration
   -> Maybe AvailBlanking
   -> Maybe GlobalConfiguration
   -> Maybe MotionGraphicsConfiguration
   -> Maybe BlackoutSlate
   -> [VideoDescription]
   -> [AudioDescription]
   -> [OutputGroup]
   -> TimecodeConfig
   -> EncoderSettings)
-> Parser (Maybe FeatureActivations)
-> Parser
     (Maybe NielsenConfiguration
      -> Maybe AvailBlanking
      -> Maybe GlobalConfiguration
      -> Maybe MotionGraphicsConfiguration
      -> Maybe BlackoutSlate
      -> [VideoDescription]
      -> [AudioDescription]
      -> [OutputGroup]
      -> TimecodeConfig
      -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FeatureActivations)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"featureActivations")
            Parser
  (Maybe NielsenConfiguration
   -> Maybe AvailBlanking
   -> Maybe GlobalConfiguration
   -> Maybe MotionGraphicsConfiguration
   -> Maybe BlackoutSlate
   -> [VideoDescription]
   -> [AudioDescription]
   -> [OutputGroup]
   -> TimecodeConfig
   -> EncoderSettings)
-> Parser (Maybe NielsenConfiguration)
-> Parser
     (Maybe AvailBlanking
      -> Maybe GlobalConfiguration
      -> Maybe MotionGraphicsConfiguration
      -> Maybe BlackoutSlate
      -> [VideoDescription]
      -> [AudioDescription]
      -> [OutputGroup]
      -> TimecodeConfig
      -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NielsenConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nielsenConfiguration")
            Parser
  (Maybe AvailBlanking
   -> Maybe GlobalConfiguration
   -> Maybe MotionGraphicsConfiguration
   -> Maybe BlackoutSlate
   -> [VideoDescription]
   -> [AudioDescription]
   -> [OutputGroup]
   -> TimecodeConfig
   -> EncoderSettings)
-> Parser (Maybe AvailBlanking)
-> Parser
     (Maybe GlobalConfiguration
      -> Maybe MotionGraphicsConfiguration
      -> Maybe BlackoutSlate
      -> [VideoDescription]
      -> [AudioDescription]
      -> [OutputGroup]
      -> TimecodeConfig
      -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AvailBlanking)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"availBlanking")
            Parser
  (Maybe GlobalConfiguration
   -> Maybe MotionGraphicsConfiguration
   -> Maybe BlackoutSlate
   -> [VideoDescription]
   -> [AudioDescription]
   -> [OutputGroup]
   -> TimecodeConfig
   -> EncoderSettings)
-> Parser (Maybe GlobalConfiguration)
-> Parser
     (Maybe MotionGraphicsConfiguration
      -> Maybe BlackoutSlate
      -> [VideoDescription]
      -> [AudioDescription]
      -> [OutputGroup]
      -> TimecodeConfig
      -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GlobalConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"globalConfiguration")
            Parser
  (Maybe MotionGraphicsConfiguration
   -> Maybe BlackoutSlate
   -> [VideoDescription]
   -> [AudioDescription]
   -> [OutputGroup]
   -> TimecodeConfig
   -> EncoderSettings)
-> Parser (Maybe MotionGraphicsConfiguration)
-> Parser
     (Maybe BlackoutSlate
      -> [VideoDescription]
      -> [AudioDescription]
      -> [OutputGroup]
      -> TimecodeConfig
      -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MotionGraphicsConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"motionGraphicsConfiguration")
            Parser
  (Maybe BlackoutSlate
   -> [VideoDescription]
   -> [AudioDescription]
   -> [OutputGroup]
   -> TimecodeConfig
   -> EncoderSettings)
-> Parser (Maybe BlackoutSlate)
-> Parser
     ([VideoDescription]
      -> [AudioDescription]
      -> [OutputGroup]
      -> TimecodeConfig
      -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BlackoutSlate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"blackoutSlate")
            Parser
  ([VideoDescription]
   -> [AudioDescription]
   -> [OutputGroup]
   -> TimecodeConfig
   -> EncoderSettings)
-> Parser [VideoDescription]
-> Parser
     ([AudioDescription]
      -> [OutputGroup] -> TimecodeConfig -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe [VideoDescription])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"videoDescriptions"
                            Parser (Maybe [VideoDescription])
-> [VideoDescription] -> Parser [VideoDescription]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [VideoDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  ([AudioDescription]
   -> [OutputGroup] -> TimecodeConfig -> EncoderSettings)
-> Parser [AudioDescription]
-> Parser ([OutputGroup] -> TimecodeConfig -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe [AudioDescription])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioDescriptions"
                            Parser (Maybe [AudioDescription])
-> [AudioDescription] -> Parser [AudioDescription]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [AudioDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser ([OutputGroup] -> TimecodeConfig -> EncoderSettings)
-> Parser [OutputGroup]
-> Parser (TimecodeConfig -> EncoderSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [OutputGroup])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputGroups" Parser (Maybe [OutputGroup])
-> [OutputGroup] -> Parser [OutputGroup]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [OutputGroup]
forall a. Monoid a => a
Prelude.mempty)
            Parser (TimecodeConfig -> EncoderSettings)
-> Parser TimecodeConfig -> Parser EncoderSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser TimecodeConfig
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"timecodeConfig")
      )

instance Prelude.Hashable EncoderSettings

instance Prelude.NFData EncoderSettings

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