{-# 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.MotionImageInsertionOffset 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 MotionImageInsertionOffset = MotionImageInsertionOffset'
{
MotionImageInsertionOffset -> Maybe Natural
imageX :: Prelude.Maybe Prelude.Natural,
MotionImageInsertionOffset -> Maybe Natural
imageY :: Prelude.Maybe Prelude.Natural
}
deriving (MotionImageInsertionOffset -> MotionImageInsertionOffset -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MotionImageInsertionOffset -> MotionImageInsertionOffset -> Bool
$c/= :: MotionImageInsertionOffset -> MotionImageInsertionOffset -> Bool
== :: MotionImageInsertionOffset -> MotionImageInsertionOffset -> Bool
$c== :: MotionImageInsertionOffset -> MotionImageInsertionOffset -> Bool
Prelude.Eq, ReadPrec [MotionImageInsertionOffset]
ReadPrec MotionImageInsertionOffset
Int -> ReadS MotionImageInsertionOffset
ReadS [MotionImageInsertionOffset]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MotionImageInsertionOffset]
$creadListPrec :: ReadPrec [MotionImageInsertionOffset]
readPrec :: ReadPrec MotionImageInsertionOffset
$creadPrec :: ReadPrec MotionImageInsertionOffset
readList :: ReadS [MotionImageInsertionOffset]
$creadList :: ReadS [MotionImageInsertionOffset]
readsPrec :: Int -> ReadS MotionImageInsertionOffset
$creadsPrec :: Int -> ReadS MotionImageInsertionOffset
Prelude.Read, Int -> MotionImageInsertionOffset -> ShowS
[MotionImageInsertionOffset] -> ShowS
MotionImageInsertionOffset -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MotionImageInsertionOffset] -> ShowS
$cshowList :: [MotionImageInsertionOffset] -> ShowS
show :: MotionImageInsertionOffset -> String
$cshow :: MotionImageInsertionOffset -> String
showsPrec :: Int -> MotionImageInsertionOffset -> ShowS
$cshowsPrec :: Int -> MotionImageInsertionOffset -> ShowS
Prelude.Show, forall x.
Rep MotionImageInsertionOffset x -> MotionImageInsertionOffset
forall x.
MotionImageInsertionOffset -> Rep MotionImageInsertionOffset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MotionImageInsertionOffset x -> MotionImageInsertionOffset
$cfrom :: forall x.
MotionImageInsertionOffset -> Rep MotionImageInsertionOffset x
Prelude.Generic)
newMotionImageInsertionOffset ::
MotionImageInsertionOffset
newMotionImageInsertionOffset :: MotionImageInsertionOffset
newMotionImageInsertionOffset =
MotionImageInsertionOffset'
{ $sel:imageX:MotionImageInsertionOffset' :: Maybe Natural
imageX =
forall a. Maybe a
Prelude.Nothing,
$sel:imageY:MotionImageInsertionOffset' :: Maybe Natural
imageY = forall a. Maybe a
Prelude.Nothing
}
motionImageInsertionOffset_imageX :: Lens.Lens' MotionImageInsertionOffset (Prelude.Maybe Prelude.Natural)
motionImageInsertionOffset_imageX :: Lens' MotionImageInsertionOffset (Maybe Natural)
motionImageInsertionOffset_imageX = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MotionImageInsertionOffset' {Maybe Natural
imageX :: Maybe Natural
$sel:imageX:MotionImageInsertionOffset' :: MotionImageInsertionOffset -> Maybe Natural
imageX} -> Maybe Natural
imageX) (\s :: MotionImageInsertionOffset
s@MotionImageInsertionOffset' {} Maybe Natural
a -> MotionImageInsertionOffset
s {$sel:imageX:MotionImageInsertionOffset' :: Maybe Natural
imageX = Maybe Natural
a} :: MotionImageInsertionOffset)
motionImageInsertionOffset_imageY :: Lens.Lens' MotionImageInsertionOffset (Prelude.Maybe Prelude.Natural)
motionImageInsertionOffset_imageY :: Lens' MotionImageInsertionOffset (Maybe Natural)
motionImageInsertionOffset_imageY = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MotionImageInsertionOffset' {Maybe Natural
imageY :: Maybe Natural
$sel:imageY:MotionImageInsertionOffset' :: MotionImageInsertionOffset -> Maybe Natural
imageY} -> Maybe Natural
imageY) (\s :: MotionImageInsertionOffset
s@MotionImageInsertionOffset' {} Maybe Natural
a -> MotionImageInsertionOffset
s {$sel:imageY:MotionImageInsertionOffset' :: Maybe Natural
imageY = Maybe Natural
a} :: MotionImageInsertionOffset)
instance Data.FromJSON MotionImageInsertionOffset where
parseJSON :: Value -> Parser MotionImageInsertionOffset
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MotionImageInsertionOffset"
( \Object
x ->
Maybe Natural -> Maybe Natural -> MotionImageInsertionOffset
MotionImageInsertionOffset'
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
"imageX")
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
"imageY")
)
instance Prelude.Hashable MotionImageInsertionOffset where
hashWithSalt :: Int -> MotionImageInsertionOffset -> Int
hashWithSalt Int
_salt MotionImageInsertionOffset' {Maybe Natural
imageY :: Maybe Natural
imageX :: Maybe Natural
$sel:imageY:MotionImageInsertionOffset' :: MotionImageInsertionOffset -> Maybe Natural
$sel:imageX:MotionImageInsertionOffset' :: MotionImageInsertionOffset -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
imageX
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
imageY
instance Prelude.NFData MotionImageInsertionOffset where
rnf :: MotionImageInsertionOffset -> ()
rnf MotionImageInsertionOffset' {Maybe Natural
imageY :: Maybe Natural
imageX :: Maybe Natural
$sel:imageY:MotionImageInsertionOffset' :: MotionImageInsertionOffset -> Maybe Natural
$sel:imageX:MotionImageInsertionOffset' :: MotionImageInsertionOffset -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
imageX seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
imageY
instance Data.ToJSON MotionImageInsertionOffset where
toJSON :: MotionImageInsertionOffset -> Value
toJSON MotionImageInsertionOffset' {Maybe Natural
imageY :: Maybe Natural
imageX :: Maybe Natural
$sel:imageY:MotionImageInsertionOffset' :: MotionImageInsertionOffset -> Maybe Natural
$sel:imageX:MotionImageInsertionOffset' :: MotionImageInsertionOffset -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"imageX" 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
imageX,
(Key
"imageY" 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
imageY
]
)