{-# 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 #-}
module Amazonka.MediaConvert.Types.FileSourceSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.CaptionSourceFramerate
import Amazonka.MediaConvert.Types.FileSourceConvert608To708
import Amazonka.MediaConvert.Types.FileSourceTimeDeltaUnits
import qualified Amazonka.Prelude as Prelude
data FileSourceSettings = FileSourceSettings'
{
FileSourceSettings -> Maybe FileSourceConvert608To708
convert608To708 :: Prelude.Maybe FileSourceConvert608To708,
FileSourceSettings -> Maybe CaptionSourceFramerate
framerate :: Prelude.Maybe CaptionSourceFramerate,
FileSourceSettings -> Maybe Text
sourceFile :: Prelude.Maybe Prelude.Text,
FileSourceSettings -> Maybe Int
timeDelta :: Prelude.Maybe Prelude.Int,
FileSourceSettings -> Maybe FileSourceTimeDeltaUnits
timeDeltaUnits :: Prelude.Maybe FileSourceTimeDeltaUnits
}
deriving (FileSourceSettings -> FileSourceSettings -> Bool
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]
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
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. 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)
newFileSourceSettings ::
FileSourceSettings
newFileSourceSettings :: FileSourceSettings
newFileSourceSettings =
FileSourceSettings'
{ $sel:convert608To708:FileSourceSettings' :: Maybe FileSourceConvert608To708
convert608To708 =
forall a. Maybe a
Prelude.Nothing,
$sel:framerate:FileSourceSettings' :: Maybe CaptionSourceFramerate
framerate = forall a. Maybe a
Prelude.Nothing,
$sel:sourceFile:FileSourceSettings' :: Maybe Text
sourceFile = forall a. Maybe a
Prelude.Nothing,
$sel:timeDelta:FileSourceSettings' :: Maybe Int
timeDelta = forall a. Maybe a
Prelude.Nothing,
$sel:timeDeltaUnits:FileSourceSettings' :: Maybe FileSourceTimeDeltaUnits
timeDeltaUnits = forall a. Maybe a
Prelude.Nothing
}
fileSourceSettings_convert608To708 :: Lens.Lens' FileSourceSettings (Prelude.Maybe FileSourceConvert608To708)
fileSourceSettings_convert608To708 :: Lens' FileSourceSettings (Maybe FileSourceConvert608To708)
fileSourceSettings_convert608To708 = 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)
fileSourceSettings_framerate :: Lens.Lens' FileSourceSettings (Prelude.Maybe CaptionSourceFramerate)
fileSourceSettings_framerate :: Lens' FileSourceSettings (Maybe CaptionSourceFramerate)
fileSourceSettings_framerate = 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)
fileSourceSettings_sourceFile :: Lens.Lens' FileSourceSettings (Prelude.Maybe Prelude.Text)
fileSourceSettings_sourceFile :: Lens' FileSourceSettings (Maybe Text)
fileSourceSettings_sourceFile = 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)
fileSourceSettings_timeDelta :: Lens.Lens' FileSourceSettings (Prelude.Maybe Prelude.Int)
fileSourceSettings_timeDelta :: Lens' FileSourceSettings (Maybe Int)
fileSourceSettings_timeDelta = 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)
fileSourceSettings_timeDeltaUnits :: Lens.Lens' FileSourceSettings (Prelude.Maybe FileSourceTimeDeltaUnits)
fileSourceSettings_timeDeltaUnits :: Lens' FileSourceSettings (Maybe FileSourceTimeDeltaUnits)
fileSourceSettings_timeDeltaUnits = 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)
instance Data.FromJSON FileSourceSettings where
parseJSON :: Value -> Parser FileSourceSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FileSourceSettings"
( \Object
x ->
Maybe FileSourceConvert608To708
-> Maybe CaptionSourceFramerate
-> Maybe Text
-> Maybe Int
-> Maybe FileSourceTimeDeltaUnits
-> FileSourceSettings
FileSourceSettings'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"convert608To708")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"framerate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceFile")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"timeDelta")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"timeDeltaUnits")
)
instance Prelude.Hashable FileSourceSettings where
hashWithSalt :: Int -> FileSourceSettings -> Int
hashWithSalt Int
_salt FileSourceSettings' {Maybe Int
Maybe Text
Maybe CaptionSourceFramerate
Maybe FileSourceConvert608To708
Maybe FileSourceTimeDeltaUnits
timeDeltaUnits :: Maybe FileSourceTimeDeltaUnits
timeDelta :: Maybe Int
sourceFile :: Maybe Text
framerate :: Maybe CaptionSourceFramerate
convert608To708 :: Maybe FileSourceConvert608To708
$sel:timeDeltaUnits:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceTimeDeltaUnits
$sel:timeDelta:FileSourceSettings' :: FileSourceSettings -> Maybe Int
$sel:sourceFile:FileSourceSettings' :: FileSourceSettings -> Maybe Text
$sel:framerate:FileSourceSettings' :: FileSourceSettings -> Maybe CaptionSourceFramerate
$sel:convert608To708:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceConvert608To708
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileSourceConvert608To708
convert608To708
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CaptionSourceFramerate
framerate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceFile
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
timeDelta
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileSourceTimeDeltaUnits
timeDeltaUnits
instance Prelude.NFData FileSourceSettings where
rnf :: FileSourceSettings -> ()
rnf FileSourceSettings' {Maybe Int
Maybe Text
Maybe CaptionSourceFramerate
Maybe FileSourceConvert608To708
Maybe FileSourceTimeDeltaUnits
timeDeltaUnits :: Maybe FileSourceTimeDeltaUnits
timeDelta :: Maybe Int
sourceFile :: Maybe Text
framerate :: Maybe CaptionSourceFramerate
convert608To708 :: Maybe FileSourceConvert608To708
$sel:timeDeltaUnits:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceTimeDeltaUnits
$sel:timeDelta:FileSourceSettings' :: FileSourceSettings -> Maybe Int
$sel:sourceFile:FileSourceSettings' :: FileSourceSettings -> Maybe Text
$sel:framerate:FileSourceSettings' :: FileSourceSettings -> Maybe CaptionSourceFramerate
$sel:convert608To708:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceConvert608To708
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe FileSourceConvert608To708
convert608To708
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CaptionSourceFramerate
framerate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceFile
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
timeDelta
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileSourceTimeDeltaUnits
timeDeltaUnits
instance Data.ToJSON FileSourceSettings where
toJSON :: FileSourceSettings -> Value
toJSON FileSourceSettings' {Maybe Int
Maybe Text
Maybe CaptionSourceFramerate
Maybe FileSourceConvert608To708
Maybe FileSourceTimeDeltaUnits
timeDeltaUnits :: Maybe FileSourceTimeDeltaUnits
timeDelta :: Maybe Int
sourceFile :: Maybe Text
framerate :: Maybe CaptionSourceFramerate
convert608To708 :: Maybe FileSourceConvert608To708
$sel:timeDeltaUnits:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceTimeDeltaUnits
$sel:timeDelta:FileSourceSettings' :: FileSourceSettings -> Maybe Int
$sel:sourceFile:FileSourceSettings' :: FileSourceSettings -> Maybe Text
$sel:framerate:FileSourceSettings' :: FileSourceSettings -> Maybe CaptionSourceFramerate
$sel:convert608To708:FileSourceSettings' :: FileSourceSettings -> Maybe FileSourceConvert608To708
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"convert608To708" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileSourceConvert608To708
convert608To708,
(Key
"framerate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CaptionSourceFramerate
framerate,
(Key
"sourceFile" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceFile,
(Key
"timeDelta" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
timeDelta,
(Key
"timeDeltaUnits" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileSourceTimeDeltaUnits
timeDeltaUnits
]
)