{-# 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.EmbeddedSourceSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.EmbeddedConvert608To708
import Amazonka.MediaConvert.Types.EmbeddedTerminateCaptions
import qualified Amazonka.Prelude as Prelude
data EmbeddedSourceSettings = EmbeddedSourceSettings'
{
EmbeddedSourceSettings -> Maybe EmbeddedConvert608To708
convert608To708 :: Prelude.Maybe EmbeddedConvert608To708,
EmbeddedSourceSettings -> Maybe EmbeddedTerminateCaptions
terminateCaptions :: Prelude.Maybe EmbeddedTerminateCaptions,
EmbeddedSourceSettings -> Maybe Natural
source608TrackNumber :: Prelude.Maybe Prelude.Natural,
EmbeddedSourceSettings -> Maybe Natural
source608ChannelNumber :: Prelude.Maybe Prelude.Natural
}
deriving (EmbeddedSourceSettings -> EmbeddedSourceSettings -> Bool
(EmbeddedSourceSettings -> EmbeddedSourceSettings -> Bool)
-> (EmbeddedSourceSettings -> EmbeddedSourceSettings -> Bool)
-> Eq EmbeddedSourceSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EmbeddedSourceSettings -> EmbeddedSourceSettings -> Bool
$c/= :: EmbeddedSourceSettings -> EmbeddedSourceSettings -> Bool
== :: EmbeddedSourceSettings -> EmbeddedSourceSettings -> Bool
$c== :: EmbeddedSourceSettings -> EmbeddedSourceSettings -> Bool
Prelude.Eq, ReadPrec [EmbeddedSourceSettings]
ReadPrec EmbeddedSourceSettings
Int -> ReadS EmbeddedSourceSettings
ReadS [EmbeddedSourceSettings]
(Int -> ReadS EmbeddedSourceSettings)
-> ReadS [EmbeddedSourceSettings]
-> ReadPrec EmbeddedSourceSettings
-> ReadPrec [EmbeddedSourceSettings]
-> Read EmbeddedSourceSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EmbeddedSourceSettings]
$creadListPrec :: ReadPrec [EmbeddedSourceSettings]
readPrec :: ReadPrec EmbeddedSourceSettings
$creadPrec :: ReadPrec EmbeddedSourceSettings
readList :: ReadS [EmbeddedSourceSettings]
$creadList :: ReadS [EmbeddedSourceSettings]
readsPrec :: Int -> ReadS EmbeddedSourceSettings
$creadsPrec :: Int -> ReadS EmbeddedSourceSettings
Prelude.Read, Int -> EmbeddedSourceSettings -> ShowS
[EmbeddedSourceSettings] -> ShowS
EmbeddedSourceSettings -> String
(Int -> EmbeddedSourceSettings -> ShowS)
-> (EmbeddedSourceSettings -> String)
-> ([EmbeddedSourceSettings] -> ShowS)
-> Show EmbeddedSourceSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EmbeddedSourceSettings] -> ShowS
$cshowList :: [EmbeddedSourceSettings] -> ShowS
show :: EmbeddedSourceSettings -> String
$cshow :: EmbeddedSourceSettings -> String
showsPrec :: Int -> EmbeddedSourceSettings -> ShowS
$cshowsPrec :: Int -> EmbeddedSourceSettings -> ShowS
Prelude.Show, (forall x. EmbeddedSourceSettings -> Rep EmbeddedSourceSettings x)
-> (forall x.
Rep EmbeddedSourceSettings x -> EmbeddedSourceSettings)
-> Generic EmbeddedSourceSettings
forall x. Rep EmbeddedSourceSettings x -> EmbeddedSourceSettings
forall x. EmbeddedSourceSettings -> Rep EmbeddedSourceSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EmbeddedSourceSettings x -> EmbeddedSourceSettings
$cfrom :: forall x. EmbeddedSourceSettings -> Rep EmbeddedSourceSettings x
Prelude.Generic)
newEmbeddedSourceSettings ::
EmbeddedSourceSettings
newEmbeddedSourceSettings :: EmbeddedSourceSettings
newEmbeddedSourceSettings =
EmbeddedSourceSettings' :: Maybe EmbeddedConvert608To708
-> Maybe EmbeddedTerminateCaptions
-> Maybe Natural
-> Maybe Natural
-> EmbeddedSourceSettings
EmbeddedSourceSettings'
{ $sel:convert608To708:EmbeddedSourceSettings' :: Maybe EmbeddedConvert608To708
convert608To708 =
Maybe EmbeddedConvert608To708
forall a. Maybe a
Prelude.Nothing,
$sel:terminateCaptions:EmbeddedSourceSettings' :: Maybe EmbeddedTerminateCaptions
terminateCaptions = Maybe EmbeddedTerminateCaptions
forall a. Maybe a
Prelude.Nothing,
$sel:source608TrackNumber:EmbeddedSourceSettings' :: Maybe Natural
source608TrackNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:source608ChannelNumber:EmbeddedSourceSettings' :: Maybe Natural
source608ChannelNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
embeddedSourceSettings_convert608To708 :: Lens.Lens' EmbeddedSourceSettings (Prelude.Maybe EmbeddedConvert608To708)
embeddedSourceSettings_convert608To708 :: (Maybe EmbeddedConvert608To708
-> f (Maybe EmbeddedConvert608To708))
-> EmbeddedSourceSettings -> f EmbeddedSourceSettings
embeddedSourceSettings_convert608To708 = (EmbeddedSourceSettings -> Maybe EmbeddedConvert608To708)
-> (EmbeddedSourceSettings
-> Maybe EmbeddedConvert608To708 -> EmbeddedSourceSettings)
-> Lens
EmbeddedSourceSettings
EmbeddedSourceSettings
(Maybe EmbeddedConvert608To708)
(Maybe EmbeddedConvert608To708)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmbeddedSourceSettings' {Maybe EmbeddedConvert608To708
convert608To708 :: Maybe EmbeddedConvert608To708
$sel:convert608To708:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedConvert608To708
convert608To708} -> Maybe EmbeddedConvert608To708
convert608To708) (\s :: EmbeddedSourceSettings
s@EmbeddedSourceSettings' {} Maybe EmbeddedConvert608To708
a -> EmbeddedSourceSettings
s {$sel:convert608To708:EmbeddedSourceSettings' :: Maybe EmbeddedConvert608To708
convert608To708 = Maybe EmbeddedConvert608To708
a} :: EmbeddedSourceSettings)
embeddedSourceSettings_terminateCaptions :: Lens.Lens' EmbeddedSourceSettings (Prelude.Maybe EmbeddedTerminateCaptions)
embeddedSourceSettings_terminateCaptions :: (Maybe EmbeddedTerminateCaptions
-> f (Maybe EmbeddedTerminateCaptions))
-> EmbeddedSourceSettings -> f EmbeddedSourceSettings
embeddedSourceSettings_terminateCaptions = (EmbeddedSourceSettings -> Maybe EmbeddedTerminateCaptions)
-> (EmbeddedSourceSettings
-> Maybe EmbeddedTerminateCaptions -> EmbeddedSourceSettings)
-> Lens
EmbeddedSourceSettings
EmbeddedSourceSettings
(Maybe EmbeddedTerminateCaptions)
(Maybe EmbeddedTerminateCaptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmbeddedSourceSettings' {Maybe EmbeddedTerminateCaptions
terminateCaptions :: Maybe EmbeddedTerminateCaptions
$sel:terminateCaptions:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedTerminateCaptions
terminateCaptions} -> Maybe EmbeddedTerminateCaptions
terminateCaptions) (\s :: EmbeddedSourceSettings
s@EmbeddedSourceSettings' {} Maybe EmbeddedTerminateCaptions
a -> EmbeddedSourceSettings
s {$sel:terminateCaptions:EmbeddedSourceSettings' :: Maybe EmbeddedTerminateCaptions
terminateCaptions = Maybe EmbeddedTerminateCaptions
a} :: EmbeddedSourceSettings)
embeddedSourceSettings_source608TrackNumber :: Lens.Lens' EmbeddedSourceSettings (Prelude.Maybe Prelude.Natural)
embeddedSourceSettings_source608TrackNumber :: (Maybe Natural -> f (Maybe Natural))
-> EmbeddedSourceSettings -> f EmbeddedSourceSettings
embeddedSourceSettings_source608TrackNumber = (EmbeddedSourceSettings -> Maybe Natural)
-> (EmbeddedSourceSettings
-> Maybe Natural -> EmbeddedSourceSettings)
-> Lens
EmbeddedSourceSettings
EmbeddedSourceSettings
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmbeddedSourceSettings' {Maybe Natural
source608TrackNumber :: Maybe Natural
$sel:source608TrackNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
source608TrackNumber} -> Maybe Natural
source608TrackNumber) (\s :: EmbeddedSourceSettings
s@EmbeddedSourceSettings' {} Maybe Natural
a -> EmbeddedSourceSettings
s {$sel:source608TrackNumber:EmbeddedSourceSettings' :: Maybe Natural
source608TrackNumber = Maybe Natural
a} :: EmbeddedSourceSettings)
embeddedSourceSettings_source608ChannelNumber :: Lens.Lens' EmbeddedSourceSettings (Prelude.Maybe Prelude.Natural)
embeddedSourceSettings_source608ChannelNumber :: (Maybe Natural -> f (Maybe Natural))
-> EmbeddedSourceSettings -> f EmbeddedSourceSettings
embeddedSourceSettings_source608ChannelNumber = (EmbeddedSourceSettings -> Maybe Natural)
-> (EmbeddedSourceSettings
-> Maybe Natural -> EmbeddedSourceSettings)
-> Lens
EmbeddedSourceSettings
EmbeddedSourceSettings
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmbeddedSourceSettings' {Maybe Natural
source608ChannelNumber :: Maybe Natural
$sel:source608ChannelNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
source608ChannelNumber} -> Maybe Natural
source608ChannelNumber) (\s :: EmbeddedSourceSettings
s@EmbeddedSourceSettings' {} Maybe Natural
a -> EmbeddedSourceSettings
s {$sel:source608ChannelNumber:EmbeddedSourceSettings' :: Maybe Natural
source608ChannelNumber = Maybe Natural
a} :: EmbeddedSourceSettings)
instance Core.FromJSON EmbeddedSourceSettings where
parseJSON :: Value -> Parser EmbeddedSourceSettings
parseJSON =
String
-> (Object -> Parser EmbeddedSourceSettings)
-> Value
-> Parser EmbeddedSourceSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EmbeddedSourceSettings"
( \Object
x ->
Maybe EmbeddedConvert608To708
-> Maybe EmbeddedTerminateCaptions
-> Maybe Natural
-> Maybe Natural
-> EmbeddedSourceSettings
EmbeddedSourceSettings'
(Maybe EmbeddedConvert608To708
-> Maybe EmbeddedTerminateCaptions
-> Maybe Natural
-> Maybe Natural
-> EmbeddedSourceSettings)
-> Parser (Maybe EmbeddedConvert608To708)
-> Parser
(Maybe EmbeddedTerminateCaptions
-> Maybe Natural -> Maybe Natural -> EmbeddedSourceSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EmbeddedConvert608To708)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"convert608To708")
Parser
(Maybe EmbeddedTerminateCaptions
-> Maybe Natural -> Maybe Natural -> EmbeddedSourceSettings)
-> Parser (Maybe EmbeddedTerminateCaptions)
-> Parser
(Maybe Natural -> Maybe Natural -> EmbeddedSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EmbeddedTerminateCaptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"terminateCaptions")
Parser (Maybe Natural -> Maybe Natural -> EmbeddedSourceSettings)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> EmbeddedSourceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"source608TrackNumber")
Parser (Maybe Natural -> EmbeddedSourceSettings)
-> Parser (Maybe Natural) -> Parser EmbeddedSourceSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"source608ChannelNumber")
)
instance Prelude.Hashable EmbeddedSourceSettings
instance Prelude.NFData EmbeddedSourceSettings
instance Core.ToJSON EmbeddedSourceSettings where
toJSON :: EmbeddedSourceSettings -> Value
toJSON EmbeddedSourceSettings' {Maybe Natural
Maybe EmbeddedConvert608To708
Maybe EmbeddedTerminateCaptions
source608ChannelNumber :: Maybe Natural
source608TrackNumber :: Maybe Natural
terminateCaptions :: Maybe EmbeddedTerminateCaptions
convert608To708 :: Maybe EmbeddedConvert608To708
$sel:source608ChannelNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
$sel:source608TrackNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
$sel:terminateCaptions:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedTerminateCaptions
$sel:convert608To708:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedConvert608To708
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"convert608To708" Text -> EmbeddedConvert608To708 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EmbeddedConvert608To708 -> Pair)
-> Maybe EmbeddedConvert608To708 -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EmbeddedConvert608To708
convert608To708,
(Text
"terminateCaptions" Text -> EmbeddedTerminateCaptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EmbeddedTerminateCaptions -> Pair)
-> Maybe EmbeddedTerminateCaptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EmbeddedTerminateCaptions
terminateCaptions,
(Text
"source608TrackNumber" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
source608TrackNumber,
(Text
"source608ChannelNumber" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
source608ChannelNumber
]
)