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