{-# 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.AncillarySourceSettings 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.AncillaryConvert608To708
import Amazonka.MediaConvert.Types.AncillaryTerminateCaptions
import qualified Amazonka.Prelude as Prelude
data AncillarySourceSettings = AncillarySourceSettings'
{
AncillarySourceSettings -> Maybe AncillaryConvert608To708
convert608To708 :: Prelude.Maybe AncillaryConvert608To708,
AncillarySourceSettings -> Maybe Natural
sourceAncillaryChannelNumber :: Prelude.Maybe Prelude.Natural,
AncillarySourceSettings -> Maybe AncillaryTerminateCaptions
terminateCaptions :: Prelude.Maybe AncillaryTerminateCaptions
}
deriving (AncillarySourceSettings -> AncillarySourceSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AncillarySourceSettings -> AncillarySourceSettings -> Bool
$c/= :: AncillarySourceSettings -> AncillarySourceSettings -> Bool
== :: AncillarySourceSettings -> AncillarySourceSettings -> Bool
$c== :: AncillarySourceSettings -> AncillarySourceSettings -> Bool
Prelude.Eq, ReadPrec [AncillarySourceSettings]
ReadPrec AncillarySourceSettings
Int -> ReadS AncillarySourceSettings
ReadS [AncillarySourceSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AncillarySourceSettings]
$creadListPrec :: ReadPrec [AncillarySourceSettings]
readPrec :: ReadPrec AncillarySourceSettings
$creadPrec :: ReadPrec AncillarySourceSettings
readList :: ReadS [AncillarySourceSettings]
$creadList :: ReadS [AncillarySourceSettings]
readsPrec :: Int -> ReadS AncillarySourceSettings
$creadsPrec :: Int -> ReadS AncillarySourceSettings
Prelude.Read, Int -> AncillarySourceSettings -> ShowS
[AncillarySourceSettings] -> ShowS
AncillarySourceSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AncillarySourceSettings] -> ShowS
$cshowList :: [AncillarySourceSettings] -> ShowS
show :: AncillarySourceSettings -> String
$cshow :: AncillarySourceSettings -> String
showsPrec :: Int -> AncillarySourceSettings -> ShowS
$cshowsPrec :: Int -> AncillarySourceSettings -> ShowS
Prelude.Show, forall x. Rep AncillarySourceSettings x -> AncillarySourceSettings
forall x. AncillarySourceSettings -> Rep AncillarySourceSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AncillarySourceSettings x -> AncillarySourceSettings
$cfrom :: forall x. AncillarySourceSettings -> Rep AncillarySourceSettings x
Prelude.Generic)
newAncillarySourceSettings ::
AncillarySourceSettings
newAncillarySourceSettings :: AncillarySourceSettings
newAncillarySourceSettings =
AncillarySourceSettings'
{ $sel:convert608To708:AncillarySourceSettings' :: Maybe AncillaryConvert608To708
convert608To708 =
forall a. Maybe a
Prelude.Nothing,
$sel:sourceAncillaryChannelNumber:AncillarySourceSettings' :: Maybe Natural
sourceAncillaryChannelNumber = forall a. Maybe a
Prelude.Nothing,
$sel:terminateCaptions:AncillarySourceSettings' :: Maybe AncillaryTerminateCaptions
terminateCaptions = forall a. Maybe a
Prelude.Nothing
}
ancillarySourceSettings_convert608To708 :: Lens.Lens' AncillarySourceSettings (Prelude.Maybe AncillaryConvert608To708)
ancillarySourceSettings_convert608To708 :: Lens' AncillarySourceSettings (Maybe AncillaryConvert608To708)
ancillarySourceSettings_convert608To708 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AncillarySourceSettings' {Maybe AncillaryConvert608To708
convert608To708 :: Maybe AncillaryConvert608To708
$sel:convert608To708:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe AncillaryConvert608To708
convert608To708} -> Maybe AncillaryConvert608To708
convert608To708) (\s :: AncillarySourceSettings
s@AncillarySourceSettings' {} Maybe AncillaryConvert608To708
a -> AncillarySourceSettings
s {$sel:convert608To708:AncillarySourceSettings' :: Maybe AncillaryConvert608To708
convert608To708 = Maybe AncillaryConvert608To708
a} :: AncillarySourceSettings)
ancillarySourceSettings_sourceAncillaryChannelNumber :: Lens.Lens' AncillarySourceSettings (Prelude.Maybe Prelude.Natural)
ancillarySourceSettings_sourceAncillaryChannelNumber :: Lens' AncillarySourceSettings (Maybe Natural)
ancillarySourceSettings_sourceAncillaryChannelNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AncillarySourceSettings' {Maybe Natural
sourceAncillaryChannelNumber :: Maybe Natural
$sel:sourceAncillaryChannelNumber:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe Natural
sourceAncillaryChannelNumber} -> Maybe Natural
sourceAncillaryChannelNumber) (\s :: AncillarySourceSettings
s@AncillarySourceSettings' {} Maybe Natural
a -> AncillarySourceSettings
s {$sel:sourceAncillaryChannelNumber:AncillarySourceSettings' :: Maybe Natural
sourceAncillaryChannelNumber = Maybe Natural
a} :: AncillarySourceSettings)
ancillarySourceSettings_terminateCaptions :: Lens.Lens' AncillarySourceSettings (Prelude.Maybe AncillaryTerminateCaptions)
ancillarySourceSettings_terminateCaptions :: Lens' AncillarySourceSettings (Maybe AncillaryTerminateCaptions)
ancillarySourceSettings_terminateCaptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AncillarySourceSettings' {Maybe AncillaryTerminateCaptions
terminateCaptions :: Maybe AncillaryTerminateCaptions
$sel:terminateCaptions:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe AncillaryTerminateCaptions
terminateCaptions} -> Maybe AncillaryTerminateCaptions
terminateCaptions) (\s :: AncillarySourceSettings
s@AncillarySourceSettings' {} Maybe AncillaryTerminateCaptions
a -> AncillarySourceSettings
s {$sel:terminateCaptions:AncillarySourceSettings' :: Maybe AncillaryTerminateCaptions
terminateCaptions = Maybe AncillaryTerminateCaptions
a} :: AncillarySourceSettings)
instance Data.FromJSON AncillarySourceSettings where
parseJSON :: Value -> Parser AncillarySourceSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AncillarySourceSettings"
( \Object
x ->
Maybe AncillaryConvert608To708
-> Maybe Natural
-> Maybe AncillaryTerminateCaptions
-> AncillarySourceSettings
AncillarySourceSettings'
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
"sourceAncillaryChannelNumber")
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
"terminateCaptions")
)
instance Prelude.Hashable AncillarySourceSettings where
hashWithSalt :: Int -> AncillarySourceSettings -> Int
hashWithSalt Int
_salt AncillarySourceSettings' {Maybe Natural
Maybe AncillaryConvert608To708
Maybe AncillaryTerminateCaptions
terminateCaptions :: Maybe AncillaryTerminateCaptions
sourceAncillaryChannelNumber :: Maybe Natural
convert608To708 :: Maybe AncillaryConvert608To708
$sel:terminateCaptions:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe AncillaryTerminateCaptions
$sel:sourceAncillaryChannelNumber:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe Natural
$sel:convert608To708:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe AncillaryConvert608To708
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AncillaryConvert608To708
convert608To708
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
sourceAncillaryChannelNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AncillaryTerminateCaptions
terminateCaptions
instance Prelude.NFData AncillarySourceSettings where
rnf :: AncillarySourceSettings -> ()
rnf AncillarySourceSettings' {Maybe Natural
Maybe AncillaryConvert608To708
Maybe AncillaryTerminateCaptions
terminateCaptions :: Maybe AncillaryTerminateCaptions
sourceAncillaryChannelNumber :: Maybe Natural
convert608To708 :: Maybe AncillaryConvert608To708
$sel:terminateCaptions:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe AncillaryTerminateCaptions
$sel:sourceAncillaryChannelNumber:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe Natural
$sel:convert608To708:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe AncillaryConvert608To708
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AncillaryConvert608To708
convert608To708
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
sourceAncillaryChannelNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AncillaryTerminateCaptions
terminateCaptions
instance Data.ToJSON AncillarySourceSettings where
toJSON :: AncillarySourceSettings -> Value
toJSON AncillarySourceSettings' {Maybe Natural
Maybe AncillaryConvert608To708
Maybe AncillaryTerminateCaptions
terminateCaptions :: Maybe AncillaryTerminateCaptions
sourceAncillaryChannelNumber :: Maybe Natural
convert608To708 :: Maybe AncillaryConvert608To708
$sel:terminateCaptions:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe AncillaryTerminateCaptions
$sel:sourceAncillaryChannelNumber:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe Natural
$sel:convert608To708:AncillarySourceSettings' :: AncillarySourceSettings -> Maybe AncillaryConvert608To708
..} =
[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 AncillaryConvert608To708
convert608To708,
(Key
"sourceAncillaryChannelNumber" 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
sourceAncillaryChannelNumber,
(Key
"terminateCaptions" 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 AncillaryTerminateCaptions
terminateCaptions
]
)