{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:framerateDenominator:MotionImageInsertionFramerate' :: Maybe Natural
framerateDenominator =
forall a. Maybe a
Prelude.Nothing,
$sel:framerateNumerator:MotionImageInsertionFramerate' :: Maybe Natural
framerateNumerator = forall a. Maybe a
Prelude.Nothing
}
motionImageInsertionFramerate_framerateDenominator :: Lens.Lens' MotionImageInsertionFramerate (Prelude.Maybe Prelude.Natural)
motionImageInsertionFramerate_framerateDenominator :: Lens' MotionImageInsertionFramerate (Maybe Natural)
motionImageInsertionFramerate_framerateDenominator = 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 :: Lens' MotionImageInsertionFramerate (Maybe Natural)
motionImageInsertionFramerate_framerateNumerator = 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 Data.FromJSON MotionImageInsertionFramerate where
parseJSON :: Value -> Parser MotionImageInsertionFramerate
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MotionImageInsertionFramerate"
( \Object
x ->
Maybe Natural -> Maybe Natural -> MotionImageInsertionFramerate
MotionImageInsertionFramerate'
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
"framerateDenominator")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"framerateNumerator")
)
instance
Prelude.Hashable
MotionImageInsertionFramerate
where
hashWithSalt :: Int -> MotionImageInsertionFramerate -> Int
hashWithSalt Int
_salt MotionImageInsertionFramerate' {Maybe Natural
framerateNumerator :: Maybe Natural
framerateDenominator :: Maybe Natural
$sel:framerateNumerator:MotionImageInsertionFramerate' :: MotionImageInsertionFramerate -> Maybe Natural
$sel:framerateDenominator:MotionImageInsertionFramerate' :: MotionImageInsertionFramerate -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
framerateDenominator
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
framerateNumerator
instance Prelude.NFData MotionImageInsertionFramerate where
rnf :: MotionImageInsertionFramerate -> ()
rnf MotionImageInsertionFramerate' {Maybe Natural
framerateNumerator :: Maybe Natural
framerateDenominator :: Maybe Natural
$sel:framerateNumerator:MotionImageInsertionFramerate' :: MotionImageInsertionFramerate -> Maybe Natural
$sel:framerateDenominator:MotionImageInsertionFramerate' :: MotionImageInsertionFramerate -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
framerateDenominator
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
framerateNumerator
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"framerateDenominator" 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 Natural
framerateDenominator,
(Key
"framerateNumerator" 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 Natural
framerateNumerator
]
)