{-# 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.MediaLive.Types.EmbeddedSourceSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.EmbeddedConvert608To708
import Amazonka.MediaLive.Types.EmbeddedScte20Detection
import qualified Amazonka.Prelude as Prelude
data EmbeddedSourceSettings = EmbeddedSourceSettings'
{
EmbeddedSourceSettings -> Maybe EmbeddedConvert608To708
convert608To708 :: Prelude.Maybe EmbeddedConvert608To708,
EmbeddedSourceSettings -> Maybe EmbeddedScte20Detection
scte20Detection :: Prelude.Maybe EmbeddedScte20Detection,
EmbeddedSourceSettings -> Maybe Natural
source608ChannelNumber :: Prelude.Maybe Prelude.Natural,
EmbeddedSourceSettings -> Maybe Natural
source608TrackNumber :: Prelude.Maybe Prelude.Natural
}
deriving (EmbeddedSourceSettings -> EmbeddedSourceSettings -> Bool
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]
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
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. 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'
{ $sel:convert608To708:EmbeddedSourceSettings' :: Maybe EmbeddedConvert608To708
convert608To708 =
forall a. Maybe a
Prelude.Nothing,
$sel:scte20Detection:EmbeddedSourceSettings' :: Maybe EmbeddedScte20Detection
scte20Detection = forall a. Maybe a
Prelude.Nothing,
$sel:source608ChannelNumber:EmbeddedSourceSettings' :: Maybe Natural
source608ChannelNumber = forall a. Maybe a
Prelude.Nothing,
$sel:source608TrackNumber:EmbeddedSourceSettings' :: Maybe Natural
source608TrackNumber = forall a. Maybe a
Prelude.Nothing
}
embeddedSourceSettings_convert608To708 :: Lens.Lens' EmbeddedSourceSettings (Prelude.Maybe EmbeddedConvert608To708)
embeddedSourceSettings_convert608To708 :: Lens' EmbeddedSourceSettings (Maybe EmbeddedConvert608To708)
embeddedSourceSettings_convert608To708 = 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_scte20Detection :: Lens.Lens' EmbeddedSourceSettings (Prelude.Maybe EmbeddedScte20Detection)
embeddedSourceSettings_scte20Detection :: Lens' EmbeddedSourceSettings (Maybe EmbeddedScte20Detection)
embeddedSourceSettings_scte20Detection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmbeddedSourceSettings' {Maybe EmbeddedScte20Detection
scte20Detection :: Maybe EmbeddedScte20Detection
$sel:scte20Detection:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedScte20Detection
scte20Detection} -> Maybe EmbeddedScte20Detection
scte20Detection) (\s :: EmbeddedSourceSettings
s@EmbeddedSourceSettings' {} Maybe EmbeddedScte20Detection
a -> EmbeddedSourceSettings
s {$sel:scte20Detection:EmbeddedSourceSettings' :: Maybe EmbeddedScte20Detection
scte20Detection = Maybe EmbeddedScte20Detection
a} :: EmbeddedSourceSettings)
embeddedSourceSettings_source608ChannelNumber :: Lens.Lens' EmbeddedSourceSettings (Prelude.Maybe Prelude.Natural)
embeddedSourceSettings_source608ChannelNumber :: Lens' EmbeddedSourceSettings (Maybe Natural)
embeddedSourceSettings_source608ChannelNumber = 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)
embeddedSourceSettings_source608TrackNumber :: Lens.Lens' EmbeddedSourceSettings (Prelude.Maybe Prelude.Natural)
embeddedSourceSettings_source608TrackNumber :: Lens' EmbeddedSourceSettings (Maybe Natural)
embeddedSourceSettings_source608TrackNumber = 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)
instance Data.FromJSON EmbeddedSourceSettings where
parseJSON :: Value -> Parser EmbeddedSourceSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EmbeddedSourceSettings"
( \Object
x ->
Maybe EmbeddedConvert608To708
-> Maybe EmbeddedScte20Detection
-> Maybe Natural
-> Maybe Natural
-> EmbeddedSourceSettings
EmbeddedSourceSettings'
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
"scte20Detection")
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
"source608ChannelNumber")
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
"source608TrackNumber")
)
instance Prelude.Hashable EmbeddedSourceSettings where
hashWithSalt :: Int -> EmbeddedSourceSettings -> Int
hashWithSalt Int
_salt EmbeddedSourceSettings' {Maybe Natural
Maybe EmbeddedConvert608To708
Maybe EmbeddedScte20Detection
source608TrackNumber :: Maybe Natural
source608ChannelNumber :: Maybe Natural
scte20Detection :: Maybe EmbeddedScte20Detection
convert608To708 :: Maybe EmbeddedConvert608To708
$sel:source608TrackNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
$sel:source608ChannelNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
$sel:scte20Detection:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedScte20Detection
$sel:convert608To708:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedConvert608To708
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EmbeddedConvert608To708
convert608To708
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EmbeddedScte20Detection
scte20Detection
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
source608ChannelNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
source608TrackNumber
instance Prelude.NFData EmbeddedSourceSettings where
rnf :: EmbeddedSourceSettings -> ()
rnf EmbeddedSourceSettings' {Maybe Natural
Maybe EmbeddedConvert608To708
Maybe EmbeddedScte20Detection
source608TrackNumber :: Maybe Natural
source608ChannelNumber :: Maybe Natural
scte20Detection :: Maybe EmbeddedScte20Detection
convert608To708 :: Maybe EmbeddedConvert608To708
$sel:source608TrackNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
$sel:source608ChannelNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
$sel:scte20Detection:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedScte20Detection
$sel:convert608To708:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedConvert608To708
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe EmbeddedConvert608To708
convert608To708
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EmbeddedScte20Detection
scte20Detection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
source608ChannelNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
source608TrackNumber
instance Data.ToJSON EmbeddedSourceSettings where
toJSON :: EmbeddedSourceSettings -> Value
toJSON EmbeddedSourceSettings' {Maybe Natural
Maybe EmbeddedConvert608To708
Maybe EmbeddedScte20Detection
source608TrackNumber :: Maybe Natural
source608ChannelNumber :: Maybe Natural
scte20Detection :: Maybe EmbeddedScte20Detection
convert608To708 :: Maybe EmbeddedConvert608To708
$sel:source608TrackNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
$sel:source608ChannelNumber:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe Natural
$sel:scte20Detection:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedScte20Detection
$sel:convert608To708:EmbeddedSourceSettings' :: EmbeddedSourceSettings -> Maybe EmbeddedConvert608To708
..} =
[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 EmbeddedConvert608To708
convert608To708,
(Key
"scte20Detection" 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 EmbeddedScte20Detection
scte20Detection,
(Key
"source608ChannelNumber" 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 Natural
source608ChannelNumber,
(Key
"source608TrackNumber" 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 Natural
source608TrackNumber
]
)