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