{-# 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.MotionGraphicsConfiguration 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.MotionGraphicsInsertion
import Amazonka.MediaLive.Types.MotionGraphicsSettings
import qualified Amazonka.Prelude as Prelude
data MotionGraphicsConfiguration = MotionGraphicsConfiguration'
{ MotionGraphicsConfiguration -> Maybe MotionGraphicsInsertion
motionGraphicsInsertion :: Prelude.Maybe MotionGraphicsInsertion,
MotionGraphicsConfiguration -> MotionGraphicsSettings
motionGraphicsSettings :: MotionGraphicsSettings
}
deriving (MotionGraphicsConfiguration -> MotionGraphicsConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MotionGraphicsConfiguration -> MotionGraphicsConfiguration -> Bool
$c/= :: MotionGraphicsConfiguration -> MotionGraphicsConfiguration -> Bool
== :: MotionGraphicsConfiguration -> MotionGraphicsConfiguration -> Bool
$c== :: MotionGraphicsConfiguration -> MotionGraphicsConfiguration -> Bool
Prelude.Eq, ReadPrec [MotionGraphicsConfiguration]
ReadPrec MotionGraphicsConfiguration
Int -> ReadS MotionGraphicsConfiguration
ReadS [MotionGraphicsConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MotionGraphicsConfiguration]
$creadListPrec :: ReadPrec [MotionGraphicsConfiguration]
readPrec :: ReadPrec MotionGraphicsConfiguration
$creadPrec :: ReadPrec MotionGraphicsConfiguration
readList :: ReadS [MotionGraphicsConfiguration]
$creadList :: ReadS [MotionGraphicsConfiguration]
readsPrec :: Int -> ReadS MotionGraphicsConfiguration
$creadsPrec :: Int -> ReadS MotionGraphicsConfiguration
Prelude.Read, Int -> MotionGraphicsConfiguration -> ShowS
[MotionGraphicsConfiguration] -> ShowS
MotionGraphicsConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MotionGraphicsConfiguration] -> ShowS
$cshowList :: [MotionGraphicsConfiguration] -> ShowS
show :: MotionGraphicsConfiguration -> String
$cshow :: MotionGraphicsConfiguration -> String
showsPrec :: Int -> MotionGraphicsConfiguration -> ShowS
$cshowsPrec :: Int -> MotionGraphicsConfiguration -> ShowS
Prelude.Show, forall x.
Rep MotionGraphicsConfiguration x -> MotionGraphicsConfiguration
forall x.
MotionGraphicsConfiguration -> Rep MotionGraphicsConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MotionGraphicsConfiguration x -> MotionGraphicsConfiguration
$cfrom :: forall x.
MotionGraphicsConfiguration -> Rep MotionGraphicsConfiguration x
Prelude.Generic)
newMotionGraphicsConfiguration ::
MotionGraphicsSettings ->
MotionGraphicsConfiguration
newMotionGraphicsConfiguration :: MotionGraphicsSettings -> MotionGraphicsConfiguration
newMotionGraphicsConfiguration
MotionGraphicsSettings
pMotionGraphicsSettings_ =
MotionGraphicsConfiguration'
{ $sel:motionGraphicsInsertion:MotionGraphicsConfiguration' :: Maybe MotionGraphicsInsertion
motionGraphicsInsertion =
forall a. Maybe a
Prelude.Nothing,
$sel:motionGraphicsSettings:MotionGraphicsConfiguration' :: MotionGraphicsSettings
motionGraphicsSettings =
MotionGraphicsSettings
pMotionGraphicsSettings_
}
motionGraphicsConfiguration_motionGraphicsInsertion :: Lens.Lens' MotionGraphicsConfiguration (Prelude.Maybe MotionGraphicsInsertion)
motionGraphicsConfiguration_motionGraphicsInsertion :: Lens' MotionGraphicsConfiguration (Maybe MotionGraphicsInsertion)
motionGraphicsConfiguration_motionGraphicsInsertion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MotionGraphicsConfiguration' {Maybe MotionGraphicsInsertion
motionGraphicsInsertion :: Maybe MotionGraphicsInsertion
$sel:motionGraphicsInsertion:MotionGraphicsConfiguration' :: MotionGraphicsConfiguration -> Maybe MotionGraphicsInsertion
motionGraphicsInsertion} -> Maybe MotionGraphicsInsertion
motionGraphicsInsertion) (\s :: MotionGraphicsConfiguration
s@MotionGraphicsConfiguration' {} Maybe MotionGraphicsInsertion
a -> MotionGraphicsConfiguration
s {$sel:motionGraphicsInsertion:MotionGraphicsConfiguration' :: Maybe MotionGraphicsInsertion
motionGraphicsInsertion = Maybe MotionGraphicsInsertion
a} :: MotionGraphicsConfiguration)
motionGraphicsConfiguration_motionGraphicsSettings :: Lens.Lens' MotionGraphicsConfiguration MotionGraphicsSettings
motionGraphicsConfiguration_motionGraphicsSettings :: Lens' MotionGraphicsConfiguration MotionGraphicsSettings
motionGraphicsConfiguration_motionGraphicsSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MotionGraphicsConfiguration' {MotionGraphicsSettings
motionGraphicsSettings :: MotionGraphicsSettings
$sel:motionGraphicsSettings:MotionGraphicsConfiguration' :: MotionGraphicsConfiguration -> MotionGraphicsSettings
motionGraphicsSettings} -> MotionGraphicsSettings
motionGraphicsSettings) (\s :: MotionGraphicsConfiguration
s@MotionGraphicsConfiguration' {} MotionGraphicsSettings
a -> MotionGraphicsConfiguration
s {$sel:motionGraphicsSettings:MotionGraphicsConfiguration' :: MotionGraphicsSettings
motionGraphicsSettings = MotionGraphicsSettings
a} :: MotionGraphicsConfiguration)
instance Data.FromJSON MotionGraphicsConfiguration where
parseJSON :: Value -> Parser MotionGraphicsConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MotionGraphicsConfiguration"
( \Object
x ->
Maybe MotionGraphicsInsertion
-> MotionGraphicsSettings -> MotionGraphicsConfiguration
MotionGraphicsConfiguration'
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
"motionGraphicsInsertion")
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
"motionGraphicsSettings")
)
instance Prelude.Hashable MotionGraphicsConfiguration where
hashWithSalt :: Int -> MotionGraphicsConfiguration -> Int
hashWithSalt Int
_salt MotionGraphicsConfiguration' {Maybe MotionGraphicsInsertion
MotionGraphicsSettings
motionGraphicsSettings :: MotionGraphicsSettings
motionGraphicsInsertion :: Maybe MotionGraphicsInsertion
$sel:motionGraphicsSettings:MotionGraphicsConfiguration' :: MotionGraphicsConfiguration -> MotionGraphicsSettings
$sel:motionGraphicsInsertion:MotionGraphicsConfiguration' :: MotionGraphicsConfiguration -> Maybe MotionGraphicsInsertion
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MotionGraphicsInsertion
motionGraphicsInsertion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` MotionGraphicsSettings
motionGraphicsSettings
instance Prelude.NFData MotionGraphicsConfiguration where
rnf :: MotionGraphicsConfiguration -> ()
rnf MotionGraphicsConfiguration' {Maybe MotionGraphicsInsertion
MotionGraphicsSettings
motionGraphicsSettings :: MotionGraphicsSettings
motionGraphicsInsertion :: Maybe MotionGraphicsInsertion
$sel:motionGraphicsSettings:MotionGraphicsConfiguration' :: MotionGraphicsConfiguration -> MotionGraphicsSettings
$sel:motionGraphicsInsertion:MotionGraphicsConfiguration' :: MotionGraphicsConfiguration -> Maybe MotionGraphicsInsertion
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe MotionGraphicsInsertion
motionGraphicsInsertion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf MotionGraphicsSettings
motionGraphicsSettings
instance Data.ToJSON MotionGraphicsConfiguration where
toJSON :: MotionGraphicsConfiguration -> Value
toJSON MotionGraphicsConfiguration' {Maybe MotionGraphicsInsertion
MotionGraphicsSettings
motionGraphicsSettings :: MotionGraphicsSettings
motionGraphicsInsertion :: Maybe MotionGraphicsInsertion
$sel:motionGraphicsSettings:MotionGraphicsConfiguration' :: MotionGraphicsConfiguration -> MotionGraphicsSettings
$sel:motionGraphicsInsertion:MotionGraphicsConfiguration' :: MotionGraphicsConfiguration -> Maybe MotionGraphicsInsertion
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"motionGraphicsInsertion" 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 MotionGraphicsInsertion
motionGraphicsInsertion,
forall a. a -> Maybe a
Prelude.Just
( Key
"motionGraphicsSettings"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= MotionGraphicsSettings
motionGraphicsSettings
)
]
)