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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.CaptionSourceFramerate
import Amazonka.MediaConvert.Types.FileSourceConvert608To708
import Amazonka.MediaConvert.Types.FileSourceTimeDeltaUnits
import qualified Amazonka.Prelude as Prelude

-- | If your input captions are SCC, SMI, SRT, STL, TTML, WebVTT, or IMSC 1.1
-- in an xml file, specify the URI of the input caption source file. If
-- your caption source is IMSC in an IMF package, use TrackSourceSettings
-- instead of FileSoureSettings.
--
-- /See:/ 'newFileSourceSettings' smart constructor.
data FileSourceSettings = FileSourceSettings'
  { -- | Ignore this setting unless your input captions format is SCC. To have
    -- the service compensate for differing frame rates between your input
    -- captions and input video, specify the frame rate of the captions file.
    -- Specify this value as a fraction. When you work directly in your JSON
    -- job specification, use the settings framerateNumerator and
    -- framerateDenominator. For example, you might specify 24 \/ 1 for 24 fps,
    -- 25 \/ 1 for 25 fps, 24000 \/ 1001 for 23.976 fps, or 30000 \/ 1001 for
    -- 29.97 fps.
    FileSourceSettings -> Maybe CaptionSourceFramerate
framerate :: Prelude.Maybe CaptionSourceFramerate,
    -- | Specify whether this set of input captions appears in your outputs in
    -- both 608 and 708 format. If you choose Upconvert (UPCONVERT),
    -- MediaConvert includes the captions data in two ways: it passes the 608
    -- data through using the 608 compatibility bytes fields of the 708
    -- wrapper, and it also translates the 608 data into 708.
    FileSourceSettings -> Maybe FileSourceConvert608To708
convert608To708 :: Prelude.Maybe FileSourceConvert608To708,
    -- | Optional. Use this setting when you need to adjust the sync between your
    -- sidecar captions and your video. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/time-delta-use-cases.html.
    -- Enter a positive or negative number to modify the times in the captions
    -- file. For example, type 15 to add 15 seconds to all the times in the
    -- captions file. Type -5 to subtract 5 seconds from the times in the
    -- captions file. You can optionally specify your time delta in
    -- milliseconds instead of seconds. When you do so, set the related
    -- setting, Time delta units (TimeDeltaUnits) to Milliseconds
    -- (MILLISECONDS). Note that, when you specify a time delta for
    -- timecode-based caption sources, such as SCC and STL, and your time delta
    -- isn\'t a multiple of the input frame rate, MediaConvert snaps the
    -- captions to the nearest frame. For example, when your input video frame
    -- rate is 25 fps and you specify 1010ms for time delta, MediaConvert
    -- delays your captions by 1000 ms.
    FileSourceSettings -> Maybe Int
timeDelta :: Prelude.Maybe Prelude.Int,
    -- | When you use the setting Time delta (TimeDelta) to adjust the sync
    -- between your sidecar captions and your video, use this setting to
    -- specify the units for the delta that you specify. When you don\'t
    -- specify a value for Time delta units (TimeDeltaUnits), MediaConvert uses
    -- seconds by default.
    FileSourceSettings -> Maybe FileSourceTimeDeltaUnits
timeDeltaUnits :: Prelude.Maybe FileSourceTimeDeltaUnits,
    -- | External caption file used for loading captions. Accepted file
    -- extensions are \'scc\', \'ttml\', \'dfxp\', \'stl\', \'srt\', \'xml\',
    -- \'smi\', \'webvtt\', and \'vtt\'.
    FileSourceSettings -> Maybe Text
sourceFile :: Prelude.Maybe Prelude.Text
  }
  deriving (FileSourceSettings -> FileSourceSettings -> Bool
(FileSourceSettings -> FileSourceSettings -> Bool)
-> (FileSourceSettings -> FileSourceSettings -> Bool)
-> Eq FileSourceSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileSourceSettings -> FileSourceSettings -> Bool
$c/= :: FileSourceSettings -> FileSourceSettings -> Bool
== :: FileSourceSettings -> FileSourceSettings -> Bool
$c== :: FileSourceSettings -> FileSourceSettings -> Bool
Prelude.Eq, ReadPrec [FileSourceSettings]
ReadPrec FileSourceSettings
Int -> ReadS FileSourceSettings
ReadS [FileSourceSettings]
(Int -> ReadS FileSourceSettings)
-> ReadS [FileSourceSettings]
-> ReadPrec FileSourceSettings
-> ReadPrec [FileSourceSettings]
-> Read FileSourceSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileSourceSettings]
$creadListPrec :: ReadPrec [FileSourceSettings]
readPrec :: ReadPrec FileSourceSettings
$creadPrec :: ReadPrec FileSourceSettings
readList :: ReadS [FileSourceSettings]
$creadList :: ReadS [FileSourceSettings]
readsPrec :: Int -> ReadS FileSourceSettings
$creadsPrec :: Int -> ReadS FileSourceSettings
Prelude.Read, Int -> FileSourceSettings -> ShowS
[FileSourceSettings] -> ShowS
FileSourceSettings -> String
(Int -> FileSourceSettings -> ShowS)
-> (FileSourceSettings -> String)
-> ([FileSourceSettings] -> ShowS)
-> Show FileSourceSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileSourceSettings] -> ShowS
$cshowList :: [FileSourceSettings] -> ShowS
show :: FileSourceSettings -> String
$cshow :: FileSourceSettings -> String
showsPrec :: Int -> FileSourceSettings -> ShowS
$cshowsPrec :: Int -> FileSourceSettings -> ShowS
Prelude.Show, (forall x. FileSourceSettings -> Rep FileSourceSettings x)
-> (forall x. Rep FileSourceSettings x -> FileSourceSettings)
-> Generic FileSourceSettings
forall x. Rep FileSourceSettings x -> FileSourceSettings
forall x. FileSourceSettings -> Rep FileSourceSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FileSourceSettings x -> FileSourceSettings
$cfrom :: forall x. FileSourceSettings -> Rep FileSourceSettings x
Prelude.Generic)

-- |
-- Create a value of 'FileSourceSettings' 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:
--
-- 'framerate', 'fileSourceSettings_framerate' - Ignore this setting unless your input captions format is SCC. To have
-- the service compensate for differing frame rates between your input
-- captions and input video, specify the frame rate of the captions file.
-- Specify this value as a fraction. When you work directly in your JSON
-- job specification, use the settings framerateNumerator and
-- framerateDenominator. For example, you might specify 24 \/ 1 for 24 fps,
-- 25 \/ 1 for 25 fps, 24000 \/ 1001 for 23.976 fps, or 30000 \/ 1001 for
-- 29.97 fps.
--
-- 'convert608To708', 'fileSourceSettings_convert608To708' - Specify whether this set of input captions appears in your outputs in
-- both 608 and 708 format. If you choose Upconvert (UPCONVERT),
-- MediaConvert includes the captions data in two ways: it passes the 608
-- data through using the 608 compatibility bytes fields of the 708
-- wrapper, and it also translates the 608 data into 708.
--
-- 'timeDelta', 'fileSourceSettings_timeDelta' - Optional. Use this setting when you need to adjust the sync between your
-- sidecar captions and your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/time-delta-use-cases.html.
-- Enter a positive or negative number to modify the times in the captions
-- file. For example, type 15 to add 15 seconds to all the times in the
-- captions file. Type -5 to subtract 5 seconds from the times in the
-- captions file. You can optionally specify your time delta in
-- milliseconds instead of seconds. When you do so, set the related
-- setting, Time delta units (TimeDeltaUnits) to Milliseconds
-- (MILLISECONDS). Note that, when you specify a time delta for
-- timecode-based caption sources, such as SCC and STL, and your time delta
-- isn\'t a multiple of the input frame rate, MediaConvert snaps the
-- captions to the nearest frame. For example, when your input video frame
-- rate is 25 fps and you specify 1010ms for time delta, MediaConvert
-- delays your captions by 1000 ms.
--
-- 'timeDeltaUnits', 'fileSourceSettings_timeDeltaUnits' - When you use the setting Time delta (TimeDelta) to adjust the sync
-- between your sidecar captions and your video, use this setting to
-- specify the units for the delta that you specify. When you don\'t
-- specify a value for Time delta units (TimeDeltaUnits), MediaConvert uses
-- seconds by default.
--
-- 'sourceFile', 'fileSourceSettings_sourceFile' - External caption file used for loading captions. Accepted file
-- extensions are \'scc\', \'ttml\', \'dfxp\', \'stl\', \'srt\', \'xml\',
-- \'smi\', \'webvtt\', and \'vtt\'.
newFileSourceSettings ::
  FileSourceSettings
newFileSourceSettings :: FileSourceSettings
newFileSourceSettings =
  FileSourceSettings' :: Maybe CaptionSourceFramerate
-> Maybe FileSourceConvert608To708
-> Maybe Int
-> Maybe FileSourceTimeDeltaUnits
-> Maybe Text
-> FileSourceSettings
FileSourceSettings'
    { $sel:framerate:FileSourceSettings' :: Maybe CaptionSourceFramerate
framerate = Maybe CaptionSourceFramerate
forall a. Maybe a
Prelude.Nothing,
      $sel:convert608To708:FileSourceSettings' :: Maybe FileSourceConvert608To708
convert608To708 = Maybe FileSourceConvert608To708
forall a. Maybe a
Prelude.Nothing,
      $sel:timeDelta:FileSourceSettings' :: Maybe Int
timeDelta = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:timeDeltaUnits:FileSourceSettings' :: Maybe FileSourceTimeDeltaUnits
timeDeltaUnits = Maybe FileSourceTimeDeltaUnits
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceFile:FileSourceSettings' :: Maybe Text
sourceFile = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Ignore this setting unless your input captions format is SCC. To have
-- the service compensate for differing frame rates between your input
-- captions and input video, specify the frame rate of the captions file.
-- Specify this value as a fraction. When you work directly in your JSON
-- job specification, use the settings framerateNumerator and
-- framerateDenominator. For example, you might specify 24 \/ 1 for 24 fps,
-- 25 \/ 1 for 25 fps, 24000 \/ 1001 for 23.976 fps, or 30000 \/ 1001 for
-- 29.97 fps.
fileSourceSettings_framerate :: Lens.Lens' FileSourceSettings (Prelude.Maybe CaptionSourceFramerate)
fileSourceSettings_framerate :: (Maybe CaptionSourceFramerate -> f (Maybe CaptionSourceFramerate))
-> FileSourceSettings -> f FileSourceSettings
fileSourceSettings_framerate = (FileSourceSettings -> Maybe CaptionSourceFramerate)
-> (FileSourceSettings
    -> Maybe CaptionSourceFramerate -> FileSourceSettings)
-> Lens
     FileSourceSettings
     FileSourceSettings
     (Maybe CaptionSourceFramerate)
     (Maybe CaptionSourceFramerate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSourceSettings' {Maybe CaptionSourceFramerate
framerate :: Maybe CaptionSourceFramerate
$sel:framerate:FileSourceSettings' :: FileSourceSettings -> Maybe CaptionSourceFramerate
framerate} -> Maybe CaptionSourceFramerate
framerate) (\s :: FileSourceSettings
s@FileSourceSettings' {} Maybe CaptionSourceFramerate
a -> FileSourceSettings
s {$sel:framerate:FileSourceSettings' :: Maybe CaptionSourceFramerate
framerate = Maybe CaptionSourceFramerate
a} :: FileSourceSettings)

-- | Specify whether this set of input captions appears in your outputs in
-- both 608 and 708 format. If you choose Upconvert (UPCONVERT),
-- MediaConvert includes the captions data in two ways: it passes the 608
-- data through using the 608 compatibility bytes fields of the 708
-- wrapper, and it also translates the 608 data into 708.
fileSourceSettings_convert608To708 :: Lens.Lens' FileSourceSettings (Prelude.Maybe FileSourceConvert608To708)
fileSourceSettings_convert608To708 :: (Maybe FileSourceConvert608To708
 -> f (Maybe FileSourceConvert608To708))
-> FileSourceSettings -> f FileSourceSettings
fileSourceSettings_convert608To708 = (FileSourceSettings -> Maybe FileSourceConvert608To708)
-> (FileSourceSettings
    -> Maybe FileSourceConvert608To708 -> FileSourceSettings)
-> Lens
     FileSourceSettings
     FileSourceSettings
     (Maybe FileSourceConvert608To708)
     (Maybe FileSourceConvert608To708)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSourceSettings' {Maybe FileSourceConvert608To708
convert608To708 :: Maybe FileSourceConvert608To708
$sel:convert608To708:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceConvert608To708
convert608To708} -> Maybe FileSourceConvert608To708
convert608To708) (\s :: FileSourceSettings
s@FileSourceSettings' {} Maybe FileSourceConvert608To708
a -> FileSourceSettings
s {$sel:convert608To708:FileSourceSettings' :: Maybe FileSourceConvert608To708
convert608To708 = Maybe FileSourceConvert608To708
a} :: FileSourceSettings)

-- | Optional. Use this setting when you need to adjust the sync between your
-- sidecar captions and your video. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/time-delta-use-cases.html.
-- Enter a positive or negative number to modify the times in the captions
-- file. For example, type 15 to add 15 seconds to all the times in the
-- captions file. Type -5 to subtract 5 seconds from the times in the
-- captions file. You can optionally specify your time delta in
-- milliseconds instead of seconds. When you do so, set the related
-- setting, Time delta units (TimeDeltaUnits) to Milliseconds
-- (MILLISECONDS). Note that, when you specify a time delta for
-- timecode-based caption sources, such as SCC and STL, and your time delta
-- isn\'t a multiple of the input frame rate, MediaConvert snaps the
-- captions to the nearest frame. For example, when your input video frame
-- rate is 25 fps and you specify 1010ms for time delta, MediaConvert
-- delays your captions by 1000 ms.
fileSourceSettings_timeDelta :: Lens.Lens' FileSourceSettings (Prelude.Maybe Prelude.Int)
fileSourceSettings_timeDelta :: (Maybe Int -> f (Maybe Int))
-> FileSourceSettings -> f FileSourceSettings
fileSourceSettings_timeDelta = (FileSourceSettings -> Maybe Int)
-> (FileSourceSettings -> Maybe Int -> FileSourceSettings)
-> Lens
     FileSourceSettings FileSourceSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSourceSettings' {Maybe Int
timeDelta :: Maybe Int
$sel:timeDelta:FileSourceSettings' :: FileSourceSettings -> Maybe Int
timeDelta} -> Maybe Int
timeDelta) (\s :: FileSourceSettings
s@FileSourceSettings' {} Maybe Int
a -> FileSourceSettings
s {$sel:timeDelta:FileSourceSettings' :: Maybe Int
timeDelta = Maybe Int
a} :: FileSourceSettings)

-- | When you use the setting Time delta (TimeDelta) to adjust the sync
-- between your sidecar captions and your video, use this setting to
-- specify the units for the delta that you specify. When you don\'t
-- specify a value for Time delta units (TimeDeltaUnits), MediaConvert uses
-- seconds by default.
fileSourceSettings_timeDeltaUnits :: Lens.Lens' FileSourceSettings (Prelude.Maybe FileSourceTimeDeltaUnits)
fileSourceSettings_timeDeltaUnits :: (Maybe FileSourceTimeDeltaUnits
 -> f (Maybe FileSourceTimeDeltaUnits))
-> FileSourceSettings -> f FileSourceSettings
fileSourceSettings_timeDeltaUnits = (FileSourceSettings -> Maybe FileSourceTimeDeltaUnits)
-> (FileSourceSettings
    -> Maybe FileSourceTimeDeltaUnits -> FileSourceSettings)
-> Lens
     FileSourceSettings
     FileSourceSettings
     (Maybe FileSourceTimeDeltaUnits)
     (Maybe FileSourceTimeDeltaUnits)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSourceSettings' {Maybe FileSourceTimeDeltaUnits
timeDeltaUnits :: Maybe FileSourceTimeDeltaUnits
$sel:timeDeltaUnits:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceTimeDeltaUnits
timeDeltaUnits} -> Maybe FileSourceTimeDeltaUnits
timeDeltaUnits) (\s :: FileSourceSettings
s@FileSourceSettings' {} Maybe FileSourceTimeDeltaUnits
a -> FileSourceSettings
s {$sel:timeDeltaUnits:FileSourceSettings' :: Maybe FileSourceTimeDeltaUnits
timeDeltaUnits = Maybe FileSourceTimeDeltaUnits
a} :: FileSourceSettings)

-- | External caption file used for loading captions. Accepted file
-- extensions are \'scc\', \'ttml\', \'dfxp\', \'stl\', \'srt\', \'xml\',
-- \'smi\', \'webvtt\', and \'vtt\'.
fileSourceSettings_sourceFile :: Lens.Lens' FileSourceSettings (Prelude.Maybe Prelude.Text)
fileSourceSettings_sourceFile :: (Maybe Text -> f (Maybe Text))
-> FileSourceSettings -> f FileSourceSettings
fileSourceSettings_sourceFile = (FileSourceSettings -> Maybe Text)
-> (FileSourceSettings -> Maybe Text -> FileSourceSettings)
-> Lens
     FileSourceSettings FileSourceSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSourceSettings' {Maybe Text
sourceFile :: Maybe Text
$sel:sourceFile:FileSourceSettings' :: FileSourceSettings -> Maybe Text
sourceFile} -> Maybe Text
sourceFile) (\s :: FileSourceSettings
s@FileSourceSettings' {} Maybe Text
a -> FileSourceSettings
s {$sel:sourceFile:FileSourceSettings' :: Maybe Text
sourceFile = Maybe Text
a} :: FileSourceSettings)

instance Core.FromJSON FileSourceSettings where
  parseJSON :: Value -> Parser FileSourceSettings
parseJSON =
    String
-> (Object -> Parser FileSourceSettings)
-> Value
-> Parser FileSourceSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FileSourceSettings"
      ( \Object
x ->
          Maybe CaptionSourceFramerate
-> Maybe FileSourceConvert608To708
-> Maybe Int
-> Maybe FileSourceTimeDeltaUnits
-> Maybe Text
-> FileSourceSettings
FileSourceSettings'
            (Maybe CaptionSourceFramerate
 -> Maybe FileSourceConvert608To708
 -> Maybe Int
 -> Maybe FileSourceTimeDeltaUnits
 -> Maybe Text
 -> FileSourceSettings)
-> Parser (Maybe CaptionSourceFramerate)
-> Parser
     (Maybe FileSourceConvert608To708
      -> Maybe Int
      -> Maybe FileSourceTimeDeltaUnits
      -> Maybe Text
      -> FileSourceSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe CaptionSourceFramerate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerate")
            Parser
  (Maybe FileSourceConvert608To708
   -> Maybe Int
   -> Maybe FileSourceTimeDeltaUnits
   -> Maybe Text
   -> FileSourceSettings)
-> Parser (Maybe FileSourceConvert608To708)
-> Parser
     (Maybe Int
      -> Maybe FileSourceTimeDeltaUnits
      -> Maybe Text
      -> FileSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FileSourceConvert608To708)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"convert608To708")
            Parser
  (Maybe Int
   -> Maybe FileSourceTimeDeltaUnits
   -> Maybe Text
   -> FileSourceSettings)
-> Parser (Maybe Int)
-> Parser
     (Maybe FileSourceTimeDeltaUnits
      -> Maybe Text -> FileSourceSettings)
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
"timeDelta")
            Parser
  (Maybe FileSourceTimeDeltaUnits
   -> Maybe Text -> FileSourceSettings)
-> Parser (Maybe FileSourceTimeDeltaUnits)
-> Parser (Maybe Text -> FileSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FileSourceTimeDeltaUnits)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timeDeltaUnits")
            Parser (Maybe Text -> FileSourceSettings)
-> Parser (Maybe Text) -> Parser FileSourceSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceFile")
      )

instance Prelude.Hashable FileSourceSettings

instance Prelude.NFData FileSourceSettings

instance Core.ToJSON FileSourceSettings where
  toJSON :: FileSourceSettings -> Value
toJSON FileSourceSettings' {Maybe Int
Maybe Text
Maybe CaptionSourceFramerate
Maybe FileSourceConvert608To708
Maybe FileSourceTimeDeltaUnits
sourceFile :: Maybe Text
timeDeltaUnits :: Maybe FileSourceTimeDeltaUnits
timeDelta :: Maybe Int
convert608To708 :: Maybe FileSourceConvert608To708
framerate :: Maybe CaptionSourceFramerate
$sel:sourceFile:FileSourceSettings' :: FileSourceSettings -> Maybe Text
$sel:timeDeltaUnits:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceTimeDeltaUnits
$sel:timeDelta:FileSourceSettings' :: FileSourceSettings -> Maybe Int
$sel:convert608To708:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceConvert608To708
$sel:framerate:FileSourceSettings' :: FileSourceSettings -> Maybe CaptionSourceFramerate
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"framerate" Text -> CaptionSourceFramerate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CaptionSourceFramerate -> Pair)
-> Maybe CaptionSourceFramerate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CaptionSourceFramerate
framerate,
            (Text
"convert608To708" Text -> FileSourceConvert608To708 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (FileSourceConvert608To708 -> Pair)
-> Maybe FileSourceConvert608To708 -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileSourceConvert608To708
convert608To708,
            (Text
"timeDelta" 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
timeDelta,
            (Text
"timeDeltaUnits" Text -> FileSourceTimeDeltaUnits -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (FileSourceTimeDeltaUnits -> Pair)
-> Maybe FileSourceTimeDeltaUnits -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileSourceTimeDeltaUnits
timeDeltaUnits,
            (Text
"sourceFile" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceFile
          ]
      )