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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.BurninDestinationSettings
import Amazonka.MediaConvert.Types.CaptionDestinationType
import Amazonka.MediaConvert.Types.DvbSubDestinationSettings
import Amazonka.MediaConvert.Types.EmbeddedDestinationSettings
import Amazonka.MediaConvert.Types.ImscDestinationSettings
import Amazonka.MediaConvert.Types.SccDestinationSettings
import Amazonka.MediaConvert.Types.SrtDestinationSettings
import Amazonka.MediaConvert.Types.TeletextDestinationSettings
import Amazonka.MediaConvert.Types.TtmlDestinationSettings
import Amazonka.MediaConvert.Types.WebvttDestinationSettings
import qualified Amazonka.Prelude as Prelude

-- | Settings related to one captions tab on the MediaConvert console. In
-- your job JSON, an instance of captions DestinationSettings is equivalent
-- to one captions tab in the console. Usually, one captions tab
-- corresponds to one output captions track. Depending on your output
-- captions format, one tab might correspond to a set of output captions
-- tracks. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/including-captions.html.
--
-- /See:/ 'newCaptionDestinationSettings' smart constructor.
data CaptionDestinationSettings = CaptionDestinationSettings'
  { -- | Settings related to SRT captions. SRT is a sidecar format that holds
    -- captions in a file that is separate from the video container. Set up
    -- sidecar captions in the same output group, but different output from
    -- your video. When you work directly in your JSON job specification,
    -- include this object and any required children when you set
    -- destinationType to SRT.
    CaptionDestinationSettings -> Maybe SrtDestinationSettings
srtDestinationSettings :: Prelude.Maybe SrtDestinationSettings,
    -- | Settings related to teletext captions. Set up teletext captions in the
    -- same output as your video. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/teletext-output-captions.html.
    -- When you work directly in your JSON job specification, include this
    -- object and any required children when you set destinationType to
    -- TELETEXT.
    CaptionDestinationSettings -> Maybe TeletextDestinationSettings
teletextDestinationSettings :: Prelude.Maybe TeletextDestinationSettings,
    -- | Settings related to DVB-Sub captions. Set up DVB-Sub captions in the
    -- same output as your video. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/dvb-sub-output-captions.html.
    -- When you work directly in your JSON job specification, include this
    -- object and any required children when you set destinationType to
    -- DVB_SUB.
    CaptionDestinationSettings -> Maybe DvbSubDestinationSettings
dvbSubDestinationSettings :: Prelude.Maybe DvbSubDestinationSettings,
    -- | Settings related to TTML captions. TTML is a sidecar format that holds
    -- captions in a file that is separate from the video container. Set up
    -- sidecar captions in the same output group, but different output from
    -- your video. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/ttml-and-webvtt-output-captions.html.
    -- When you work directly in your JSON job specification, include this
    -- object and any required children when you set destinationType to TTML.
    CaptionDestinationSettings -> Maybe TtmlDestinationSettings
ttmlDestinationSettings :: Prelude.Maybe TtmlDestinationSettings,
    -- | Specify the format for this set of captions on this output. The default
    -- format is embedded without SCTE-20. Note that your choice of video
    -- output container constrains your choice of output captions format. For
    -- more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/captions-support-tables.html.
    -- If you are using SCTE-20 and you want to create an output that complies
    -- with the SCTE-43 spec, choose SCTE-20 plus embedded
    -- (SCTE20_PLUS_EMBEDDED). To create a non-compliant output where the
    -- embedded captions come first, choose Embedded plus SCTE-20
    -- (EMBEDDED_PLUS_SCTE20).
    CaptionDestinationSettings -> Maybe CaptionDestinationType
destinationType :: Prelude.Maybe CaptionDestinationType,
    -- | Settings related to WebVTT captions. WebVTT is a sidecar format that
    -- holds captions in a file that is separate from the video container. Set
    -- up sidecar captions in the same output group, but different output from
    -- your video. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/ttml-and-webvtt-output-captions.html.
    -- When you work directly in your JSON job specification, include this
    -- object and any required children when you set destinationType to WebVTT.
    CaptionDestinationSettings -> Maybe WebvttDestinationSettings
webvttDestinationSettings :: Prelude.Maybe WebvttDestinationSettings,
    -- | Settings related to CEA\/EIA-608 and CEA\/EIA-708 (also called embedded
    -- or ancillary) captions. Set up embedded captions in the same output as
    -- your video. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/embedded-output-captions.html.
    -- When you work directly in your JSON job specification, include this
    -- object and any required children when you set destinationType to
    -- EMBEDDED, EMBEDDED_PLUS_SCTE20, or SCTE20_PLUS_EMBEDDED.
    CaptionDestinationSettings -> Maybe EmbeddedDestinationSettings
embeddedDestinationSettings :: Prelude.Maybe EmbeddedDestinationSettings,
    -- | Settings related to SCC captions. SCC is a sidecar format that holds
    -- captions in a file that is separate from the video container. Set up
    -- sidecar captions in the same output group, but different output from
    -- your video. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/scc-srt-output-captions.html.
    -- When you work directly in your JSON job specification, include this
    -- object and any required children when you set destinationType to SCC.
    CaptionDestinationSettings -> Maybe SccDestinationSettings
sccDestinationSettings :: Prelude.Maybe SccDestinationSettings,
    -- | Burn-in is a captions delivery method, rather than a captions format.
    -- Burn-in writes the captions directly on your video frames, replacing
    -- pixels of video content with the captions. Set up burn-in captions in
    -- the same output as your video. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/burn-in-output-captions.html.
    -- When you work directly in your JSON job specification, include this
    -- object and any required children when you set destinationType to
    -- BURN_IN.
    CaptionDestinationSettings -> Maybe BurninDestinationSettings
burninDestinationSettings :: Prelude.Maybe BurninDestinationSettings,
    -- | Settings related to IMSC captions. IMSC is a sidecar format that holds
    -- captions in a file that is separate from the video container. Set up
    -- sidecar captions in the same output group, but different output from
    -- your video. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/ttml-and-webvtt-output-captions.html.
    -- When you work directly in your JSON job specification, include this
    -- object and any required children when you set destinationType to IMSC.
    CaptionDestinationSettings -> Maybe ImscDestinationSettings
imscDestinationSettings :: Prelude.Maybe ImscDestinationSettings
  }
  deriving (CaptionDestinationSettings -> CaptionDestinationSettings -> Bool
(CaptionDestinationSettings -> CaptionDestinationSettings -> Bool)
-> (CaptionDestinationSettings
    -> CaptionDestinationSettings -> Bool)
-> Eq CaptionDestinationSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CaptionDestinationSettings -> CaptionDestinationSettings -> Bool
$c/= :: CaptionDestinationSettings -> CaptionDestinationSettings -> Bool
== :: CaptionDestinationSettings -> CaptionDestinationSettings -> Bool
$c== :: CaptionDestinationSettings -> CaptionDestinationSettings -> Bool
Prelude.Eq, ReadPrec [CaptionDestinationSettings]
ReadPrec CaptionDestinationSettings
Int -> ReadS CaptionDestinationSettings
ReadS [CaptionDestinationSettings]
(Int -> ReadS CaptionDestinationSettings)
-> ReadS [CaptionDestinationSettings]
-> ReadPrec CaptionDestinationSettings
-> ReadPrec [CaptionDestinationSettings]
-> Read CaptionDestinationSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CaptionDestinationSettings]
$creadListPrec :: ReadPrec [CaptionDestinationSettings]
readPrec :: ReadPrec CaptionDestinationSettings
$creadPrec :: ReadPrec CaptionDestinationSettings
readList :: ReadS [CaptionDestinationSettings]
$creadList :: ReadS [CaptionDestinationSettings]
readsPrec :: Int -> ReadS CaptionDestinationSettings
$creadsPrec :: Int -> ReadS CaptionDestinationSettings
Prelude.Read, Int -> CaptionDestinationSettings -> ShowS
[CaptionDestinationSettings] -> ShowS
CaptionDestinationSettings -> String
(Int -> CaptionDestinationSettings -> ShowS)
-> (CaptionDestinationSettings -> String)
-> ([CaptionDestinationSettings] -> ShowS)
-> Show CaptionDestinationSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CaptionDestinationSettings] -> ShowS
$cshowList :: [CaptionDestinationSettings] -> ShowS
show :: CaptionDestinationSettings -> String
$cshow :: CaptionDestinationSettings -> String
showsPrec :: Int -> CaptionDestinationSettings -> ShowS
$cshowsPrec :: Int -> CaptionDestinationSettings -> ShowS
Prelude.Show, (forall x.
 CaptionDestinationSettings -> Rep CaptionDestinationSettings x)
-> (forall x.
    Rep CaptionDestinationSettings x -> CaptionDestinationSettings)
-> Generic CaptionDestinationSettings
forall x.
Rep CaptionDestinationSettings x -> CaptionDestinationSettings
forall x.
CaptionDestinationSettings -> Rep CaptionDestinationSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CaptionDestinationSettings x -> CaptionDestinationSettings
$cfrom :: forall x.
CaptionDestinationSettings -> Rep CaptionDestinationSettings x
Prelude.Generic)

-- |
-- Create a value of 'CaptionDestinationSettings' 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:
--
-- 'srtDestinationSettings', 'captionDestinationSettings_srtDestinationSettings' - Settings related to SRT captions. SRT is a sidecar format that holds
-- captions in a file that is separate from the video container. Set up
-- sidecar captions in the same output group, but different output from
-- your video. When you work directly in your JSON job specification,
-- include this object and any required children when you set
-- destinationType to SRT.
--
-- 'teletextDestinationSettings', 'captionDestinationSettings_teletextDestinationSettings' - Settings related to teletext captions. Set up teletext captions in the
-- same output as your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/teletext-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to
-- TELETEXT.
--
-- 'dvbSubDestinationSettings', 'captionDestinationSettings_dvbSubDestinationSettings' - Settings related to DVB-Sub captions. Set up DVB-Sub captions in the
-- same output as your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/dvb-sub-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to
-- DVB_SUB.
--
-- 'ttmlDestinationSettings', 'captionDestinationSettings_ttmlDestinationSettings' - Settings related to TTML captions. TTML is a sidecar format that holds
-- captions in a file that is separate from the video container. Set up
-- sidecar captions in the same output group, but different output from
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/ttml-and-webvtt-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to TTML.
--
-- 'destinationType', 'captionDestinationSettings_destinationType' - Specify the format for this set of captions on this output. The default
-- format is embedded without SCTE-20. Note that your choice of video
-- output container constrains your choice of output captions format. For
-- more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/captions-support-tables.html.
-- If you are using SCTE-20 and you want to create an output that complies
-- with the SCTE-43 spec, choose SCTE-20 plus embedded
-- (SCTE20_PLUS_EMBEDDED). To create a non-compliant output where the
-- embedded captions come first, choose Embedded plus SCTE-20
-- (EMBEDDED_PLUS_SCTE20).
--
-- 'webvttDestinationSettings', 'captionDestinationSettings_webvttDestinationSettings' - Settings related to WebVTT captions. WebVTT is a sidecar format that
-- holds captions in a file that is separate from the video container. Set
-- up sidecar captions in the same output group, but different output from
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/ttml-and-webvtt-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to WebVTT.
--
-- 'embeddedDestinationSettings', 'captionDestinationSettings_embeddedDestinationSettings' - Settings related to CEA\/EIA-608 and CEA\/EIA-708 (also called embedded
-- or ancillary) captions. Set up embedded captions in the same output as
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/embedded-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to
-- EMBEDDED, EMBEDDED_PLUS_SCTE20, or SCTE20_PLUS_EMBEDDED.
--
-- 'sccDestinationSettings', 'captionDestinationSettings_sccDestinationSettings' - Settings related to SCC captions. SCC is a sidecar format that holds
-- captions in a file that is separate from the video container. Set up
-- sidecar captions in the same output group, but different output from
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/scc-srt-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to SCC.
--
-- 'burninDestinationSettings', 'captionDestinationSettings_burninDestinationSettings' - Burn-in is a captions delivery method, rather than a captions format.
-- Burn-in writes the captions directly on your video frames, replacing
-- pixels of video content with the captions. Set up burn-in captions in
-- the same output as your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/burn-in-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to
-- BURN_IN.
--
-- 'imscDestinationSettings', 'captionDestinationSettings_imscDestinationSettings' - Settings related to IMSC captions. IMSC is a sidecar format that holds
-- captions in a file that is separate from the video container. Set up
-- sidecar captions in the same output group, but different output from
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/ttml-and-webvtt-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to IMSC.
newCaptionDestinationSettings ::
  CaptionDestinationSettings
newCaptionDestinationSettings :: CaptionDestinationSettings
newCaptionDestinationSettings =
  CaptionDestinationSettings' :: Maybe SrtDestinationSettings
-> Maybe TeletextDestinationSettings
-> Maybe DvbSubDestinationSettings
-> Maybe TtmlDestinationSettings
-> Maybe CaptionDestinationType
-> Maybe WebvttDestinationSettings
-> Maybe EmbeddedDestinationSettings
-> Maybe SccDestinationSettings
-> Maybe BurninDestinationSettings
-> Maybe ImscDestinationSettings
-> CaptionDestinationSettings
CaptionDestinationSettings'
    { $sel:srtDestinationSettings:CaptionDestinationSettings' :: Maybe SrtDestinationSettings
srtDestinationSettings =
        Maybe SrtDestinationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:teletextDestinationSettings:CaptionDestinationSettings' :: Maybe TeletextDestinationSettings
teletextDestinationSettings = Maybe TeletextDestinationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:dvbSubDestinationSettings:CaptionDestinationSettings' :: Maybe DvbSubDestinationSettings
dvbSubDestinationSettings = Maybe DvbSubDestinationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:ttmlDestinationSettings:CaptionDestinationSettings' :: Maybe TtmlDestinationSettings
ttmlDestinationSettings = Maybe TtmlDestinationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:destinationType:CaptionDestinationSettings' :: Maybe CaptionDestinationType
destinationType = Maybe CaptionDestinationType
forall a. Maybe a
Prelude.Nothing,
      $sel:webvttDestinationSettings:CaptionDestinationSettings' :: Maybe WebvttDestinationSettings
webvttDestinationSettings = Maybe WebvttDestinationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:embeddedDestinationSettings:CaptionDestinationSettings' :: Maybe EmbeddedDestinationSettings
embeddedDestinationSettings = Maybe EmbeddedDestinationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:sccDestinationSettings:CaptionDestinationSettings' :: Maybe SccDestinationSettings
sccDestinationSettings = Maybe SccDestinationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:burninDestinationSettings:CaptionDestinationSettings' :: Maybe BurninDestinationSettings
burninDestinationSettings = Maybe BurninDestinationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:imscDestinationSettings:CaptionDestinationSettings' :: Maybe ImscDestinationSettings
imscDestinationSettings = Maybe ImscDestinationSettings
forall a. Maybe a
Prelude.Nothing
    }

-- | Settings related to SRT captions. SRT is a sidecar format that holds
-- captions in a file that is separate from the video container. Set up
-- sidecar captions in the same output group, but different output from
-- your video. When you work directly in your JSON job specification,
-- include this object and any required children when you set
-- destinationType to SRT.
captionDestinationSettings_srtDestinationSettings :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe SrtDestinationSettings)
captionDestinationSettings_srtDestinationSettings :: (Maybe SrtDestinationSettings -> f (Maybe SrtDestinationSettings))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_srtDestinationSettings = (CaptionDestinationSettings -> Maybe SrtDestinationSettings)
-> (CaptionDestinationSettings
    -> Maybe SrtDestinationSettings -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe SrtDestinationSettings)
     (Maybe SrtDestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe SrtDestinationSettings
srtDestinationSettings :: Maybe SrtDestinationSettings
$sel:srtDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe SrtDestinationSettings
srtDestinationSettings} -> Maybe SrtDestinationSettings
srtDestinationSettings) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe SrtDestinationSettings
a -> CaptionDestinationSettings
s {$sel:srtDestinationSettings:CaptionDestinationSettings' :: Maybe SrtDestinationSettings
srtDestinationSettings = Maybe SrtDestinationSettings
a} :: CaptionDestinationSettings)

-- | Settings related to teletext captions. Set up teletext captions in the
-- same output as your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/teletext-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to
-- TELETEXT.
captionDestinationSettings_teletextDestinationSettings :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe TeletextDestinationSettings)
captionDestinationSettings_teletextDestinationSettings :: (Maybe TeletextDestinationSettings
 -> f (Maybe TeletextDestinationSettings))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_teletextDestinationSettings = (CaptionDestinationSettings -> Maybe TeletextDestinationSettings)
-> (CaptionDestinationSettings
    -> Maybe TeletextDestinationSettings -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe TeletextDestinationSettings)
     (Maybe TeletextDestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe TeletextDestinationSettings
teletextDestinationSettings :: Maybe TeletextDestinationSettings
$sel:teletextDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe TeletextDestinationSettings
teletextDestinationSettings} -> Maybe TeletextDestinationSettings
teletextDestinationSettings) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe TeletextDestinationSettings
a -> CaptionDestinationSettings
s {$sel:teletextDestinationSettings:CaptionDestinationSettings' :: Maybe TeletextDestinationSettings
teletextDestinationSettings = Maybe TeletextDestinationSettings
a} :: CaptionDestinationSettings)

-- | Settings related to DVB-Sub captions. Set up DVB-Sub captions in the
-- same output as your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/dvb-sub-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to
-- DVB_SUB.
captionDestinationSettings_dvbSubDestinationSettings :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe DvbSubDestinationSettings)
captionDestinationSettings_dvbSubDestinationSettings :: (Maybe DvbSubDestinationSettings
 -> f (Maybe DvbSubDestinationSettings))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_dvbSubDestinationSettings = (CaptionDestinationSettings -> Maybe DvbSubDestinationSettings)
-> (CaptionDestinationSettings
    -> Maybe DvbSubDestinationSettings -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe DvbSubDestinationSettings)
     (Maybe DvbSubDestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe DvbSubDestinationSettings
dvbSubDestinationSettings :: Maybe DvbSubDestinationSettings
$sel:dvbSubDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe DvbSubDestinationSettings
dvbSubDestinationSettings} -> Maybe DvbSubDestinationSettings
dvbSubDestinationSettings) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe DvbSubDestinationSettings
a -> CaptionDestinationSettings
s {$sel:dvbSubDestinationSettings:CaptionDestinationSettings' :: Maybe DvbSubDestinationSettings
dvbSubDestinationSettings = Maybe DvbSubDestinationSettings
a} :: CaptionDestinationSettings)

-- | Settings related to TTML captions. TTML is a sidecar format that holds
-- captions in a file that is separate from the video container. Set up
-- sidecar captions in the same output group, but different output from
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/ttml-and-webvtt-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to TTML.
captionDestinationSettings_ttmlDestinationSettings :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe TtmlDestinationSettings)
captionDestinationSettings_ttmlDestinationSettings :: (Maybe TtmlDestinationSettings
 -> f (Maybe TtmlDestinationSettings))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_ttmlDestinationSettings = (CaptionDestinationSettings -> Maybe TtmlDestinationSettings)
-> (CaptionDestinationSettings
    -> Maybe TtmlDestinationSettings -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe TtmlDestinationSettings)
     (Maybe TtmlDestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe TtmlDestinationSettings
ttmlDestinationSettings :: Maybe TtmlDestinationSettings
$sel:ttmlDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe TtmlDestinationSettings
ttmlDestinationSettings} -> Maybe TtmlDestinationSettings
ttmlDestinationSettings) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe TtmlDestinationSettings
a -> CaptionDestinationSettings
s {$sel:ttmlDestinationSettings:CaptionDestinationSettings' :: Maybe TtmlDestinationSettings
ttmlDestinationSettings = Maybe TtmlDestinationSettings
a} :: CaptionDestinationSettings)

-- | Specify the format for this set of captions on this output. The default
-- format is embedded without SCTE-20. Note that your choice of video
-- output container constrains your choice of output captions format. For
-- more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/captions-support-tables.html.
-- If you are using SCTE-20 and you want to create an output that complies
-- with the SCTE-43 spec, choose SCTE-20 plus embedded
-- (SCTE20_PLUS_EMBEDDED). To create a non-compliant output where the
-- embedded captions come first, choose Embedded plus SCTE-20
-- (EMBEDDED_PLUS_SCTE20).
captionDestinationSettings_destinationType :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe CaptionDestinationType)
captionDestinationSettings_destinationType :: (Maybe CaptionDestinationType -> f (Maybe CaptionDestinationType))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_destinationType = (CaptionDestinationSettings -> Maybe CaptionDestinationType)
-> (CaptionDestinationSettings
    -> Maybe CaptionDestinationType -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe CaptionDestinationType)
     (Maybe CaptionDestinationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe CaptionDestinationType
destinationType :: Maybe CaptionDestinationType
$sel:destinationType:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe CaptionDestinationType
destinationType} -> Maybe CaptionDestinationType
destinationType) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe CaptionDestinationType
a -> CaptionDestinationSettings
s {$sel:destinationType:CaptionDestinationSettings' :: Maybe CaptionDestinationType
destinationType = Maybe CaptionDestinationType
a} :: CaptionDestinationSettings)

-- | Settings related to WebVTT captions. WebVTT is a sidecar format that
-- holds captions in a file that is separate from the video container. Set
-- up sidecar captions in the same output group, but different output from
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/ttml-and-webvtt-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to WebVTT.
captionDestinationSettings_webvttDestinationSettings :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe WebvttDestinationSettings)
captionDestinationSettings_webvttDestinationSettings :: (Maybe WebvttDestinationSettings
 -> f (Maybe WebvttDestinationSettings))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_webvttDestinationSettings = (CaptionDestinationSettings -> Maybe WebvttDestinationSettings)
-> (CaptionDestinationSettings
    -> Maybe WebvttDestinationSettings -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe WebvttDestinationSettings)
     (Maybe WebvttDestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe WebvttDestinationSettings
webvttDestinationSettings :: Maybe WebvttDestinationSettings
$sel:webvttDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe WebvttDestinationSettings
webvttDestinationSettings} -> Maybe WebvttDestinationSettings
webvttDestinationSettings) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe WebvttDestinationSettings
a -> CaptionDestinationSettings
s {$sel:webvttDestinationSettings:CaptionDestinationSettings' :: Maybe WebvttDestinationSettings
webvttDestinationSettings = Maybe WebvttDestinationSettings
a} :: CaptionDestinationSettings)

-- | Settings related to CEA\/EIA-608 and CEA\/EIA-708 (also called embedded
-- or ancillary) captions. Set up embedded captions in the same output as
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/embedded-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to
-- EMBEDDED, EMBEDDED_PLUS_SCTE20, or SCTE20_PLUS_EMBEDDED.
captionDestinationSettings_embeddedDestinationSettings :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe EmbeddedDestinationSettings)
captionDestinationSettings_embeddedDestinationSettings :: (Maybe EmbeddedDestinationSettings
 -> f (Maybe EmbeddedDestinationSettings))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_embeddedDestinationSettings = (CaptionDestinationSettings -> Maybe EmbeddedDestinationSettings)
-> (CaptionDestinationSettings
    -> Maybe EmbeddedDestinationSettings -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe EmbeddedDestinationSettings)
     (Maybe EmbeddedDestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe EmbeddedDestinationSettings
embeddedDestinationSettings :: Maybe EmbeddedDestinationSettings
$sel:embeddedDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe EmbeddedDestinationSettings
embeddedDestinationSettings} -> Maybe EmbeddedDestinationSettings
embeddedDestinationSettings) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe EmbeddedDestinationSettings
a -> CaptionDestinationSettings
s {$sel:embeddedDestinationSettings:CaptionDestinationSettings' :: Maybe EmbeddedDestinationSettings
embeddedDestinationSettings = Maybe EmbeddedDestinationSettings
a} :: CaptionDestinationSettings)

-- | Settings related to SCC captions. SCC is a sidecar format that holds
-- captions in a file that is separate from the video container. Set up
-- sidecar captions in the same output group, but different output from
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/scc-srt-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to SCC.
captionDestinationSettings_sccDestinationSettings :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe SccDestinationSettings)
captionDestinationSettings_sccDestinationSettings :: (Maybe SccDestinationSettings -> f (Maybe SccDestinationSettings))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_sccDestinationSettings = (CaptionDestinationSettings -> Maybe SccDestinationSettings)
-> (CaptionDestinationSettings
    -> Maybe SccDestinationSettings -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe SccDestinationSettings)
     (Maybe SccDestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe SccDestinationSettings
sccDestinationSettings :: Maybe SccDestinationSettings
$sel:sccDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe SccDestinationSettings
sccDestinationSettings} -> Maybe SccDestinationSettings
sccDestinationSettings) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe SccDestinationSettings
a -> CaptionDestinationSettings
s {$sel:sccDestinationSettings:CaptionDestinationSettings' :: Maybe SccDestinationSettings
sccDestinationSettings = Maybe SccDestinationSettings
a} :: CaptionDestinationSettings)

-- | Burn-in is a captions delivery method, rather than a captions format.
-- Burn-in writes the captions directly on your video frames, replacing
-- pixels of video content with the captions. Set up burn-in captions in
-- the same output as your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/burn-in-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to
-- BURN_IN.
captionDestinationSettings_burninDestinationSettings :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe BurninDestinationSettings)
captionDestinationSettings_burninDestinationSettings :: (Maybe BurninDestinationSettings
 -> f (Maybe BurninDestinationSettings))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_burninDestinationSettings = (CaptionDestinationSettings -> Maybe BurninDestinationSettings)
-> (CaptionDestinationSettings
    -> Maybe BurninDestinationSettings -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe BurninDestinationSettings)
     (Maybe BurninDestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe BurninDestinationSettings
burninDestinationSettings :: Maybe BurninDestinationSettings
$sel:burninDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe BurninDestinationSettings
burninDestinationSettings} -> Maybe BurninDestinationSettings
burninDestinationSettings) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe BurninDestinationSettings
a -> CaptionDestinationSettings
s {$sel:burninDestinationSettings:CaptionDestinationSettings' :: Maybe BurninDestinationSettings
burninDestinationSettings = Maybe BurninDestinationSettings
a} :: CaptionDestinationSettings)

-- | Settings related to IMSC captions. IMSC is a sidecar format that holds
-- captions in a file that is separate from the video container. Set up
-- sidecar captions in the same output group, but different output from
-- your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/ttml-and-webvtt-output-captions.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set destinationType to IMSC.
captionDestinationSettings_imscDestinationSettings :: Lens.Lens' CaptionDestinationSettings (Prelude.Maybe ImscDestinationSettings)
captionDestinationSettings_imscDestinationSettings :: (Maybe ImscDestinationSettings
 -> f (Maybe ImscDestinationSettings))
-> CaptionDestinationSettings -> f CaptionDestinationSettings
captionDestinationSettings_imscDestinationSettings = (CaptionDestinationSettings -> Maybe ImscDestinationSettings)
-> (CaptionDestinationSettings
    -> Maybe ImscDestinationSettings -> CaptionDestinationSettings)
-> Lens
     CaptionDestinationSettings
     CaptionDestinationSettings
     (Maybe ImscDestinationSettings)
     (Maybe ImscDestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionDestinationSettings' {Maybe ImscDestinationSettings
imscDestinationSettings :: Maybe ImscDestinationSettings
$sel:imscDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe ImscDestinationSettings
imscDestinationSettings} -> Maybe ImscDestinationSettings
imscDestinationSettings) (\s :: CaptionDestinationSettings
s@CaptionDestinationSettings' {} Maybe ImscDestinationSettings
a -> CaptionDestinationSettings
s {$sel:imscDestinationSettings:CaptionDestinationSettings' :: Maybe ImscDestinationSettings
imscDestinationSettings = Maybe ImscDestinationSettings
a} :: CaptionDestinationSettings)

instance Core.FromJSON CaptionDestinationSettings where
  parseJSON :: Value -> Parser CaptionDestinationSettings
parseJSON =
    String
-> (Object -> Parser CaptionDestinationSettings)
-> Value
-> Parser CaptionDestinationSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CaptionDestinationSettings"
      ( \Object
x ->
          Maybe SrtDestinationSettings
-> Maybe TeletextDestinationSettings
-> Maybe DvbSubDestinationSettings
-> Maybe TtmlDestinationSettings
-> Maybe CaptionDestinationType
-> Maybe WebvttDestinationSettings
-> Maybe EmbeddedDestinationSettings
-> Maybe SccDestinationSettings
-> Maybe BurninDestinationSettings
-> Maybe ImscDestinationSettings
-> CaptionDestinationSettings
CaptionDestinationSettings'
            (Maybe SrtDestinationSettings
 -> Maybe TeletextDestinationSettings
 -> Maybe DvbSubDestinationSettings
 -> Maybe TtmlDestinationSettings
 -> Maybe CaptionDestinationType
 -> Maybe WebvttDestinationSettings
 -> Maybe EmbeddedDestinationSettings
 -> Maybe SccDestinationSettings
 -> Maybe BurninDestinationSettings
 -> Maybe ImscDestinationSettings
 -> CaptionDestinationSettings)
-> Parser (Maybe SrtDestinationSettings)
-> Parser
     (Maybe TeletextDestinationSettings
      -> Maybe DvbSubDestinationSettings
      -> Maybe TtmlDestinationSettings
      -> Maybe CaptionDestinationType
      -> Maybe WebvttDestinationSettings
      -> Maybe EmbeddedDestinationSettings
      -> Maybe SccDestinationSettings
      -> Maybe BurninDestinationSettings
      -> Maybe ImscDestinationSettings
      -> CaptionDestinationSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SrtDestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"srtDestinationSettings")
            Parser
  (Maybe TeletextDestinationSettings
   -> Maybe DvbSubDestinationSettings
   -> Maybe TtmlDestinationSettings
   -> Maybe CaptionDestinationType
   -> Maybe WebvttDestinationSettings
   -> Maybe EmbeddedDestinationSettings
   -> Maybe SccDestinationSettings
   -> Maybe BurninDestinationSettings
   -> Maybe ImscDestinationSettings
   -> CaptionDestinationSettings)
-> Parser (Maybe TeletextDestinationSettings)
-> Parser
     (Maybe DvbSubDestinationSettings
      -> Maybe TtmlDestinationSettings
      -> Maybe CaptionDestinationType
      -> Maybe WebvttDestinationSettings
      -> Maybe EmbeddedDestinationSettings
      -> Maybe SccDestinationSettings
      -> Maybe BurninDestinationSettings
      -> Maybe ImscDestinationSettings
      -> CaptionDestinationSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TeletextDestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"teletextDestinationSettings")
            Parser
  (Maybe DvbSubDestinationSettings
   -> Maybe TtmlDestinationSettings
   -> Maybe CaptionDestinationType
   -> Maybe WebvttDestinationSettings
   -> Maybe EmbeddedDestinationSettings
   -> Maybe SccDestinationSettings
   -> Maybe BurninDestinationSettings
   -> Maybe ImscDestinationSettings
   -> CaptionDestinationSettings)
-> Parser (Maybe DvbSubDestinationSettings)
-> Parser
     (Maybe TtmlDestinationSettings
      -> Maybe CaptionDestinationType
      -> Maybe WebvttDestinationSettings
      -> Maybe EmbeddedDestinationSettings
      -> Maybe SccDestinationSettings
      -> Maybe BurninDestinationSettings
      -> Maybe ImscDestinationSettings
      -> CaptionDestinationSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DvbSubDestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dvbSubDestinationSettings")
            Parser
  (Maybe TtmlDestinationSettings
   -> Maybe CaptionDestinationType
   -> Maybe WebvttDestinationSettings
   -> Maybe EmbeddedDestinationSettings
   -> Maybe SccDestinationSettings
   -> Maybe BurninDestinationSettings
   -> Maybe ImscDestinationSettings
   -> CaptionDestinationSettings)
-> Parser (Maybe TtmlDestinationSettings)
-> Parser
     (Maybe CaptionDestinationType
      -> Maybe WebvttDestinationSettings
      -> Maybe EmbeddedDestinationSettings
      -> Maybe SccDestinationSettings
      -> Maybe BurninDestinationSettings
      -> Maybe ImscDestinationSettings
      -> CaptionDestinationSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TtmlDestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ttmlDestinationSettings")
            Parser
  (Maybe CaptionDestinationType
   -> Maybe WebvttDestinationSettings
   -> Maybe EmbeddedDestinationSettings
   -> Maybe SccDestinationSettings
   -> Maybe BurninDestinationSettings
   -> Maybe ImscDestinationSettings
   -> CaptionDestinationSettings)
-> Parser (Maybe CaptionDestinationType)
-> Parser
     (Maybe WebvttDestinationSettings
      -> Maybe EmbeddedDestinationSettings
      -> Maybe SccDestinationSettings
      -> Maybe BurninDestinationSettings
      -> Maybe ImscDestinationSettings
      -> CaptionDestinationSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CaptionDestinationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destinationType")
            Parser
  (Maybe WebvttDestinationSettings
   -> Maybe EmbeddedDestinationSettings
   -> Maybe SccDestinationSettings
   -> Maybe BurninDestinationSettings
   -> Maybe ImscDestinationSettings
   -> CaptionDestinationSettings)
-> Parser (Maybe WebvttDestinationSettings)
-> Parser
     (Maybe EmbeddedDestinationSettings
      -> Maybe SccDestinationSettings
      -> Maybe BurninDestinationSettings
      -> Maybe ImscDestinationSettings
      -> CaptionDestinationSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe WebvttDestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"webvttDestinationSettings")
            Parser
  (Maybe EmbeddedDestinationSettings
   -> Maybe SccDestinationSettings
   -> Maybe BurninDestinationSettings
   -> Maybe ImscDestinationSettings
   -> CaptionDestinationSettings)
-> Parser (Maybe EmbeddedDestinationSettings)
-> Parser
     (Maybe SccDestinationSettings
      -> Maybe BurninDestinationSettings
      -> Maybe ImscDestinationSettings
      -> CaptionDestinationSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EmbeddedDestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"embeddedDestinationSettings")
            Parser
  (Maybe SccDestinationSettings
   -> Maybe BurninDestinationSettings
   -> Maybe ImscDestinationSettings
   -> CaptionDestinationSettings)
-> Parser (Maybe SccDestinationSettings)
-> Parser
     (Maybe BurninDestinationSettings
      -> Maybe ImscDestinationSettings -> CaptionDestinationSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SccDestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sccDestinationSettings")
            Parser
  (Maybe BurninDestinationSettings
   -> Maybe ImscDestinationSettings -> CaptionDestinationSettings)
-> Parser (Maybe BurninDestinationSettings)
-> Parser
     (Maybe ImscDestinationSettings -> CaptionDestinationSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BurninDestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"burninDestinationSettings")
            Parser
  (Maybe ImscDestinationSettings -> CaptionDestinationSettings)
-> Parser (Maybe ImscDestinationSettings)
-> Parser CaptionDestinationSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImscDestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imscDestinationSettings")
      )

instance Prelude.Hashable CaptionDestinationSettings

instance Prelude.NFData CaptionDestinationSettings

instance Core.ToJSON CaptionDestinationSettings where
  toJSON :: CaptionDestinationSettings -> Value
toJSON CaptionDestinationSettings' {Maybe CaptionDestinationType
Maybe EmbeddedDestinationSettings
Maybe DvbSubDestinationSettings
Maybe BurninDestinationSettings
Maybe ImscDestinationSettings
Maybe SccDestinationSettings
Maybe SrtDestinationSettings
Maybe TeletextDestinationSettings
Maybe TtmlDestinationSettings
Maybe WebvttDestinationSettings
imscDestinationSettings :: Maybe ImscDestinationSettings
burninDestinationSettings :: Maybe BurninDestinationSettings
sccDestinationSettings :: Maybe SccDestinationSettings
embeddedDestinationSettings :: Maybe EmbeddedDestinationSettings
webvttDestinationSettings :: Maybe WebvttDestinationSettings
destinationType :: Maybe CaptionDestinationType
ttmlDestinationSettings :: Maybe TtmlDestinationSettings
dvbSubDestinationSettings :: Maybe DvbSubDestinationSettings
teletextDestinationSettings :: Maybe TeletextDestinationSettings
srtDestinationSettings :: Maybe SrtDestinationSettings
$sel:imscDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe ImscDestinationSettings
$sel:burninDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe BurninDestinationSettings
$sel:sccDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe SccDestinationSettings
$sel:embeddedDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe EmbeddedDestinationSettings
$sel:webvttDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe WebvttDestinationSettings
$sel:destinationType:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe CaptionDestinationType
$sel:ttmlDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe TtmlDestinationSettings
$sel:dvbSubDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe DvbSubDestinationSettings
$sel:teletextDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe TeletextDestinationSettings
$sel:srtDestinationSettings:CaptionDestinationSettings' :: CaptionDestinationSettings -> Maybe SrtDestinationSettings
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"srtDestinationSettings" Text -> SrtDestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SrtDestinationSettings -> Pair)
-> Maybe SrtDestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SrtDestinationSettings
srtDestinationSettings,
            (Text
"teletextDestinationSettings" Text -> TeletextDestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (TeletextDestinationSettings -> Pair)
-> Maybe TeletextDestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TeletextDestinationSettings
teletextDestinationSettings,
            (Text
"dvbSubDestinationSettings" Text -> DvbSubDestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DvbSubDestinationSettings -> Pair)
-> Maybe DvbSubDestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DvbSubDestinationSettings
dvbSubDestinationSettings,
            (Text
"ttmlDestinationSettings" Text -> TtmlDestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (TtmlDestinationSettings -> Pair)
-> Maybe TtmlDestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TtmlDestinationSettings
ttmlDestinationSettings,
            (Text
"destinationType" Text -> CaptionDestinationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (CaptionDestinationType -> Pair)
-> Maybe CaptionDestinationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CaptionDestinationType
destinationType,
            (Text
"webvttDestinationSettings" Text -> WebvttDestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (WebvttDestinationSettings -> Pair)
-> Maybe WebvttDestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WebvttDestinationSettings
webvttDestinationSettings,
            (Text
"embeddedDestinationSettings" Text -> EmbeddedDestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (EmbeddedDestinationSettings -> Pair)
-> Maybe EmbeddedDestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EmbeddedDestinationSettings
embeddedDestinationSettings,
            (Text
"sccDestinationSettings" Text -> SccDestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SccDestinationSettings -> Pair)
-> Maybe SccDestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SccDestinationSettings
sccDestinationSettings,
            (Text
"burninDestinationSettings" Text -> BurninDestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BurninDestinationSettings -> Pair)
-> Maybe BurninDestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BurninDestinationSettings
burninDestinationSettings,
            (Text
"imscDestinationSettings" Text -> ImscDestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ImscDestinationSettings -> Pair)
-> Maybe ImscDestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ImscDestinationSettings
imscDestinationSettings
          ]
      )