{-# 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.Lens as Lens
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
(MotionImageInsertionOffset -> MotionImageInsertionOffset -> Bool)
-> (MotionImageInsertionOffset
-> MotionImageInsertionOffset -> Bool)
-> Eq MotionImageInsertionOffset
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]
(Int -> ReadS MotionImageInsertionOffset)
-> ReadS [MotionImageInsertionOffset]
-> ReadPrec MotionImageInsertionOffset
-> ReadPrec [MotionImageInsertionOffset]
-> Read 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
(Int -> MotionImageInsertionOffset -> ShowS)
-> (MotionImageInsertionOffset -> String)
-> ([MotionImageInsertionOffset] -> ShowS)
-> Show MotionImageInsertionOffset
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.
MotionImageInsertionOffset -> Rep MotionImageInsertionOffset x)
-> (forall x.
Rep MotionImageInsertionOffset x -> MotionImageInsertionOffset)
-> Generic MotionImageInsertionOffset
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' :: Maybe Natural -> Maybe Natural -> MotionImageInsertionOffset
MotionImageInsertionOffset'
{ $sel:imageX:MotionImageInsertionOffset' :: Maybe Natural
imageX =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:imageY:MotionImageInsertionOffset' :: Maybe Natural
imageY = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
motionImageInsertionOffset_imageX :: Lens.Lens' MotionImageInsertionOffset (Prelude.Maybe Prelude.Natural)
motionImageInsertionOffset_imageX :: (Maybe Natural -> f (Maybe Natural))
-> MotionImageInsertionOffset -> f MotionImageInsertionOffset
motionImageInsertionOffset_imageX = (MotionImageInsertionOffset -> Maybe Natural)
-> (MotionImageInsertionOffset
-> Maybe Natural -> MotionImageInsertionOffset)
-> Lens
MotionImageInsertionOffset
MotionImageInsertionOffset
(Maybe Natural)
(Maybe Natural)
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 :: (Maybe Natural -> f (Maybe Natural))
-> MotionImageInsertionOffset -> f MotionImageInsertionOffset
motionImageInsertionOffset_imageY = (MotionImageInsertionOffset -> Maybe Natural)
-> (MotionImageInsertionOffset
-> Maybe Natural -> MotionImageInsertionOffset)
-> Lens
MotionImageInsertionOffset
MotionImageInsertionOffset
(Maybe Natural)
(Maybe Natural)
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 Core.FromJSON MotionImageInsertionOffset where
parseJSON :: Value -> Parser MotionImageInsertionOffset
parseJSON =
String
-> (Object -> Parser MotionImageInsertionOffset)
-> Value
-> Parser MotionImageInsertionOffset
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MotionImageInsertionOffset"
( \Object
x ->
Maybe Natural -> Maybe Natural -> MotionImageInsertionOffset
MotionImageInsertionOffset'
(Maybe Natural -> Maybe Natural -> MotionImageInsertionOffset)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> MotionImageInsertionOffset)
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
"imageX")
Parser (Maybe Natural -> MotionImageInsertionOffset)
-> Parser (Maybe Natural) -> Parser MotionImageInsertionOffset
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
"imageY")
)
instance Prelude.Hashable MotionImageInsertionOffset
instance Prelude.NFData MotionImageInsertionOffset
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"imageX" 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
imageX,
(Text
"imageY" 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
imageY
]
)