{-# 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.TimecodeBurninSettings 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.TimecodeBurninFontSize
import Amazonka.MediaLive.Types.TimecodeBurninPosition
import qualified Amazonka.Prelude as Prelude
data TimecodeBurninSettings = TimecodeBurninSettings'
{
TimecodeBurninSettings -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
TimecodeBurninSettings -> TimecodeBurninPosition
position :: TimecodeBurninPosition,
TimecodeBurninSettings -> TimecodeBurninFontSize
fontSize :: TimecodeBurninFontSize
}
deriving (TimecodeBurninSettings -> TimecodeBurninSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimecodeBurninSettings -> TimecodeBurninSettings -> Bool
$c/= :: TimecodeBurninSettings -> TimecodeBurninSettings -> Bool
== :: TimecodeBurninSettings -> TimecodeBurninSettings -> Bool
$c== :: TimecodeBurninSettings -> TimecodeBurninSettings -> Bool
Prelude.Eq, ReadPrec [TimecodeBurninSettings]
ReadPrec TimecodeBurninSettings
Int -> ReadS TimecodeBurninSettings
ReadS [TimecodeBurninSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TimecodeBurninSettings]
$creadListPrec :: ReadPrec [TimecodeBurninSettings]
readPrec :: ReadPrec TimecodeBurninSettings
$creadPrec :: ReadPrec TimecodeBurninSettings
readList :: ReadS [TimecodeBurninSettings]
$creadList :: ReadS [TimecodeBurninSettings]
readsPrec :: Int -> ReadS TimecodeBurninSettings
$creadsPrec :: Int -> ReadS TimecodeBurninSettings
Prelude.Read, Int -> TimecodeBurninSettings -> ShowS
[TimecodeBurninSettings] -> ShowS
TimecodeBurninSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimecodeBurninSettings] -> ShowS
$cshowList :: [TimecodeBurninSettings] -> ShowS
show :: TimecodeBurninSettings -> String
$cshow :: TimecodeBurninSettings -> String
showsPrec :: Int -> TimecodeBurninSettings -> ShowS
$cshowsPrec :: Int -> TimecodeBurninSettings -> ShowS
Prelude.Show, forall x. Rep TimecodeBurninSettings x -> TimecodeBurninSettings
forall x. TimecodeBurninSettings -> Rep TimecodeBurninSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TimecodeBurninSettings x -> TimecodeBurninSettings
$cfrom :: forall x. TimecodeBurninSettings -> Rep TimecodeBurninSettings x
Prelude.Generic)
newTimecodeBurninSettings ::
TimecodeBurninPosition ->
TimecodeBurninFontSize ->
TimecodeBurninSettings
newTimecodeBurninSettings :: TimecodeBurninPosition
-> TimecodeBurninFontSize -> TimecodeBurninSettings
newTimecodeBurninSettings TimecodeBurninPosition
pPosition_ TimecodeBurninFontSize
pFontSize_ =
TimecodeBurninSettings'
{ $sel:prefix:TimecodeBurninSettings' :: Maybe Text
prefix = forall a. Maybe a
Prelude.Nothing,
$sel:position:TimecodeBurninSettings' :: TimecodeBurninPosition
position = TimecodeBurninPosition
pPosition_,
$sel:fontSize:TimecodeBurninSettings' :: TimecodeBurninFontSize
fontSize = TimecodeBurninFontSize
pFontSize_
}
timecodeBurninSettings_prefix :: Lens.Lens' TimecodeBurninSettings (Prelude.Maybe Prelude.Text)
timecodeBurninSettings_prefix :: Lens' TimecodeBurninSettings (Maybe Text)
timecodeBurninSettings_prefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimecodeBurninSettings' {Maybe Text
prefix :: Maybe Text
$sel:prefix:TimecodeBurninSettings' :: TimecodeBurninSettings -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: TimecodeBurninSettings
s@TimecodeBurninSettings' {} Maybe Text
a -> TimecodeBurninSettings
s {$sel:prefix:TimecodeBurninSettings' :: Maybe Text
prefix = Maybe Text
a} :: TimecodeBurninSettings)
timecodeBurninSettings_position :: Lens.Lens' TimecodeBurninSettings TimecodeBurninPosition
timecodeBurninSettings_position :: Lens' TimecodeBurninSettings TimecodeBurninPosition
timecodeBurninSettings_position = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimecodeBurninSettings' {TimecodeBurninPosition
position :: TimecodeBurninPosition
$sel:position:TimecodeBurninSettings' :: TimecodeBurninSettings -> TimecodeBurninPosition
position} -> TimecodeBurninPosition
position) (\s :: TimecodeBurninSettings
s@TimecodeBurninSettings' {} TimecodeBurninPosition
a -> TimecodeBurninSettings
s {$sel:position:TimecodeBurninSettings' :: TimecodeBurninPosition
position = TimecodeBurninPosition
a} :: TimecodeBurninSettings)
timecodeBurninSettings_fontSize :: Lens.Lens' TimecodeBurninSettings TimecodeBurninFontSize
timecodeBurninSettings_fontSize :: Lens' TimecodeBurninSettings TimecodeBurninFontSize
timecodeBurninSettings_fontSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimecodeBurninSettings' {TimecodeBurninFontSize
fontSize :: TimecodeBurninFontSize
$sel:fontSize:TimecodeBurninSettings' :: TimecodeBurninSettings -> TimecodeBurninFontSize
fontSize} -> TimecodeBurninFontSize
fontSize) (\s :: TimecodeBurninSettings
s@TimecodeBurninSettings' {} TimecodeBurninFontSize
a -> TimecodeBurninSettings
s {$sel:fontSize:TimecodeBurninSettings' :: TimecodeBurninFontSize
fontSize = TimecodeBurninFontSize
a} :: TimecodeBurninSettings)
instance Data.FromJSON TimecodeBurninSettings where
parseJSON :: Value -> Parser TimecodeBurninSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TimecodeBurninSettings"
( \Object
x ->
Maybe Text
-> TimecodeBurninPosition
-> TimecodeBurninFontSize
-> TimecodeBurninSettings
TimecodeBurninSettings'
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
"prefix")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"position")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"fontSize")
)
instance Prelude.Hashable TimecodeBurninSettings where
hashWithSalt :: Int -> TimecodeBurninSettings -> Int
hashWithSalt Int
_salt TimecodeBurninSettings' {Maybe Text
TimecodeBurninFontSize
TimecodeBurninPosition
fontSize :: TimecodeBurninFontSize
position :: TimecodeBurninPosition
prefix :: Maybe Text
$sel:fontSize:TimecodeBurninSettings' :: TimecodeBurninSettings -> TimecodeBurninFontSize
$sel:position:TimecodeBurninSettings' :: TimecodeBurninSettings -> TimecodeBurninPosition
$sel:prefix:TimecodeBurninSettings' :: TimecodeBurninSettings -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
prefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TimecodeBurninPosition
position
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TimecodeBurninFontSize
fontSize
instance Prelude.NFData TimecodeBurninSettings where
rnf :: TimecodeBurninSettings -> ()
rnf TimecodeBurninSettings' {Maybe Text
TimecodeBurninFontSize
TimecodeBurninPosition
fontSize :: TimecodeBurninFontSize
position :: TimecodeBurninPosition
prefix :: Maybe Text
$sel:fontSize:TimecodeBurninSettings' :: TimecodeBurninSettings -> TimecodeBurninFontSize
$sel:position:TimecodeBurninSettings' :: TimecodeBurninSettings -> TimecodeBurninPosition
$sel:prefix:TimecodeBurninSettings' :: TimecodeBurninSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
prefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TimecodeBurninPosition
position
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TimecodeBurninFontSize
fontSize
instance Data.ToJSON TimecodeBurninSettings where
toJSON :: TimecodeBurninSettings -> Value
toJSON TimecodeBurninSettings' {Maybe Text
TimecodeBurninFontSize
TimecodeBurninPosition
fontSize :: TimecodeBurninFontSize
position :: TimecodeBurninPosition
prefix :: Maybe Text
$sel:fontSize:TimecodeBurninSettings' :: TimecodeBurninSettings -> TimecodeBurninFontSize
$sel:position:TimecodeBurninSettings' :: TimecodeBurninSettings -> TimecodeBurninPosition
$sel:prefix:TimecodeBurninSettings' :: TimecodeBurninSettings -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"prefix" 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
prefix,
forall a. a -> Maybe a
Prelude.Just (Key
"position" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= TimecodeBurninPosition
position),
forall a. a -> Maybe a
Prelude.Just (Key
"fontSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= TimecodeBurninFontSize
fontSize)
]
)