{-# 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.CaptionSourceSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.AncillarySourceSettings
import Amazonka.MediaConvert.Types.CaptionSourceType
import Amazonka.MediaConvert.Types.DvbSubSourceSettings
import Amazonka.MediaConvert.Types.EmbeddedSourceSettings
import Amazonka.MediaConvert.Types.FileSourceSettings
import Amazonka.MediaConvert.Types.TeletextSourceSettings
import Amazonka.MediaConvert.Types.TrackSourceSettings
import Amazonka.MediaConvert.Types.WebvttHlsSourceSettings
import qualified Amazonka.Prelude as Prelude
data CaptionSourceSettings = CaptionSourceSettings'
{
CaptionSourceSettings -> Maybe TeletextSourceSettings
teletextSourceSettings :: Prelude.Maybe TeletextSourceSettings,
CaptionSourceSettings -> Maybe CaptionSourceType
sourceType :: Prelude.Maybe CaptionSourceType,
CaptionSourceSettings -> Maybe FileSourceSettings
fileSourceSettings :: Prelude.Maybe FileSourceSettings,
CaptionSourceSettings -> Maybe WebvttHlsSourceSettings
webvttHlsSourceSettings :: Prelude.Maybe WebvttHlsSourceSettings,
CaptionSourceSettings -> Maybe DvbSubSourceSettings
dvbSubSourceSettings :: Prelude.Maybe DvbSubSourceSettings,
CaptionSourceSettings -> Maybe TrackSourceSettings
trackSourceSettings :: Prelude.Maybe TrackSourceSettings,
CaptionSourceSettings -> Maybe AncillarySourceSettings
ancillarySourceSettings :: Prelude.Maybe AncillarySourceSettings,
CaptionSourceSettings -> Maybe EmbeddedSourceSettings
embeddedSourceSettings :: Prelude.Maybe EmbeddedSourceSettings
}
deriving (CaptionSourceSettings -> CaptionSourceSettings -> Bool
(CaptionSourceSettings -> CaptionSourceSettings -> Bool)
-> (CaptionSourceSettings -> CaptionSourceSettings -> Bool)
-> Eq CaptionSourceSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CaptionSourceSettings -> CaptionSourceSettings -> Bool
$c/= :: CaptionSourceSettings -> CaptionSourceSettings -> Bool
== :: CaptionSourceSettings -> CaptionSourceSettings -> Bool
$c== :: CaptionSourceSettings -> CaptionSourceSettings -> Bool
Prelude.Eq, ReadPrec [CaptionSourceSettings]
ReadPrec CaptionSourceSettings
Int -> ReadS CaptionSourceSettings
ReadS [CaptionSourceSettings]
(Int -> ReadS CaptionSourceSettings)
-> ReadS [CaptionSourceSettings]
-> ReadPrec CaptionSourceSettings
-> ReadPrec [CaptionSourceSettings]
-> Read CaptionSourceSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CaptionSourceSettings]
$creadListPrec :: ReadPrec [CaptionSourceSettings]
readPrec :: ReadPrec CaptionSourceSettings
$creadPrec :: ReadPrec CaptionSourceSettings
readList :: ReadS [CaptionSourceSettings]
$creadList :: ReadS [CaptionSourceSettings]
readsPrec :: Int -> ReadS CaptionSourceSettings
$creadsPrec :: Int -> ReadS CaptionSourceSettings
Prelude.Read, Int -> CaptionSourceSettings -> ShowS
[CaptionSourceSettings] -> ShowS
CaptionSourceSettings -> String
(Int -> CaptionSourceSettings -> ShowS)
-> (CaptionSourceSettings -> String)
-> ([CaptionSourceSettings] -> ShowS)
-> Show CaptionSourceSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CaptionSourceSettings] -> ShowS
$cshowList :: [CaptionSourceSettings] -> ShowS
show :: CaptionSourceSettings -> String
$cshow :: CaptionSourceSettings -> String
showsPrec :: Int -> CaptionSourceSettings -> ShowS
$cshowsPrec :: Int -> CaptionSourceSettings -> ShowS
Prelude.Show, (forall x. CaptionSourceSettings -> Rep CaptionSourceSettings x)
-> (forall x. Rep CaptionSourceSettings x -> CaptionSourceSettings)
-> Generic CaptionSourceSettings
forall x. Rep CaptionSourceSettings x -> CaptionSourceSettings
forall x. CaptionSourceSettings -> Rep CaptionSourceSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CaptionSourceSettings x -> CaptionSourceSettings
$cfrom :: forall x. CaptionSourceSettings -> Rep CaptionSourceSettings x
Prelude.Generic)
newCaptionSourceSettings ::
CaptionSourceSettings
newCaptionSourceSettings :: CaptionSourceSettings
newCaptionSourceSettings =
CaptionSourceSettings' :: Maybe TeletextSourceSettings
-> Maybe CaptionSourceType
-> Maybe FileSourceSettings
-> Maybe WebvttHlsSourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings
CaptionSourceSettings'
{ $sel:teletextSourceSettings:CaptionSourceSettings' :: Maybe TeletextSourceSettings
teletextSourceSettings =
Maybe TeletextSourceSettings
forall a. Maybe a
Prelude.Nothing,
$sel:sourceType:CaptionSourceSettings' :: Maybe CaptionSourceType
sourceType = Maybe CaptionSourceType
forall a. Maybe a
Prelude.Nothing,
$sel:fileSourceSettings:CaptionSourceSettings' :: Maybe FileSourceSettings
fileSourceSettings = Maybe FileSourceSettings
forall a. Maybe a
Prelude.Nothing,
$sel:webvttHlsSourceSettings:CaptionSourceSettings' :: Maybe WebvttHlsSourceSettings
webvttHlsSourceSettings = Maybe WebvttHlsSourceSettings
forall a. Maybe a
Prelude.Nothing,
$sel:dvbSubSourceSettings:CaptionSourceSettings' :: Maybe DvbSubSourceSettings
dvbSubSourceSettings = Maybe DvbSubSourceSettings
forall a. Maybe a
Prelude.Nothing,
$sel:trackSourceSettings:CaptionSourceSettings' :: Maybe TrackSourceSettings
trackSourceSettings = Maybe TrackSourceSettings
forall a. Maybe a
Prelude.Nothing,
$sel:ancillarySourceSettings:CaptionSourceSettings' :: Maybe AncillarySourceSettings
ancillarySourceSettings = Maybe AncillarySourceSettings
forall a. Maybe a
Prelude.Nothing,
$sel:embeddedSourceSettings:CaptionSourceSettings' :: Maybe EmbeddedSourceSettings
embeddedSourceSettings = Maybe EmbeddedSourceSettings
forall a. Maybe a
Prelude.Nothing
}
captionSourceSettings_teletextSourceSettings :: Lens.Lens' CaptionSourceSettings (Prelude.Maybe TeletextSourceSettings)
captionSourceSettings_teletextSourceSettings :: (Maybe TeletextSourceSettings -> f (Maybe TeletextSourceSettings))
-> CaptionSourceSettings -> f CaptionSourceSettings
captionSourceSettings_teletextSourceSettings = (CaptionSourceSettings -> Maybe TeletextSourceSettings)
-> (CaptionSourceSettings
-> Maybe TeletextSourceSettings -> CaptionSourceSettings)
-> Lens
CaptionSourceSettings
CaptionSourceSettings
(Maybe TeletextSourceSettings)
(Maybe TeletextSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSourceSettings' {Maybe TeletextSourceSettings
teletextSourceSettings :: Maybe TeletextSourceSettings
$sel:teletextSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe TeletextSourceSettings
teletextSourceSettings} -> Maybe TeletextSourceSettings
teletextSourceSettings) (\s :: CaptionSourceSettings
s@CaptionSourceSettings' {} Maybe TeletextSourceSettings
a -> CaptionSourceSettings
s {$sel:teletextSourceSettings:CaptionSourceSettings' :: Maybe TeletextSourceSettings
teletextSourceSettings = Maybe TeletextSourceSettings
a} :: CaptionSourceSettings)
captionSourceSettings_sourceType :: Lens.Lens' CaptionSourceSettings (Prelude.Maybe CaptionSourceType)
captionSourceSettings_sourceType :: (Maybe CaptionSourceType -> f (Maybe CaptionSourceType))
-> CaptionSourceSettings -> f CaptionSourceSettings
captionSourceSettings_sourceType = (CaptionSourceSettings -> Maybe CaptionSourceType)
-> (CaptionSourceSettings
-> Maybe CaptionSourceType -> CaptionSourceSettings)
-> Lens
CaptionSourceSettings
CaptionSourceSettings
(Maybe CaptionSourceType)
(Maybe CaptionSourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSourceSettings' {Maybe CaptionSourceType
sourceType :: Maybe CaptionSourceType
$sel:sourceType:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe CaptionSourceType
sourceType} -> Maybe CaptionSourceType
sourceType) (\s :: CaptionSourceSettings
s@CaptionSourceSettings' {} Maybe CaptionSourceType
a -> CaptionSourceSettings
s {$sel:sourceType:CaptionSourceSettings' :: Maybe CaptionSourceType
sourceType = Maybe CaptionSourceType
a} :: CaptionSourceSettings)
captionSourceSettings_fileSourceSettings :: Lens.Lens' CaptionSourceSettings (Prelude.Maybe FileSourceSettings)
captionSourceSettings_fileSourceSettings :: (Maybe FileSourceSettings -> f (Maybe FileSourceSettings))
-> CaptionSourceSettings -> f CaptionSourceSettings
captionSourceSettings_fileSourceSettings = (CaptionSourceSettings -> Maybe FileSourceSettings)
-> (CaptionSourceSettings
-> Maybe FileSourceSettings -> CaptionSourceSettings)
-> Lens
CaptionSourceSettings
CaptionSourceSettings
(Maybe FileSourceSettings)
(Maybe FileSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSourceSettings' {Maybe FileSourceSettings
fileSourceSettings :: Maybe FileSourceSettings
$sel:fileSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe FileSourceSettings
fileSourceSettings} -> Maybe FileSourceSettings
fileSourceSettings) (\s :: CaptionSourceSettings
s@CaptionSourceSettings' {} Maybe FileSourceSettings
a -> CaptionSourceSettings
s {$sel:fileSourceSettings:CaptionSourceSettings' :: Maybe FileSourceSettings
fileSourceSettings = Maybe FileSourceSettings
a} :: CaptionSourceSettings)
captionSourceSettings_webvttHlsSourceSettings :: Lens.Lens' CaptionSourceSettings (Prelude.Maybe WebvttHlsSourceSettings)
captionSourceSettings_webvttHlsSourceSettings :: (Maybe WebvttHlsSourceSettings
-> f (Maybe WebvttHlsSourceSettings))
-> CaptionSourceSettings -> f CaptionSourceSettings
captionSourceSettings_webvttHlsSourceSettings = (CaptionSourceSettings -> Maybe WebvttHlsSourceSettings)
-> (CaptionSourceSettings
-> Maybe WebvttHlsSourceSettings -> CaptionSourceSettings)
-> Lens
CaptionSourceSettings
CaptionSourceSettings
(Maybe WebvttHlsSourceSettings)
(Maybe WebvttHlsSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSourceSettings' {Maybe WebvttHlsSourceSettings
webvttHlsSourceSettings :: Maybe WebvttHlsSourceSettings
$sel:webvttHlsSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe WebvttHlsSourceSettings
webvttHlsSourceSettings} -> Maybe WebvttHlsSourceSettings
webvttHlsSourceSettings) (\s :: CaptionSourceSettings
s@CaptionSourceSettings' {} Maybe WebvttHlsSourceSettings
a -> CaptionSourceSettings
s {$sel:webvttHlsSourceSettings:CaptionSourceSettings' :: Maybe WebvttHlsSourceSettings
webvttHlsSourceSettings = Maybe WebvttHlsSourceSettings
a} :: CaptionSourceSettings)
captionSourceSettings_dvbSubSourceSettings :: Lens.Lens' CaptionSourceSettings (Prelude.Maybe DvbSubSourceSettings)
captionSourceSettings_dvbSubSourceSettings :: (Maybe DvbSubSourceSettings -> f (Maybe DvbSubSourceSettings))
-> CaptionSourceSettings -> f CaptionSourceSettings
captionSourceSettings_dvbSubSourceSettings = (CaptionSourceSettings -> Maybe DvbSubSourceSettings)
-> (CaptionSourceSettings
-> Maybe DvbSubSourceSettings -> CaptionSourceSettings)
-> Lens
CaptionSourceSettings
CaptionSourceSettings
(Maybe DvbSubSourceSettings)
(Maybe DvbSubSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSourceSettings' {Maybe DvbSubSourceSettings
dvbSubSourceSettings :: Maybe DvbSubSourceSettings
$sel:dvbSubSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe DvbSubSourceSettings
dvbSubSourceSettings} -> Maybe DvbSubSourceSettings
dvbSubSourceSettings) (\s :: CaptionSourceSettings
s@CaptionSourceSettings' {} Maybe DvbSubSourceSettings
a -> CaptionSourceSettings
s {$sel:dvbSubSourceSettings:CaptionSourceSettings' :: Maybe DvbSubSourceSettings
dvbSubSourceSettings = Maybe DvbSubSourceSettings
a} :: CaptionSourceSettings)
captionSourceSettings_trackSourceSettings :: Lens.Lens' CaptionSourceSettings (Prelude.Maybe TrackSourceSettings)
captionSourceSettings_trackSourceSettings :: (Maybe TrackSourceSettings -> f (Maybe TrackSourceSettings))
-> CaptionSourceSettings -> f CaptionSourceSettings
captionSourceSettings_trackSourceSettings = (CaptionSourceSettings -> Maybe TrackSourceSettings)
-> (CaptionSourceSettings
-> Maybe TrackSourceSettings -> CaptionSourceSettings)
-> Lens
CaptionSourceSettings
CaptionSourceSettings
(Maybe TrackSourceSettings)
(Maybe TrackSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSourceSettings' {Maybe TrackSourceSettings
trackSourceSettings :: Maybe TrackSourceSettings
$sel:trackSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe TrackSourceSettings
trackSourceSettings} -> Maybe TrackSourceSettings
trackSourceSettings) (\s :: CaptionSourceSettings
s@CaptionSourceSettings' {} Maybe TrackSourceSettings
a -> CaptionSourceSettings
s {$sel:trackSourceSettings:CaptionSourceSettings' :: Maybe TrackSourceSettings
trackSourceSettings = Maybe TrackSourceSettings
a} :: CaptionSourceSettings)
captionSourceSettings_ancillarySourceSettings :: Lens.Lens' CaptionSourceSettings (Prelude.Maybe AncillarySourceSettings)
captionSourceSettings_ancillarySourceSettings :: (Maybe AncillarySourceSettings
-> f (Maybe AncillarySourceSettings))
-> CaptionSourceSettings -> f CaptionSourceSettings
captionSourceSettings_ancillarySourceSettings = (CaptionSourceSettings -> Maybe AncillarySourceSettings)
-> (CaptionSourceSettings
-> Maybe AncillarySourceSettings -> CaptionSourceSettings)
-> Lens
CaptionSourceSettings
CaptionSourceSettings
(Maybe AncillarySourceSettings)
(Maybe AncillarySourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSourceSettings' {Maybe AncillarySourceSettings
ancillarySourceSettings :: Maybe AncillarySourceSettings
$sel:ancillarySourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe AncillarySourceSettings
ancillarySourceSettings} -> Maybe AncillarySourceSettings
ancillarySourceSettings) (\s :: CaptionSourceSettings
s@CaptionSourceSettings' {} Maybe AncillarySourceSettings
a -> CaptionSourceSettings
s {$sel:ancillarySourceSettings:CaptionSourceSettings' :: Maybe AncillarySourceSettings
ancillarySourceSettings = Maybe AncillarySourceSettings
a} :: CaptionSourceSettings)
captionSourceSettings_embeddedSourceSettings :: Lens.Lens' CaptionSourceSettings (Prelude.Maybe EmbeddedSourceSettings)
captionSourceSettings_embeddedSourceSettings :: (Maybe EmbeddedSourceSettings -> f (Maybe EmbeddedSourceSettings))
-> CaptionSourceSettings -> f CaptionSourceSettings
captionSourceSettings_embeddedSourceSettings = (CaptionSourceSettings -> Maybe EmbeddedSourceSettings)
-> (CaptionSourceSettings
-> Maybe EmbeddedSourceSettings -> CaptionSourceSettings)
-> Lens
CaptionSourceSettings
CaptionSourceSettings
(Maybe EmbeddedSourceSettings)
(Maybe EmbeddedSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSourceSettings' {Maybe EmbeddedSourceSettings
embeddedSourceSettings :: Maybe EmbeddedSourceSettings
$sel:embeddedSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe EmbeddedSourceSettings
embeddedSourceSettings} -> Maybe EmbeddedSourceSettings
embeddedSourceSettings) (\s :: CaptionSourceSettings
s@CaptionSourceSettings' {} Maybe EmbeddedSourceSettings
a -> CaptionSourceSettings
s {$sel:embeddedSourceSettings:CaptionSourceSettings' :: Maybe EmbeddedSourceSettings
embeddedSourceSettings = Maybe EmbeddedSourceSettings
a} :: CaptionSourceSettings)
instance Core.FromJSON CaptionSourceSettings where
parseJSON :: Value -> Parser CaptionSourceSettings
parseJSON =
String
-> (Object -> Parser CaptionSourceSettings)
-> Value
-> Parser CaptionSourceSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CaptionSourceSettings"
( \Object
x ->
Maybe TeletextSourceSettings
-> Maybe CaptionSourceType
-> Maybe FileSourceSettings
-> Maybe WebvttHlsSourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings
CaptionSourceSettings'
(Maybe TeletextSourceSettings
-> Maybe CaptionSourceType
-> Maybe FileSourceSettings
-> Maybe WebvttHlsSourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
-> Parser (Maybe TeletextSourceSettings)
-> Parser
(Maybe CaptionSourceType
-> Maybe FileSourceSettings
-> Maybe WebvttHlsSourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe TeletextSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"teletextSourceSettings")
Parser
(Maybe CaptionSourceType
-> Maybe FileSourceSettings
-> Maybe WebvttHlsSourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
-> Parser (Maybe CaptionSourceType)
-> Parser
(Maybe FileSourceSettings
-> Maybe WebvttHlsSourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CaptionSourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceType")
Parser
(Maybe FileSourceSettings
-> Maybe WebvttHlsSourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
-> Parser (Maybe FileSourceSettings)
-> Parser
(Maybe WebvttHlsSourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FileSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"fileSourceSettings")
Parser
(Maybe WebvttHlsSourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
-> Parser (Maybe WebvttHlsSourceSettings)
-> Parser
(Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe WebvttHlsSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"webvttHlsSourceSettings")
Parser
(Maybe DvbSubSourceSettings
-> Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
-> Parser (Maybe DvbSubSourceSettings)
-> Parser
(Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DvbSubSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dvbSubSourceSettings")
Parser
(Maybe TrackSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSourceSettings)
-> Parser (Maybe TrackSourceSettings)
-> Parser
(Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings -> CaptionSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrackSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"trackSourceSettings")
Parser
(Maybe AncillarySourceSettings
-> Maybe EmbeddedSourceSettings -> CaptionSourceSettings)
-> Parser (Maybe AncillarySourceSettings)
-> Parser (Maybe EmbeddedSourceSettings -> CaptionSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AncillarySourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ancillarySourceSettings")
Parser (Maybe EmbeddedSourceSettings -> CaptionSourceSettings)
-> Parser (Maybe EmbeddedSourceSettings)
-> Parser CaptionSourceSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EmbeddedSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"embeddedSourceSettings")
)
instance Prelude.Hashable CaptionSourceSettings
instance Prelude.NFData CaptionSourceSettings
instance Core.ToJSON CaptionSourceSettings where
toJSON :: CaptionSourceSettings -> Value
toJSON CaptionSourceSettings' {Maybe AncillarySourceSettings
Maybe CaptionSourceType
Maybe DvbSubSourceSettings
Maybe EmbeddedSourceSettings
Maybe FileSourceSettings
Maybe TeletextSourceSettings
Maybe TrackSourceSettings
Maybe WebvttHlsSourceSettings
embeddedSourceSettings :: Maybe EmbeddedSourceSettings
ancillarySourceSettings :: Maybe AncillarySourceSettings
trackSourceSettings :: Maybe TrackSourceSettings
dvbSubSourceSettings :: Maybe DvbSubSourceSettings
webvttHlsSourceSettings :: Maybe WebvttHlsSourceSettings
fileSourceSettings :: Maybe FileSourceSettings
sourceType :: Maybe CaptionSourceType
teletextSourceSettings :: Maybe TeletextSourceSettings
$sel:embeddedSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe EmbeddedSourceSettings
$sel:ancillarySourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe AncillarySourceSettings
$sel:trackSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe TrackSourceSettings
$sel:dvbSubSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe DvbSubSourceSettings
$sel:webvttHlsSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe WebvttHlsSourceSettings
$sel:fileSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe FileSourceSettings
$sel:sourceType:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe CaptionSourceType
$sel:teletextSourceSettings:CaptionSourceSettings' :: CaptionSourceSettings -> Maybe TeletextSourceSettings
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"teletextSourceSettings" Text -> TeletextSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(TeletextSourceSettings -> Pair)
-> Maybe TeletextSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TeletextSourceSettings
teletextSourceSettings,
(Text
"sourceType" Text -> CaptionSourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CaptionSourceType -> Pair)
-> Maybe CaptionSourceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CaptionSourceType
sourceType,
(Text
"fileSourceSettings" Text -> FileSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(FileSourceSettings -> Pair)
-> Maybe FileSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileSourceSettings
fileSourceSettings,
(Text
"webvttHlsSourceSettings" Text -> WebvttHlsSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(WebvttHlsSourceSettings -> Pair)
-> Maybe WebvttHlsSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WebvttHlsSourceSettings
webvttHlsSourceSettings,
(Text
"dvbSubSourceSettings" Text -> DvbSubSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DvbSubSourceSettings -> Pair)
-> Maybe DvbSubSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DvbSubSourceSettings
dvbSubSourceSettings,
(Text
"trackSourceSettings" Text -> TrackSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(TrackSourceSettings -> Pair)
-> Maybe TrackSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TrackSourceSettings
trackSourceSettings,
(Text
"ancillarySourceSettings" Text -> AncillarySourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AncillarySourceSettings -> Pair)
-> Maybe AncillarySourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AncillarySourceSettings
ancillarySourceSettings,
(Text
"embeddedSourceSettings" Text -> EmbeddedSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EmbeddedSourceSettings -> Pair)
-> Maybe EmbeddedSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EmbeddedSourceSettings
embeddedSourceSettings
]
)