{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaConvert.Types.InsertableImage
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.InsertableImage where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | These settings apply to a specific graphic overlay. You can include
-- multiple overlays in your job.
--
-- /See:/ 'newInsertableImage' smart constructor.
data InsertableImage = InsertableImage'
  { -- | Specify the distance, in pixels, between the inserted image and the left
    -- edge of the video frame. Required for any image overlay that you
    -- specify.
    InsertableImage -> Maybe Natural
imageX :: Prelude.Maybe Prelude.Natural,
    -- | Specify the height of the inserted image in pixels. If you specify a
    -- value that\'s larger than the video resolution height, the service will
    -- crop your overlaid image to fit. To use the native height of the image,
    -- keep this setting blank.
    InsertableImage -> Maybe Natural
height :: Prelude.Maybe Prelude.Natural,
    -- | Specify the timecode of the frame that you want the overlay to first
    -- appear on. This must be in timecode (HH:MM:SS:FF or HH:MM:SS;FF) format.
    -- Remember to take into account your timecode source settings.
    InsertableImage -> Maybe Text
startTime :: Prelude.Maybe Prelude.Text,
    -- | Specify the length of time, in milliseconds, between the end of the time
    -- that you have specified for the image overlay Duration and when the
    -- overlaid image has faded to total transparency. If you don\'t specify a
    -- value for Fade-out, the image will disappear abruptly at the end of the
    -- inserted image duration.
    InsertableImage -> Maybe Natural
fadeOut :: Prelude.Maybe Prelude.Natural,
    -- | Specify the width of the inserted image in pixels. If you specify a
    -- value that\'s larger than the video resolution width, the service will
    -- crop your overlaid image to fit. To use the native width of the image,
    -- keep this setting blank.
    InsertableImage -> Maybe Natural
width :: Prelude.Maybe Prelude.Natural,
    -- | Use Opacity (Opacity) to specify how much of the underlying video shows
    -- through the inserted image. 0 is transparent and 100 is fully opaque.
    -- Default is 50.
    InsertableImage -> Maybe Natural
opacity :: Prelude.Maybe Prelude.Natural,
    -- | Specify how overlapping inserted images appear. Images with higher
    -- values for Layer appear on top of images with lower values for Layer.
    InsertableImage -> Maybe Natural
layer :: Prelude.Maybe Prelude.Natural,
    -- | Specify the time, in milliseconds, for the image to remain on the output
    -- video. This duration includes fade-in time but not fade-out time.
    InsertableImage -> Maybe Natural
duration :: Prelude.Maybe Prelude.Natural,
    -- | Specify the distance, in pixels, between the overlaid image and the top
    -- edge of the video frame. Required for any image overlay that you
    -- specify.
    InsertableImage -> Maybe Natural
imageY :: Prelude.Maybe Prelude.Natural,
    -- | Specify the HTTP, HTTPS, or Amazon S3 location of the image that you
    -- want to overlay on the video. Use a PNG or TGA file.
    InsertableImage -> Maybe Text
imageInserterInput :: Prelude.Maybe Prelude.Text,
    -- | Specify the length of time, in milliseconds, between the Start time that
    -- you specify for the image insertion and the time that the image appears
    -- at full opacity. Full opacity is the level that you specify for the
    -- opacity setting. If you don\'t specify a value for Fade-in, the image
    -- will appear abruptly at the overlay start time.
    InsertableImage -> Maybe Natural
fadeIn :: Prelude.Maybe Prelude.Natural
  }
  deriving (InsertableImage -> InsertableImage -> Bool
(InsertableImage -> InsertableImage -> Bool)
-> (InsertableImage -> InsertableImage -> Bool)
-> Eq InsertableImage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InsertableImage -> InsertableImage -> Bool
$c/= :: InsertableImage -> InsertableImage -> Bool
== :: InsertableImage -> InsertableImage -> Bool
$c== :: InsertableImage -> InsertableImage -> Bool
Prelude.Eq, ReadPrec [InsertableImage]
ReadPrec InsertableImage
Int -> ReadS InsertableImage
ReadS [InsertableImage]
(Int -> ReadS InsertableImage)
-> ReadS [InsertableImage]
-> ReadPrec InsertableImage
-> ReadPrec [InsertableImage]
-> Read InsertableImage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InsertableImage]
$creadListPrec :: ReadPrec [InsertableImage]
readPrec :: ReadPrec InsertableImage
$creadPrec :: ReadPrec InsertableImage
readList :: ReadS [InsertableImage]
$creadList :: ReadS [InsertableImage]
readsPrec :: Int -> ReadS InsertableImage
$creadsPrec :: Int -> ReadS InsertableImage
Prelude.Read, Int -> InsertableImage -> ShowS
[InsertableImage] -> ShowS
InsertableImage -> String
(Int -> InsertableImage -> ShowS)
-> (InsertableImage -> String)
-> ([InsertableImage] -> ShowS)
-> Show InsertableImage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InsertableImage] -> ShowS
$cshowList :: [InsertableImage] -> ShowS
show :: InsertableImage -> String
$cshow :: InsertableImage -> String
showsPrec :: Int -> InsertableImage -> ShowS
$cshowsPrec :: Int -> InsertableImage -> ShowS
Prelude.Show, (forall x. InsertableImage -> Rep InsertableImage x)
-> (forall x. Rep InsertableImage x -> InsertableImage)
-> Generic InsertableImage
forall x. Rep InsertableImage x -> InsertableImage
forall x. InsertableImage -> Rep InsertableImage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InsertableImage x -> InsertableImage
$cfrom :: forall x. InsertableImage -> Rep InsertableImage x
Prelude.Generic)

-- |
-- Create a value of 'InsertableImage' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'imageX', 'insertableImage_imageX' - Specify the distance, in pixels, between the inserted image and the left
-- edge of the video frame. Required for any image overlay that you
-- specify.
--
-- 'height', 'insertableImage_height' - Specify the height of the inserted image in pixels. If you specify a
-- value that\'s larger than the video resolution height, the service will
-- crop your overlaid image to fit. To use the native height of the image,
-- keep this setting blank.
--
-- 'startTime', 'insertableImage_startTime' - Specify the timecode of the frame that you want the overlay to first
-- appear on. This must be in timecode (HH:MM:SS:FF or HH:MM:SS;FF) format.
-- Remember to take into account your timecode source settings.
--
-- 'fadeOut', 'insertableImage_fadeOut' - Specify the length of time, in milliseconds, between the end of the time
-- that you have specified for the image overlay Duration and when the
-- overlaid image has faded to total transparency. If you don\'t specify a
-- value for Fade-out, the image will disappear abruptly at the end of the
-- inserted image duration.
--
-- 'width', 'insertableImage_width' - Specify the width of the inserted image in pixels. If you specify a
-- value that\'s larger than the video resolution width, the service will
-- crop your overlaid image to fit. To use the native width of the image,
-- keep this setting blank.
--
-- 'opacity', 'insertableImage_opacity' - Use Opacity (Opacity) to specify how much of the underlying video shows
-- through the inserted image. 0 is transparent and 100 is fully opaque.
-- Default is 50.
--
-- 'layer', 'insertableImage_layer' - Specify how overlapping inserted images appear. Images with higher
-- values for Layer appear on top of images with lower values for Layer.
--
-- 'duration', 'insertableImage_duration' - Specify the time, in milliseconds, for the image to remain on the output
-- video. This duration includes fade-in time but not fade-out time.
--
-- 'imageY', 'insertableImage_imageY' - Specify the distance, in pixels, between the overlaid image and the top
-- edge of the video frame. Required for any image overlay that you
-- specify.
--
-- 'imageInserterInput', 'insertableImage_imageInserterInput' - Specify the HTTP, HTTPS, or Amazon S3 location of the image that you
-- want to overlay on the video. Use a PNG or TGA file.
--
-- 'fadeIn', 'insertableImage_fadeIn' - Specify the length of time, in milliseconds, between the Start time that
-- you specify for the image insertion and the time that the image appears
-- at full opacity. Full opacity is the level that you specify for the
-- opacity setting. If you don\'t specify a value for Fade-in, the image
-- will appear abruptly at the overlay start time.
newInsertableImage ::
  InsertableImage
newInsertableImage :: InsertableImage
newInsertableImage =
  InsertableImage' :: Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> InsertableImage
InsertableImage'
    { $sel:imageX:InsertableImage' :: Maybe Natural
imageX = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:height:InsertableImage' :: Maybe Natural
height = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:InsertableImage' :: Maybe Text
startTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fadeOut:InsertableImage' :: Maybe Natural
fadeOut = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:width:InsertableImage' :: Maybe Natural
width = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:opacity:InsertableImage' :: Maybe Natural
opacity = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:layer:InsertableImage' :: Maybe Natural
layer = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:duration:InsertableImage' :: Maybe Natural
duration = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:imageY:InsertableImage' :: Maybe Natural
imageY = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:imageInserterInput:InsertableImage' :: Maybe Text
imageInserterInput = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fadeIn:InsertableImage' :: Maybe Natural
fadeIn = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Specify the distance, in pixels, between the inserted image and the left
-- edge of the video frame. Required for any image overlay that you
-- specify.
insertableImage_imageX :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Natural)
insertableImage_imageX :: (Maybe Natural -> f (Maybe Natural))
-> InsertableImage -> f InsertableImage
insertableImage_imageX = (InsertableImage -> Maybe Natural)
-> (InsertableImage -> Maybe Natural -> InsertableImage)
-> Lens
     InsertableImage InsertableImage (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Natural
imageX :: Maybe Natural
$sel:imageX:InsertableImage' :: InsertableImage -> Maybe Natural
imageX} -> Maybe Natural
imageX) (\s :: InsertableImage
s@InsertableImage' {} Maybe Natural
a -> InsertableImage
s {$sel:imageX:InsertableImage' :: Maybe Natural
imageX = Maybe Natural
a} :: InsertableImage)

-- | Specify the height of the inserted image in pixels. If you specify a
-- value that\'s larger than the video resolution height, the service will
-- crop your overlaid image to fit. To use the native height of the image,
-- keep this setting blank.
insertableImage_height :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Natural)
insertableImage_height :: (Maybe Natural -> f (Maybe Natural))
-> InsertableImage -> f InsertableImage
insertableImage_height = (InsertableImage -> Maybe Natural)
-> (InsertableImage -> Maybe Natural -> InsertableImage)
-> Lens
     InsertableImage InsertableImage (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Natural
height :: Maybe Natural
$sel:height:InsertableImage' :: InsertableImage -> Maybe Natural
height} -> Maybe Natural
height) (\s :: InsertableImage
s@InsertableImage' {} Maybe Natural
a -> InsertableImage
s {$sel:height:InsertableImage' :: Maybe Natural
height = Maybe Natural
a} :: InsertableImage)

-- | Specify the timecode of the frame that you want the overlay to first
-- appear on. This must be in timecode (HH:MM:SS:FF or HH:MM:SS;FF) format.
-- Remember to take into account your timecode source settings.
insertableImage_startTime :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Text)
insertableImage_startTime :: (Maybe Text -> f (Maybe Text))
-> InsertableImage -> f InsertableImage
insertableImage_startTime = (InsertableImage -> Maybe Text)
-> (InsertableImage -> Maybe Text -> InsertableImage)
-> Lens InsertableImage InsertableImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Text
startTime :: Maybe Text
$sel:startTime:InsertableImage' :: InsertableImage -> Maybe Text
startTime} -> Maybe Text
startTime) (\s :: InsertableImage
s@InsertableImage' {} Maybe Text
a -> InsertableImage
s {$sel:startTime:InsertableImage' :: Maybe Text
startTime = Maybe Text
a} :: InsertableImage)

-- | Specify the length of time, in milliseconds, between the end of the time
-- that you have specified for the image overlay Duration and when the
-- overlaid image has faded to total transparency. If you don\'t specify a
-- value for Fade-out, the image will disappear abruptly at the end of the
-- inserted image duration.
insertableImage_fadeOut :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Natural)
insertableImage_fadeOut :: (Maybe Natural -> f (Maybe Natural))
-> InsertableImage -> f InsertableImage
insertableImage_fadeOut = (InsertableImage -> Maybe Natural)
-> (InsertableImage -> Maybe Natural -> InsertableImage)
-> Lens
     InsertableImage InsertableImage (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Natural
fadeOut :: Maybe Natural
$sel:fadeOut:InsertableImage' :: InsertableImage -> Maybe Natural
fadeOut} -> Maybe Natural
fadeOut) (\s :: InsertableImage
s@InsertableImage' {} Maybe Natural
a -> InsertableImage
s {$sel:fadeOut:InsertableImage' :: Maybe Natural
fadeOut = Maybe Natural
a} :: InsertableImage)

-- | Specify the width of the inserted image in pixels. If you specify a
-- value that\'s larger than the video resolution width, the service will
-- crop your overlaid image to fit. To use the native width of the image,
-- keep this setting blank.
insertableImage_width :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Natural)
insertableImage_width :: (Maybe Natural -> f (Maybe Natural))
-> InsertableImage -> f InsertableImage
insertableImage_width = (InsertableImage -> Maybe Natural)
-> (InsertableImage -> Maybe Natural -> InsertableImage)
-> Lens
     InsertableImage InsertableImage (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Natural
width :: Maybe Natural
$sel:width:InsertableImage' :: InsertableImage -> Maybe Natural
width} -> Maybe Natural
width) (\s :: InsertableImage
s@InsertableImage' {} Maybe Natural
a -> InsertableImage
s {$sel:width:InsertableImage' :: Maybe Natural
width = Maybe Natural
a} :: InsertableImage)

-- | Use Opacity (Opacity) to specify how much of the underlying video shows
-- through the inserted image. 0 is transparent and 100 is fully opaque.
-- Default is 50.
insertableImage_opacity :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Natural)
insertableImage_opacity :: (Maybe Natural -> f (Maybe Natural))
-> InsertableImage -> f InsertableImage
insertableImage_opacity = (InsertableImage -> Maybe Natural)
-> (InsertableImage -> Maybe Natural -> InsertableImage)
-> Lens
     InsertableImage InsertableImage (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Natural
opacity :: Maybe Natural
$sel:opacity:InsertableImage' :: InsertableImage -> Maybe Natural
opacity} -> Maybe Natural
opacity) (\s :: InsertableImage
s@InsertableImage' {} Maybe Natural
a -> InsertableImage
s {$sel:opacity:InsertableImage' :: Maybe Natural
opacity = Maybe Natural
a} :: InsertableImage)

-- | Specify how overlapping inserted images appear. Images with higher
-- values for Layer appear on top of images with lower values for Layer.
insertableImage_layer :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Natural)
insertableImage_layer :: (Maybe Natural -> f (Maybe Natural))
-> InsertableImage -> f InsertableImage
insertableImage_layer = (InsertableImage -> Maybe Natural)
-> (InsertableImage -> Maybe Natural -> InsertableImage)
-> Lens
     InsertableImage InsertableImage (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Natural
layer :: Maybe Natural
$sel:layer:InsertableImage' :: InsertableImage -> Maybe Natural
layer} -> Maybe Natural
layer) (\s :: InsertableImage
s@InsertableImage' {} Maybe Natural
a -> InsertableImage
s {$sel:layer:InsertableImage' :: Maybe Natural
layer = Maybe Natural
a} :: InsertableImage)

-- | Specify the time, in milliseconds, for the image to remain on the output
-- video. This duration includes fade-in time but not fade-out time.
insertableImage_duration :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Natural)
insertableImage_duration :: (Maybe Natural -> f (Maybe Natural))
-> InsertableImage -> f InsertableImage
insertableImage_duration = (InsertableImage -> Maybe Natural)
-> (InsertableImage -> Maybe Natural -> InsertableImage)
-> Lens
     InsertableImage InsertableImage (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Natural
duration :: Maybe Natural
$sel:duration:InsertableImage' :: InsertableImage -> Maybe Natural
duration} -> Maybe Natural
duration) (\s :: InsertableImage
s@InsertableImage' {} Maybe Natural
a -> InsertableImage
s {$sel:duration:InsertableImage' :: Maybe Natural
duration = Maybe Natural
a} :: InsertableImage)

-- | Specify the distance, in pixels, between the overlaid image and the top
-- edge of the video frame. Required for any image overlay that you
-- specify.
insertableImage_imageY :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Natural)
insertableImage_imageY :: (Maybe Natural -> f (Maybe Natural))
-> InsertableImage -> f InsertableImage
insertableImage_imageY = (InsertableImage -> Maybe Natural)
-> (InsertableImage -> Maybe Natural -> InsertableImage)
-> Lens
     InsertableImage InsertableImage (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Natural
imageY :: Maybe Natural
$sel:imageY:InsertableImage' :: InsertableImage -> Maybe Natural
imageY} -> Maybe Natural
imageY) (\s :: InsertableImage
s@InsertableImage' {} Maybe Natural
a -> InsertableImage
s {$sel:imageY:InsertableImage' :: Maybe Natural
imageY = Maybe Natural
a} :: InsertableImage)

-- | Specify the HTTP, HTTPS, or Amazon S3 location of the image that you
-- want to overlay on the video. Use a PNG or TGA file.
insertableImage_imageInserterInput :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Text)
insertableImage_imageInserterInput :: (Maybe Text -> f (Maybe Text))
-> InsertableImage -> f InsertableImage
insertableImage_imageInserterInput = (InsertableImage -> Maybe Text)
-> (InsertableImage -> Maybe Text -> InsertableImage)
-> Lens InsertableImage InsertableImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Text
imageInserterInput :: Maybe Text
$sel:imageInserterInput:InsertableImage' :: InsertableImage -> Maybe Text
imageInserterInput} -> Maybe Text
imageInserterInput) (\s :: InsertableImage
s@InsertableImage' {} Maybe Text
a -> InsertableImage
s {$sel:imageInserterInput:InsertableImage' :: Maybe Text
imageInserterInput = Maybe Text
a} :: InsertableImage)

-- | Specify the length of time, in milliseconds, between the Start time that
-- you specify for the image insertion and the time that the image appears
-- at full opacity. Full opacity is the level that you specify for the
-- opacity setting. If you don\'t specify a value for Fade-in, the image
-- will appear abruptly at the overlay start time.
insertableImage_fadeIn :: Lens.Lens' InsertableImage (Prelude.Maybe Prelude.Natural)
insertableImage_fadeIn :: (Maybe Natural -> f (Maybe Natural))
-> InsertableImage -> f InsertableImage
insertableImage_fadeIn = (InsertableImage -> Maybe Natural)
-> (InsertableImage -> Maybe Natural -> InsertableImage)
-> Lens
     InsertableImage InsertableImage (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsertableImage' {Maybe Natural
fadeIn :: Maybe Natural
$sel:fadeIn:InsertableImage' :: InsertableImage -> Maybe Natural
fadeIn} -> Maybe Natural
fadeIn) (\s :: InsertableImage
s@InsertableImage' {} Maybe Natural
a -> InsertableImage
s {$sel:fadeIn:InsertableImage' :: Maybe Natural
fadeIn = Maybe Natural
a} :: InsertableImage)

instance Core.FromJSON InsertableImage where
  parseJSON :: Value -> Parser InsertableImage
parseJSON =
    String
-> (Object -> Parser InsertableImage)
-> Value
-> Parser InsertableImage
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"InsertableImage"
      ( \Object
x ->
          Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> InsertableImage
InsertableImage'
            (Maybe Natural
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Natural
 -> InsertableImage)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> InsertableImage)
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
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> InsertableImage)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> InsertableImage)
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
"height")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> InsertableImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> InsertableImage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"startTime")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> InsertableImage)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> InsertableImage)
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
"fadeOut")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> InsertableImage)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> InsertableImage)
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
"width")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> InsertableImage)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> InsertableImage)
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
"opacity")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> InsertableImage)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural -> Maybe Text -> Maybe Natural -> InsertableImage)
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
"layer")
            Parser
  (Maybe Natural
   -> Maybe Natural -> Maybe Text -> Maybe Natural -> InsertableImage)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural -> Maybe Text -> Maybe Natural -> InsertableImage)
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
"duration")
            Parser
  (Maybe Natural -> Maybe Text -> Maybe Natural -> InsertableImage)
-> Parser (Maybe Natural)
-> Parser (Maybe Text -> Maybe Natural -> InsertableImage)
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")
            Parser (Maybe Text -> Maybe Natural -> InsertableImage)
-> Parser (Maybe Text) -> Parser (Maybe Natural -> InsertableImage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageInserterInput")
            Parser (Maybe Natural -> InsertableImage)
-> Parser (Maybe Natural) -> Parser InsertableImage
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
"fadeIn")
      )

instance Prelude.Hashable InsertableImage

instance Prelude.NFData InsertableImage

instance Core.ToJSON InsertableImage where
  toJSON :: InsertableImage -> Value
toJSON InsertableImage' {Maybe Natural
Maybe Text
fadeIn :: Maybe Natural
imageInserterInput :: Maybe Text
imageY :: Maybe Natural
duration :: Maybe Natural
layer :: Maybe Natural
opacity :: Maybe Natural
width :: Maybe Natural
fadeOut :: Maybe Natural
startTime :: Maybe Text
height :: Maybe Natural
imageX :: Maybe Natural
$sel:fadeIn:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageInserterInput:InsertableImage' :: InsertableImage -> Maybe Text
$sel:imageY:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:duration:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:layer:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:opacity:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:width:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:fadeOut:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:startTime:InsertableImage' :: InsertableImage -> Maybe Text
$sel:height:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageX:InsertableImage' :: InsertableImage -> 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
"height" 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
height,
            (Text
"startTime" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
startTime,
            (Text
"fadeOut" 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
fadeOut,
            (Text
"width" 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
width,
            (Text
"opacity" 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
opacity,
            (Text
"layer" 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
layer,
            (Text
"duration" 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
duration,
            (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,
            (Text
"imageInserterInput" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageInserterInput,
            (Text
"fadeIn" 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
fadeIn
          ]
      )