{-# 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.JobTemplateSettings
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.JobTemplateSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.AvailBlanking
import Amazonka.MediaConvert.Types.EsamSettings
import Amazonka.MediaConvert.Types.ExtendedDataServices
import Amazonka.MediaConvert.Types.InputTemplate
import Amazonka.MediaConvert.Types.KantarWatermarkSettings
import Amazonka.MediaConvert.Types.MotionImageInserter
import Amazonka.MediaConvert.Types.NielsenConfiguration
import Amazonka.MediaConvert.Types.NielsenNonLinearWatermarkSettings
import Amazonka.MediaConvert.Types.OutputGroup
import Amazonka.MediaConvert.Types.TimecodeConfig
import Amazonka.MediaConvert.Types.TimedMetadataInsertion
import qualified Amazonka.Prelude as Prelude

-- | JobTemplateSettings contains all the transcode settings saved in the
-- template that will be applied to jobs created from it.
--
-- /See:/ 'newJobTemplateSettings' smart constructor.
data JobTemplateSettings = JobTemplateSettings'
  { -- | Ignore these settings unless you are using Nielsen non-linear
    -- watermarking. Specify the values that MediaConvert uses to generate and
    -- place Nielsen watermarks in your output audio. In addition to specifying
    -- these values, you also need to set up your cloud TIC server. These
    -- settings apply to every output in your job. The MediaConvert
    -- implementation is currently with the following Nielsen versions: Nielsen
    -- Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7
    -- Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
    JobTemplateSettings -> Maybe NielsenNonLinearWatermarkSettings
nielsenNonLinearWatermark :: Prelude.Maybe NielsenNonLinearWatermarkSettings,
    -- | Settings for Event Signaling And Messaging (ESAM). If you don\'t do ad
    -- insertion, you can ignore these settings.
    JobTemplateSettings -> Maybe EsamSettings
esam :: Prelude.Maybe EsamSettings,
    -- | Use Inputs (inputs) to define the source file used in the transcode job.
    -- There can only be one input in a job template. Using the API, you can
    -- include multiple inputs when referencing a job template.
    JobTemplateSettings -> Maybe [InputTemplate]
inputs :: Prelude.Maybe [InputTemplate],
    -- | Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3
    -- tags in any HLS outputs. To include timed metadata, you must enable it
    -- here, enable it in each output container, and specify tags and timecodes
    -- in ID3 insertion (Id3Insertion) objects.
    JobTemplateSettings -> Maybe TimedMetadataInsertion
timedMetadataInsertion :: Prelude.Maybe TimedMetadataInsertion,
    -- | Settings for your Nielsen configuration. If you don\'t do Nielsen
    -- measurement and analytics, ignore these settings. When you enable
    -- Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM
    -- to ID3 tagging for all outputs in the job. To enable Nielsen
    -- configuration programmatically, include an instance of
    -- nielsenConfiguration in your JSON job specification. Even if you don\'t
    -- include any children of nielsenConfiguration, you still enable the
    -- setting.
    JobTemplateSettings -> Maybe NielsenConfiguration
nielsenConfiguration :: Prelude.Maybe NielsenConfiguration,
    -- | Settings for ad avail blanking. Video can be blanked or overlaid with an
    -- image, and audio muted during SCTE-35 triggered ad avails.
    JobTemplateSettings -> Maybe AvailBlanking
availBlanking :: Prelude.Maybe AvailBlanking,
    -- | If your source content has EIA-608 Line 21 Data Services, enable this
    -- feature to specify what MediaConvert does with the Extended Data
    -- Services (XDS) packets. You can choose to pass through XDS packets, or
    -- remove them from the output. For more information about XDS, see EIA-608
    -- Line Data Services, section 9.5.1.5 05h Content Advisory.
    JobTemplateSettings -> Maybe ExtendedDataServices
extendedDataServices :: Prelude.Maybe ExtendedDataServices,
    -- | Overlay motion graphics on top of your video. The motion graphics that
    -- you specify here appear on all outputs in all output groups. For more
    -- information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/motion-graphic-overlay.html.
    JobTemplateSettings -> Maybe MotionImageInserter
motionImageInserter :: Prelude.Maybe MotionImageInserter,
    -- | These settings control how the service handles timecodes throughout the
    -- job. These settings don\'t affect input clipping.
    JobTemplateSettings -> Maybe TimecodeConfig
timecodeConfig :: Prelude.Maybe TimecodeConfig,
    -- | (OutputGroups) contains one group of settings for each set of outputs
    -- that share a common package type. All unpackaged files (MPEG-4, MPEG-2
    -- TS, Quicktime, MXF, and no container) are grouped in a single output
    -- group as well. Required in (OutputGroups) is a group of settings that
    -- apply to the whole group. This required object depends on the value you
    -- set for (Type) under (OutputGroups)>(OutputGroupSettings). Type,
    -- settings object pairs are as follows. * FILE_GROUP_SETTINGS,
    -- FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings *
    -- DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings *
    -- MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS,
    -- CmafGroupSettings
    JobTemplateSettings -> Maybe [OutputGroup]
outputGroups :: Prelude.Maybe [OutputGroup],
    -- | When specified, this offset (in milliseconds) is added to the input Ad
    -- Avail PTS time.
    JobTemplateSettings -> Maybe Int
adAvailOffset :: Prelude.Maybe Prelude.Int,
    -- | Use these settings only when you use Kantar watermarking. Specify the
    -- values that MediaConvert uses to generate and place Kantar watermarks in
    -- your output audio. These settings apply to every output in your job. In
    -- addition to specifying these values, you also need to store your Kantar
    -- credentials in AWS Secrets Manager. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/kantar-watermarking.html.
    JobTemplateSettings -> Maybe KantarWatermarkSettings
kantarWatermark :: Prelude.Maybe KantarWatermarkSettings
  }
  deriving (JobTemplateSettings -> JobTemplateSettings -> Bool
(JobTemplateSettings -> JobTemplateSettings -> Bool)
-> (JobTemplateSettings -> JobTemplateSettings -> Bool)
-> Eq JobTemplateSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobTemplateSettings -> JobTemplateSettings -> Bool
$c/= :: JobTemplateSettings -> JobTemplateSettings -> Bool
== :: JobTemplateSettings -> JobTemplateSettings -> Bool
$c== :: JobTemplateSettings -> JobTemplateSettings -> Bool
Prelude.Eq, ReadPrec [JobTemplateSettings]
ReadPrec JobTemplateSettings
Int -> ReadS JobTemplateSettings
ReadS [JobTemplateSettings]
(Int -> ReadS JobTemplateSettings)
-> ReadS [JobTemplateSettings]
-> ReadPrec JobTemplateSettings
-> ReadPrec [JobTemplateSettings]
-> Read JobTemplateSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobTemplateSettings]
$creadListPrec :: ReadPrec [JobTemplateSettings]
readPrec :: ReadPrec JobTemplateSettings
$creadPrec :: ReadPrec JobTemplateSettings
readList :: ReadS [JobTemplateSettings]
$creadList :: ReadS [JobTemplateSettings]
readsPrec :: Int -> ReadS JobTemplateSettings
$creadsPrec :: Int -> ReadS JobTemplateSettings
Prelude.Read, Int -> JobTemplateSettings -> ShowS
[JobTemplateSettings] -> ShowS
JobTemplateSettings -> String
(Int -> JobTemplateSettings -> ShowS)
-> (JobTemplateSettings -> String)
-> ([JobTemplateSettings] -> ShowS)
-> Show JobTemplateSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobTemplateSettings] -> ShowS
$cshowList :: [JobTemplateSettings] -> ShowS
show :: JobTemplateSettings -> String
$cshow :: JobTemplateSettings -> String
showsPrec :: Int -> JobTemplateSettings -> ShowS
$cshowsPrec :: Int -> JobTemplateSettings -> ShowS
Prelude.Show, (forall x. JobTemplateSettings -> Rep JobTemplateSettings x)
-> (forall x. Rep JobTemplateSettings x -> JobTemplateSettings)
-> Generic JobTemplateSettings
forall x. Rep JobTemplateSettings x -> JobTemplateSettings
forall x. JobTemplateSettings -> Rep JobTemplateSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobTemplateSettings x -> JobTemplateSettings
$cfrom :: forall x. JobTemplateSettings -> Rep JobTemplateSettings x
Prelude.Generic)

-- |
-- Create a value of 'JobTemplateSettings' 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:
--
-- 'nielsenNonLinearWatermark', 'jobTemplateSettings_nielsenNonLinearWatermark' - Ignore these settings unless you are using Nielsen non-linear
-- watermarking. Specify the values that MediaConvert uses to generate and
-- place Nielsen watermarks in your output audio. In addition to specifying
-- these values, you also need to set up your cloud TIC server. These
-- settings apply to every output in your job. The MediaConvert
-- implementation is currently with the following Nielsen versions: Nielsen
-- Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7
-- Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
--
-- 'esam', 'jobTemplateSettings_esam' - Settings for Event Signaling And Messaging (ESAM). If you don\'t do ad
-- insertion, you can ignore these settings.
--
-- 'inputs', 'jobTemplateSettings_inputs' - Use Inputs (inputs) to define the source file used in the transcode job.
-- There can only be one input in a job template. Using the API, you can
-- include multiple inputs when referencing a job template.
--
-- 'timedMetadataInsertion', 'jobTemplateSettings_timedMetadataInsertion' - Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3
-- tags in any HLS outputs. To include timed metadata, you must enable it
-- here, enable it in each output container, and specify tags and timecodes
-- in ID3 insertion (Id3Insertion) objects.
--
-- 'nielsenConfiguration', 'jobTemplateSettings_nielsenConfiguration' - Settings for your Nielsen configuration. If you don\'t do Nielsen
-- measurement and analytics, ignore these settings. When you enable
-- Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM
-- to ID3 tagging for all outputs in the job. To enable Nielsen
-- configuration programmatically, include an instance of
-- nielsenConfiguration in your JSON job specification. Even if you don\'t
-- include any children of nielsenConfiguration, you still enable the
-- setting.
--
-- 'availBlanking', 'jobTemplateSettings_availBlanking' - Settings for ad avail blanking. Video can be blanked or overlaid with an
-- image, and audio muted during SCTE-35 triggered ad avails.
--
-- 'extendedDataServices', 'jobTemplateSettings_extendedDataServices' - If your source content has EIA-608 Line 21 Data Services, enable this
-- feature to specify what MediaConvert does with the Extended Data
-- Services (XDS) packets. You can choose to pass through XDS packets, or
-- remove them from the output. For more information about XDS, see EIA-608
-- Line Data Services, section 9.5.1.5 05h Content Advisory.
--
-- 'motionImageInserter', 'jobTemplateSettings_motionImageInserter' - Overlay motion graphics on top of your video. The motion graphics that
-- you specify here appear on all outputs in all output groups. For more
-- information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/motion-graphic-overlay.html.
--
-- 'timecodeConfig', 'jobTemplateSettings_timecodeConfig' - These settings control how the service handles timecodes throughout the
-- job. These settings don\'t affect input clipping.
--
-- 'outputGroups', 'jobTemplateSettings_outputGroups' - (OutputGroups) contains one group of settings for each set of outputs
-- that share a common package type. All unpackaged files (MPEG-4, MPEG-2
-- TS, Quicktime, MXF, and no container) are grouped in a single output
-- group as well. Required in (OutputGroups) is a group of settings that
-- apply to the whole group. This required object depends on the value you
-- set for (Type) under (OutputGroups)>(OutputGroupSettings). Type,
-- settings object pairs are as follows. * FILE_GROUP_SETTINGS,
-- FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings *
-- DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings *
-- MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS,
-- CmafGroupSettings
--
-- 'adAvailOffset', 'jobTemplateSettings_adAvailOffset' - When specified, this offset (in milliseconds) is added to the input Ad
-- Avail PTS time.
--
-- 'kantarWatermark', 'jobTemplateSettings_kantarWatermark' - Use these settings only when you use Kantar watermarking. Specify the
-- values that MediaConvert uses to generate and place Kantar watermarks in
-- your output audio. These settings apply to every output in your job. In
-- addition to specifying these values, you also need to store your Kantar
-- credentials in AWS Secrets Manager. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/kantar-watermarking.html.
newJobTemplateSettings ::
  JobTemplateSettings
newJobTemplateSettings :: JobTemplateSettings
newJobTemplateSettings =
  JobTemplateSettings' :: Maybe NielsenNonLinearWatermarkSettings
-> Maybe EsamSettings
-> Maybe [InputTemplate]
-> Maybe TimedMetadataInsertion
-> Maybe NielsenConfiguration
-> Maybe AvailBlanking
-> Maybe ExtendedDataServices
-> Maybe MotionImageInserter
-> Maybe TimecodeConfig
-> Maybe [OutputGroup]
-> Maybe Int
-> Maybe KantarWatermarkSettings
-> JobTemplateSettings
JobTemplateSettings'
    { $sel:nielsenNonLinearWatermark:JobTemplateSettings' :: Maybe NielsenNonLinearWatermarkSettings
nielsenNonLinearWatermark =
        Maybe NielsenNonLinearWatermarkSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:esam:JobTemplateSettings' :: Maybe EsamSettings
esam = Maybe EsamSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:inputs:JobTemplateSettings' :: Maybe [InputTemplate]
inputs = Maybe [InputTemplate]
forall a. Maybe a
Prelude.Nothing,
      $sel:timedMetadataInsertion:JobTemplateSettings' :: Maybe TimedMetadataInsertion
timedMetadataInsertion = Maybe TimedMetadataInsertion
forall a. Maybe a
Prelude.Nothing,
      $sel:nielsenConfiguration:JobTemplateSettings' :: Maybe NielsenConfiguration
nielsenConfiguration = Maybe NielsenConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:availBlanking:JobTemplateSettings' :: Maybe AvailBlanking
availBlanking = Maybe AvailBlanking
forall a. Maybe a
Prelude.Nothing,
      $sel:extendedDataServices:JobTemplateSettings' :: Maybe ExtendedDataServices
extendedDataServices = Maybe ExtendedDataServices
forall a. Maybe a
Prelude.Nothing,
      $sel:motionImageInserter:JobTemplateSettings' :: Maybe MotionImageInserter
motionImageInserter = Maybe MotionImageInserter
forall a. Maybe a
Prelude.Nothing,
      $sel:timecodeConfig:JobTemplateSettings' :: Maybe TimecodeConfig
timecodeConfig = Maybe TimecodeConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:outputGroups:JobTemplateSettings' :: Maybe [OutputGroup]
outputGroups = Maybe [OutputGroup]
forall a. Maybe a
Prelude.Nothing,
      $sel:adAvailOffset:JobTemplateSettings' :: Maybe Int
adAvailOffset = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:kantarWatermark:JobTemplateSettings' :: Maybe KantarWatermarkSettings
kantarWatermark = Maybe KantarWatermarkSettings
forall a. Maybe a
Prelude.Nothing
    }

-- | Ignore these settings unless you are using Nielsen non-linear
-- watermarking. Specify the values that MediaConvert uses to generate and
-- place Nielsen watermarks in your output audio. In addition to specifying
-- these values, you also need to set up your cloud TIC server. These
-- settings apply to every output in your job. The MediaConvert
-- implementation is currently with the following Nielsen versions: Nielsen
-- Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7
-- Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
jobTemplateSettings_nielsenNonLinearWatermark :: Lens.Lens' JobTemplateSettings (Prelude.Maybe NielsenNonLinearWatermarkSettings)
jobTemplateSettings_nielsenNonLinearWatermark :: (Maybe NielsenNonLinearWatermarkSettings
 -> f (Maybe NielsenNonLinearWatermarkSettings))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_nielsenNonLinearWatermark = (JobTemplateSettings -> Maybe NielsenNonLinearWatermarkSettings)
-> (JobTemplateSettings
    -> Maybe NielsenNonLinearWatermarkSettings -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe NielsenNonLinearWatermarkSettings)
     (Maybe NielsenNonLinearWatermarkSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe NielsenNonLinearWatermarkSettings
nielsenNonLinearWatermark :: Maybe NielsenNonLinearWatermarkSettings
$sel:nielsenNonLinearWatermark:JobTemplateSettings' :: JobTemplateSettings -> Maybe NielsenNonLinearWatermarkSettings
nielsenNonLinearWatermark} -> Maybe NielsenNonLinearWatermarkSettings
nielsenNonLinearWatermark) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe NielsenNonLinearWatermarkSettings
a -> JobTemplateSettings
s {$sel:nielsenNonLinearWatermark:JobTemplateSettings' :: Maybe NielsenNonLinearWatermarkSettings
nielsenNonLinearWatermark = Maybe NielsenNonLinearWatermarkSettings
a} :: JobTemplateSettings)

-- | Settings for Event Signaling And Messaging (ESAM). If you don\'t do ad
-- insertion, you can ignore these settings.
jobTemplateSettings_esam :: Lens.Lens' JobTemplateSettings (Prelude.Maybe EsamSettings)
jobTemplateSettings_esam :: (Maybe EsamSettings -> f (Maybe EsamSettings))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_esam = (JobTemplateSettings -> Maybe EsamSettings)
-> (JobTemplateSettings
    -> Maybe EsamSettings -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe EsamSettings)
     (Maybe EsamSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe EsamSettings
esam :: Maybe EsamSettings
$sel:esam:JobTemplateSettings' :: JobTemplateSettings -> Maybe EsamSettings
esam} -> Maybe EsamSettings
esam) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe EsamSettings
a -> JobTemplateSettings
s {$sel:esam:JobTemplateSettings' :: Maybe EsamSettings
esam = Maybe EsamSettings
a} :: JobTemplateSettings)

-- | Use Inputs (inputs) to define the source file used in the transcode job.
-- There can only be one input in a job template. Using the API, you can
-- include multiple inputs when referencing a job template.
jobTemplateSettings_inputs :: Lens.Lens' JobTemplateSettings (Prelude.Maybe [InputTemplate])
jobTemplateSettings_inputs :: (Maybe [InputTemplate] -> f (Maybe [InputTemplate]))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_inputs = (JobTemplateSettings -> Maybe [InputTemplate])
-> (JobTemplateSettings
    -> Maybe [InputTemplate] -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe [InputTemplate])
     (Maybe [InputTemplate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe [InputTemplate]
inputs :: Maybe [InputTemplate]
$sel:inputs:JobTemplateSettings' :: JobTemplateSettings -> Maybe [InputTemplate]
inputs} -> Maybe [InputTemplate]
inputs) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe [InputTemplate]
a -> JobTemplateSettings
s {$sel:inputs:JobTemplateSettings' :: Maybe [InputTemplate]
inputs = Maybe [InputTemplate]
a} :: JobTemplateSettings) ((Maybe [InputTemplate] -> f (Maybe [InputTemplate]))
 -> JobTemplateSettings -> f JobTemplateSettings)
-> ((Maybe [InputTemplate] -> f (Maybe [InputTemplate]))
    -> Maybe [InputTemplate] -> f (Maybe [InputTemplate]))
-> (Maybe [InputTemplate] -> f (Maybe [InputTemplate]))
-> JobTemplateSettings
-> f JobTemplateSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InputTemplate] [InputTemplate] [InputTemplate] [InputTemplate]
-> Iso
     (Maybe [InputTemplate])
     (Maybe [InputTemplate])
     (Maybe [InputTemplate])
     (Maybe [InputTemplate])
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
  [InputTemplate] [InputTemplate] [InputTemplate] [InputTemplate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3
-- tags in any HLS outputs. To include timed metadata, you must enable it
-- here, enable it in each output container, and specify tags and timecodes
-- in ID3 insertion (Id3Insertion) objects.
jobTemplateSettings_timedMetadataInsertion :: Lens.Lens' JobTemplateSettings (Prelude.Maybe TimedMetadataInsertion)
jobTemplateSettings_timedMetadataInsertion :: (Maybe TimedMetadataInsertion -> f (Maybe TimedMetadataInsertion))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_timedMetadataInsertion = (JobTemplateSettings -> Maybe TimedMetadataInsertion)
-> (JobTemplateSettings
    -> Maybe TimedMetadataInsertion -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe TimedMetadataInsertion)
     (Maybe TimedMetadataInsertion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe TimedMetadataInsertion
timedMetadataInsertion :: Maybe TimedMetadataInsertion
$sel:timedMetadataInsertion:JobTemplateSettings' :: JobTemplateSettings -> Maybe TimedMetadataInsertion
timedMetadataInsertion} -> Maybe TimedMetadataInsertion
timedMetadataInsertion) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe TimedMetadataInsertion
a -> JobTemplateSettings
s {$sel:timedMetadataInsertion:JobTemplateSettings' :: Maybe TimedMetadataInsertion
timedMetadataInsertion = Maybe TimedMetadataInsertion
a} :: JobTemplateSettings)

-- | Settings for your Nielsen configuration. If you don\'t do Nielsen
-- measurement and analytics, ignore these settings. When you enable
-- Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM
-- to ID3 tagging for all outputs in the job. To enable Nielsen
-- configuration programmatically, include an instance of
-- nielsenConfiguration in your JSON job specification. Even if you don\'t
-- include any children of nielsenConfiguration, you still enable the
-- setting.
jobTemplateSettings_nielsenConfiguration :: Lens.Lens' JobTemplateSettings (Prelude.Maybe NielsenConfiguration)
jobTemplateSettings_nielsenConfiguration :: (Maybe NielsenConfiguration -> f (Maybe NielsenConfiguration))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_nielsenConfiguration = (JobTemplateSettings -> Maybe NielsenConfiguration)
-> (JobTemplateSettings
    -> Maybe NielsenConfiguration -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe NielsenConfiguration)
     (Maybe NielsenConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe NielsenConfiguration
nielsenConfiguration :: Maybe NielsenConfiguration
$sel:nielsenConfiguration:JobTemplateSettings' :: JobTemplateSettings -> Maybe NielsenConfiguration
nielsenConfiguration} -> Maybe NielsenConfiguration
nielsenConfiguration) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe NielsenConfiguration
a -> JobTemplateSettings
s {$sel:nielsenConfiguration:JobTemplateSettings' :: Maybe NielsenConfiguration
nielsenConfiguration = Maybe NielsenConfiguration
a} :: JobTemplateSettings)

-- | Settings for ad avail blanking. Video can be blanked or overlaid with an
-- image, and audio muted during SCTE-35 triggered ad avails.
jobTemplateSettings_availBlanking :: Lens.Lens' JobTemplateSettings (Prelude.Maybe AvailBlanking)
jobTemplateSettings_availBlanking :: (Maybe AvailBlanking -> f (Maybe AvailBlanking))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_availBlanking = (JobTemplateSettings -> Maybe AvailBlanking)
-> (JobTemplateSettings
    -> Maybe AvailBlanking -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe AvailBlanking)
     (Maybe AvailBlanking)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe AvailBlanking
availBlanking :: Maybe AvailBlanking
$sel:availBlanking:JobTemplateSettings' :: JobTemplateSettings -> Maybe AvailBlanking
availBlanking} -> Maybe AvailBlanking
availBlanking) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe AvailBlanking
a -> JobTemplateSettings
s {$sel:availBlanking:JobTemplateSettings' :: Maybe AvailBlanking
availBlanking = Maybe AvailBlanking
a} :: JobTemplateSettings)

-- | If your source content has EIA-608 Line 21 Data Services, enable this
-- feature to specify what MediaConvert does with the Extended Data
-- Services (XDS) packets. You can choose to pass through XDS packets, or
-- remove them from the output. For more information about XDS, see EIA-608
-- Line Data Services, section 9.5.1.5 05h Content Advisory.
jobTemplateSettings_extendedDataServices :: Lens.Lens' JobTemplateSettings (Prelude.Maybe ExtendedDataServices)
jobTemplateSettings_extendedDataServices :: (Maybe ExtendedDataServices -> f (Maybe ExtendedDataServices))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_extendedDataServices = (JobTemplateSettings -> Maybe ExtendedDataServices)
-> (JobTemplateSettings
    -> Maybe ExtendedDataServices -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe ExtendedDataServices)
     (Maybe ExtendedDataServices)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe ExtendedDataServices
extendedDataServices :: Maybe ExtendedDataServices
$sel:extendedDataServices:JobTemplateSettings' :: JobTemplateSettings -> Maybe ExtendedDataServices
extendedDataServices} -> Maybe ExtendedDataServices
extendedDataServices) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe ExtendedDataServices
a -> JobTemplateSettings
s {$sel:extendedDataServices:JobTemplateSettings' :: Maybe ExtendedDataServices
extendedDataServices = Maybe ExtendedDataServices
a} :: JobTemplateSettings)

-- | Overlay motion graphics on top of your video. The motion graphics that
-- you specify here appear on all outputs in all output groups. For more
-- information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/motion-graphic-overlay.html.
jobTemplateSettings_motionImageInserter :: Lens.Lens' JobTemplateSettings (Prelude.Maybe MotionImageInserter)
jobTemplateSettings_motionImageInserter :: (Maybe MotionImageInserter -> f (Maybe MotionImageInserter))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_motionImageInserter = (JobTemplateSettings -> Maybe MotionImageInserter)
-> (JobTemplateSettings
    -> Maybe MotionImageInserter -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe MotionImageInserter)
     (Maybe MotionImageInserter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe MotionImageInserter
motionImageInserter :: Maybe MotionImageInserter
$sel:motionImageInserter:JobTemplateSettings' :: JobTemplateSettings -> Maybe MotionImageInserter
motionImageInserter} -> Maybe MotionImageInserter
motionImageInserter) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe MotionImageInserter
a -> JobTemplateSettings
s {$sel:motionImageInserter:JobTemplateSettings' :: Maybe MotionImageInserter
motionImageInserter = Maybe MotionImageInserter
a} :: JobTemplateSettings)

-- | These settings control how the service handles timecodes throughout the
-- job. These settings don\'t affect input clipping.
jobTemplateSettings_timecodeConfig :: Lens.Lens' JobTemplateSettings (Prelude.Maybe TimecodeConfig)
jobTemplateSettings_timecodeConfig :: (Maybe TimecodeConfig -> f (Maybe TimecodeConfig))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_timecodeConfig = (JobTemplateSettings -> Maybe TimecodeConfig)
-> (JobTemplateSettings
    -> Maybe TimecodeConfig -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe TimecodeConfig)
     (Maybe TimecodeConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe TimecodeConfig
timecodeConfig :: Maybe TimecodeConfig
$sel:timecodeConfig:JobTemplateSettings' :: JobTemplateSettings -> Maybe TimecodeConfig
timecodeConfig} -> Maybe TimecodeConfig
timecodeConfig) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe TimecodeConfig
a -> JobTemplateSettings
s {$sel:timecodeConfig:JobTemplateSettings' :: Maybe TimecodeConfig
timecodeConfig = Maybe TimecodeConfig
a} :: JobTemplateSettings)

-- | (OutputGroups) contains one group of settings for each set of outputs
-- that share a common package type. All unpackaged files (MPEG-4, MPEG-2
-- TS, Quicktime, MXF, and no container) are grouped in a single output
-- group as well. Required in (OutputGroups) is a group of settings that
-- apply to the whole group. This required object depends on the value you
-- set for (Type) under (OutputGroups)>(OutputGroupSettings). Type,
-- settings object pairs are as follows. * FILE_GROUP_SETTINGS,
-- FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings *
-- DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings *
-- MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS,
-- CmafGroupSettings
jobTemplateSettings_outputGroups :: Lens.Lens' JobTemplateSettings (Prelude.Maybe [OutputGroup])
jobTemplateSettings_outputGroups :: (Maybe [OutputGroup] -> f (Maybe [OutputGroup]))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_outputGroups = (JobTemplateSettings -> Maybe [OutputGroup])
-> (JobTemplateSettings
    -> Maybe [OutputGroup] -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe [OutputGroup])
     (Maybe [OutputGroup])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe [OutputGroup]
outputGroups :: Maybe [OutputGroup]
$sel:outputGroups:JobTemplateSettings' :: JobTemplateSettings -> Maybe [OutputGroup]
outputGroups} -> Maybe [OutputGroup]
outputGroups) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe [OutputGroup]
a -> JobTemplateSettings
s {$sel:outputGroups:JobTemplateSettings' :: Maybe [OutputGroup]
outputGroups = Maybe [OutputGroup]
a} :: JobTemplateSettings) ((Maybe [OutputGroup] -> f (Maybe [OutputGroup]))
 -> JobTemplateSettings -> f JobTemplateSettings)
-> ((Maybe [OutputGroup] -> f (Maybe [OutputGroup]))
    -> Maybe [OutputGroup] -> f (Maybe [OutputGroup]))
-> (Maybe [OutputGroup] -> f (Maybe [OutputGroup]))
-> JobTemplateSettings
-> f JobTemplateSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [OutputGroup] [OutputGroup] [OutputGroup] [OutputGroup]
-> Iso
     (Maybe [OutputGroup])
     (Maybe [OutputGroup])
     (Maybe [OutputGroup])
     (Maybe [OutputGroup])
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 [OutputGroup] [OutputGroup] [OutputGroup] [OutputGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | When specified, this offset (in milliseconds) is added to the input Ad
-- Avail PTS time.
jobTemplateSettings_adAvailOffset :: Lens.Lens' JobTemplateSettings (Prelude.Maybe Prelude.Int)
jobTemplateSettings_adAvailOffset :: (Maybe Int -> f (Maybe Int))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_adAvailOffset = (JobTemplateSettings -> Maybe Int)
-> (JobTemplateSettings -> Maybe Int -> JobTemplateSettings)
-> Lens
     JobTemplateSettings JobTemplateSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe Int
adAvailOffset :: Maybe Int
$sel:adAvailOffset:JobTemplateSettings' :: JobTemplateSettings -> Maybe Int
adAvailOffset} -> Maybe Int
adAvailOffset) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe Int
a -> JobTemplateSettings
s {$sel:adAvailOffset:JobTemplateSettings' :: Maybe Int
adAvailOffset = Maybe Int
a} :: JobTemplateSettings)

-- | Use these settings only when you use Kantar watermarking. Specify the
-- values that MediaConvert uses to generate and place Kantar watermarks in
-- your output audio. These settings apply to every output in your job. In
-- addition to specifying these values, you also need to store your Kantar
-- credentials in AWS Secrets Manager. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/kantar-watermarking.html.
jobTemplateSettings_kantarWatermark :: Lens.Lens' JobTemplateSettings (Prelude.Maybe KantarWatermarkSettings)
jobTemplateSettings_kantarWatermark :: (Maybe KantarWatermarkSettings
 -> f (Maybe KantarWatermarkSettings))
-> JobTemplateSettings -> f JobTemplateSettings
jobTemplateSettings_kantarWatermark = (JobTemplateSettings -> Maybe KantarWatermarkSettings)
-> (JobTemplateSettings
    -> Maybe KantarWatermarkSettings -> JobTemplateSettings)
-> Lens
     JobTemplateSettings
     JobTemplateSettings
     (Maybe KantarWatermarkSettings)
     (Maybe KantarWatermarkSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobTemplateSettings' {Maybe KantarWatermarkSettings
kantarWatermark :: Maybe KantarWatermarkSettings
$sel:kantarWatermark:JobTemplateSettings' :: JobTemplateSettings -> Maybe KantarWatermarkSettings
kantarWatermark} -> Maybe KantarWatermarkSettings
kantarWatermark) (\s :: JobTemplateSettings
s@JobTemplateSettings' {} Maybe KantarWatermarkSettings
a -> JobTemplateSettings
s {$sel:kantarWatermark:JobTemplateSettings' :: Maybe KantarWatermarkSettings
kantarWatermark = Maybe KantarWatermarkSettings
a} :: JobTemplateSettings)

instance Core.FromJSON JobTemplateSettings where
  parseJSON :: Value -> Parser JobTemplateSettings
parseJSON =
    String
-> (Object -> Parser JobTemplateSettings)
-> Value
-> Parser JobTemplateSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"JobTemplateSettings"
      ( \Object
x ->
          Maybe NielsenNonLinearWatermarkSettings
-> Maybe EsamSettings
-> Maybe [InputTemplate]
-> Maybe TimedMetadataInsertion
-> Maybe NielsenConfiguration
-> Maybe AvailBlanking
-> Maybe ExtendedDataServices
-> Maybe MotionImageInserter
-> Maybe TimecodeConfig
-> Maybe [OutputGroup]
-> Maybe Int
-> Maybe KantarWatermarkSettings
-> JobTemplateSettings
JobTemplateSettings'
            (Maybe NielsenNonLinearWatermarkSettings
 -> Maybe EsamSettings
 -> Maybe [InputTemplate]
 -> Maybe TimedMetadataInsertion
 -> Maybe NielsenConfiguration
 -> Maybe AvailBlanking
 -> Maybe ExtendedDataServices
 -> Maybe MotionImageInserter
 -> Maybe TimecodeConfig
 -> Maybe [OutputGroup]
 -> Maybe Int
 -> Maybe KantarWatermarkSettings
 -> JobTemplateSettings)
-> Parser (Maybe NielsenNonLinearWatermarkSettings)
-> Parser
     (Maybe EsamSettings
      -> Maybe [InputTemplate]
      -> Maybe TimedMetadataInsertion
      -> Maybe NielsenConfiguration
      -> Maybe AvailBlanking
      -> Maybe ExtendedDataServices
      -> Maybe MotionImageInserter
      -> Maybe TimecodeConfig
      -> Maybe [OutputGroup]
      -> Maybe Int
      -> Maybe KantarWatermarkSettings
      -> JobTemplateSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe NielsenNonLinearWatermarkSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nielsenNonLinearWatermark")
            Parser
  (Maybe EsamSettings
   -> Maybe [InputTemplate]
   -> Maybe TimedMetadataInsertion
   -> Maybe NielsenConfiguration
   -> Maybe AvailBlanking
   -> Maybe ExtendedDataServices
   -> Maybe MotionImageInserter
   -> Maybe TimecodeConfig
   -> Maybe [OutputGroup]
   -> Maybe Int
   -> Maybe KantarWatermarkSettings
   -> JobTemplateSettings)
-> Parser (Maybe EsamSettings)
-> Parser
     (Maybe [InputTemplate]
      -> Maybe TimedMetadataInsertion
      -> Maybe NielsenConfiguration
      -> Maybe AvailBlanking
      -> Maybe ExtendedDataServices
      -> Maybe MotionImageInserter
      -> Maybe TimecodeConfig
      -> Maybe [OutputGroup]
      -> Maybe Int
      -> Maybe KantarWatermarkSettings
      -> JobTemplateSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EsamSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"esam")
            Parser
  (Maybe [InputTemplate]
   -> Maybe TimedMetadataInsertion
   -> Maybe NielsenConfiguration
   -> Maybe AvailBlanking
   -> Maybe ExtendedDataServices
   -> Maybe MotionImageInserter
   -> Maybe TimecodeConfig
   -> Maybe [OutputGroup]
   -> Maybe Int
   -> Maybe KantarWatermarkSettings
   -> JobTemplateSettings)
-> Parser (Maybe [InputTemplate])
-> Parser
     (Maybe TimedMetadataInsertion
      -> Maybe NielsenConfiguration
      -> Maybe AvailBlanking
      -> Maybe ExtendedDataServices
      -> Maybe MotionImageInserter
      -> Maybe TimecodeConfig
      -> Maybe [OutputGroup]
      -> Maybe Int
      -> Maybe KantarWatermarkSettings
      -> JobTemplateSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [InputTemplate]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"inputs" Parser (Maybe (Maybe [InputTemplate]))
-> Maybe [InputTemplate] -> Parser (Maybe [InputTemplate])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [InputTemplate]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe TimedMetadataInsertion
   -> Maybe NielsenConfiguration
   -> Maybe AvailBlanking
   -> Maybe ExtendedDataServices
   -> Maybe MotionImageInserter
   -> Maybe TimecodeConfig
   -> Maybe [OutputGroup]
   -> Maybe Int
   -> Maybe KantarWatermarkSettings
   -> JobTemplateSettings)
-> Parser (Maybe TimedMetadataInsertion)
-> Parser
     (Maybe NielsenConfiguration
      -> Maybe AvailBlanking
      -> Maybe ExtendedDataServices
      -> Maybe MotionImageInserter
      -> Maybe TimecodeConfig
      -> Maybe [OutputGroup]
      -> Maybe Int
      -> Maybe KantarWatermarkSettings
      -> JobTemplateSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TimedMetadataInsertion)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timedMetadataInsertion")
            Parser
  (Maybe NielsenConfiguration
   -> Maybe AvailBlanking
   -> Maybe ExtendedDataServices
   -> Maybe MotionImageInserter
   -> Maybe TimecodeConfig
   -> Maybe [OutputGroup]
   -> Maybe Int
   -> Maybe KantarWatermarkSettings
   -> JobTemplateSettings)
-> Parser (Maybe NielsenConfiguration)
-> Parser
     (Maybe AvailBlanking
      -> Maybe ExtendedDataServices
      -> Maybe MotionImageInserter
      -> Maybe TimecodeConfig
      -> Maybe [OutputGroup]
      -> Maybe Int
      -> Maybe KantarWatermarkSettings
      -> JobTemplateSettings)
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 ExtendedDataServices
   -> Maybe MotionImageInserter
   -> Maybe TimecodeConfig
   -> Maybe [OutputGroup]
   -> Maybe Int
   -> Maybe KantarWatermarkSettings
   -> JobTemplateSettings)
-> Parser (Maybe AvailBlanking)
-> Parser
     (Maybe ExtendedDataServices
      -> Maybe MotionImageInserter
      -> Maybe TimecodeConfig
      -> Maybe [OutputGroup]
      -> Maybe Int
      -> Maybe KantarWatermarkSettings
      -> JobTemplateSettings)
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 ExtendedDataServices
   -> Maybe MotionImageInserter
   -> Maybe TimecodeConfig
   -> Maybe [OutputGroup]
   -> Maybe Int
   -> Maybe KantarWatermarkSettings
   -> JobTemplateSettings)
-> Parser (Maybe ExtendedDataServices)
-> Parser
     (Maybe MotionImageInserter
      -> Maybe TimecodeConfig
      -> Maybe [OutputGroup]
      -> Maybe Int
      -> Maybe KantarWatermarkSettings
      -> JobTemplateSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExtendedDataServices)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"extendedDataServices")
            Parser
  (Maybe MotionImageInserter
   -> Maybe TimecodeConfig
   -> Maybe [OutputGroup]
   -> Maybe Int
   -> Maybe KantarWatermarkSettings
   -> JobTemplateSettings)
-> Parser (Maybe MotionImageInserter)
-> Parser
     (Maybe TimecodeConfig
      -> Maybe [OutputGroup]
      -> Maybe Int
      -> Maybe KantarWatermarkSettings
      -> JobTemplateSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MotionImageInserter)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"motionImageInserter")
            Parser
  (Maybe TimecodeConfig
   -> Maybe [OutputGroup]
   -> Maybe Int
   -> Maybe KantarWatermarkSettings
   -> JobTemplateSettings)
-> Parser (Maybe TimecodeConfig)
-> Parser
     (Maybe [OutputGroup]
      -> Maybe Int
      -> Maybe KantarWatermarkSettings
      -> JobTemplateSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TimecodeConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timecodeConfig")
            Parser
  (Maybe [OutputGroup]
   -> Maybe Int
   -> Maybe KantarWatermarkSettings
   -> JobTemplateSettings)
-> Parser (Maybe [OutputGroup])
-> Parser
     (Maybe Int -> Maybe KantarWatermarkSettings -> JobTemplateSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [OutputGroup]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputGroups" Parser (Maybe (Maybe [OutputGroup]))
-> Maybe [OutputGroup] -> Parser (Maybe [OutputGroup])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [OutputGroup]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Int -> Maybe KantarWatermarkSettings -> JobTemplateSettings)
-> Parser (Maybe Int)
-> Parser (Maybe KantarWatermarkSettings -> JobTemplateSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"adAvailOffset")
            Parser (Maybe KantarWatermarkSettings -> JobTemplateSettings)
-> Parser (Maybe KantarWatermarkSettings)
-> Parser JobTemplateSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KantarWatermarkSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"kantarWatermark")
      )

instance Prelude.Hashable JobTemplateSettings

instance Prelude.NFData JobTemplateSettings

instance Core.ToJSON JobTemplateSettings where
  toJSON :: JobTemplateSettings -> Value
toJSON JobTemplateSettings' {Maybe Int
Maybe [InputTemplate]
Maybe [OutputGroup]
Maybe AvailBlanking
Maybe EsamSettings
Maybe KantarWatermarkSettings
Maybe MotionImageInserter
Maybe NielsenConfiguration
Maybe NielsenNonLinearWatermarkSettings
Maybe TimecodeConfig
Maybe TimedMetadataInsertion
Maybe ExtendedDataServices
kantarWatermark :: Maybe KantarWatermarkSettings
adAvailOffset :: Maybe Int
outputGroups :: Maybe [OutputGroup]
timecodeConfig :: Maybe TimecodeConfig
motionImageInserter :: Maybe MotionImageInserter
extendedDataServices :: Maybe ExtendedDataServices
availBlanking :: Maybe AvailBlanking
nielsenConfiguration :: Maybe NielsenConfiguration
timedMetadataInsertion :: Maybe TimedMetadataInsertion
inputs :: Maybe [InputTemplate]
esam :: Maybe EsamSettings
nielsenNonLinearWatermark :: Maybe NielsenNonLinearWatermarkSettings
$sel:kantarWatermark:JobTemplateSettings' :: JobTemplateSettings -> Maybe KantarWatermarkSettings
$sel:adAvailOffset:JobTemplateSettings' :: JobTemplateSettings -> Maybe Int
$sel:outputGroups:JobTemplateSettings' :: JobTemplateSettings -> Maybe [OutputGroup]
$sel:timecodeConfig:JobTemplateSettings' :: JobTemplateSettings -> Maybe TimecodeConfig
$sel:motionImageInserter:JobTemplateSettings' :: JobTemplateSettings -> Maybe MotionImageInserter
$sel:extendedDataServices:JobTemplateSettings' :: JobTemplateSettings -> Maybe ExtendedDataServices
$sel:availBlanking:JobTemplateSettings' :: JobTemplateSettings -> Maybe AvailBlanking
$sel:nielsenConfiguration:JobTemplateSettings' :: JobTemplateSettings -> Maybe NielsenConfiguration
$sel:timedMetadataInsertion:JobTemplateSettings' :: JobTemplateSettings -> Maybe TimedMetadataInsertion
$sel:inputs:JobTemplateSettings' :: JobTemplateSettings -> Maybe [InputTemplate]
$sel:esam:JobTemplateSettings' :: JobTemplateSettings -> Maybe EsamSettings
$sel:nielsenNonLinearWatermark:JobTemplateSettings' :: JobTemplateSettings -> Maybe NielsenNonLinearWatermarkSettings
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"nielsenNonLinearWatermark" Text -> NielsenNonLinearWatermarkSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NielsenNonLinearWatermarkSettings -> Pair)
-> Maybe NielsenNonLinearWatermarkSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NielsenNonLinearWatermarkSettings
nielsenNonLinearWatermark,
            (Text
"esam" Text -> EsamSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EsamSettings -> Pair) -> Maybe EsamSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EsamSettings
esam,
            (Text
"inputs" Text -> [InputTemplate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([InputTemplate] -> Pair) -> Maybe [InputTemplate] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputTemplate]
inputs,
            (Text
"timedMetadataInsertion" Text -> TimedMetadataInsertion -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (TimedMetadataInsertion -> Pair)
-> Maybe TimedMetadataInsertion -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimedMetadataInsertion
timedMetadataInsertion,
            (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
"extendedDataServices" Text -> ExtendedDataServices -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ExtendedDataServices -> Pair)
-> Maybe ExtendedDataServices -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExtendedDataServices
extendedDataServices,
            (Text
"motionImageInserter" Text -> MotionImageInserter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MotionImageInserter -> Pair)
-> Maybe MotionImageInserter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MotionImageInserter
motionImageInserter,
            (Text
"timecodeConfig" Text -> TimecodeConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (TimecodeConfig -> Pair) -> Maybe TimecodeConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimecodeConfig
timecodeConfig,
            (Text
"outputGroups" Text -> [OutputGroup] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([OutputGroup] -> Pair) -> Maybe [OutputGroup] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OutputGroup]
outputGroups,
            (Text
"adAvailOffset" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
adAvailOffset,
            (Text
"kantarWatermark" Text -> KantarWatermarkSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (KantarWatermarkSettings -> Pair)
-> Maybe KantarWatermarkSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KantarWatermarkSettings
kantarWatermark
          ]
      )