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