{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.InsertableImage 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

-- | 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 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 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,
    -- | 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 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 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 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 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 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,
    -- | 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 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 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
  }
  deriving (InsertableImage -> InsertableImage -> Bool
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]
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
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. 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:
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
newInsertableImage ::
  InsertableImage
newInsertableImage :: InsertableImage
newInsertableImage =
  InsertableImage'
    { $sel:duration:InsertableImage' :: Maybe Natural
duration = forall a. Maybe a
Prelude.Nothing,
      $sel:fadeIn:InsertableImage' :: Maybe Natural
fadeIn = forall a. Maybe a
Prelude.Nothing,
      $sel:fadeOut:InsertableImage' :: Maybe Natural
fadeOut = forall a. Maybe a
Prelude.Nothing,
      $sel:height:InsertableImage' :: Maybe Natural
height = forall a. Maybe a
Prelude.Nothing,
      $sel:imageInserterInput:InsertableImage' :: Maybe Text
imageInserterInput = forall a. Maybe a
Prelude.Nothing,
      $sel:imageX:InsertableImage' :: Maybe Natural
imageX = forall a. Maybe a
Prelude.Nothing,
      $sel:imageY:InsertableImage' :: Maybe Natural
imageY = forall a. Maybe a
Prelude.Nothing,
      $sel:layer:InsertableImage' :: Maybe Natural
layer = forall a. Maybe a
Prelude.Nothing,
      $sel:opacity:InsertableImage' :: Maybe Natural
opacity = forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:InsertableImage' :: Maybe Text
startTime = forall a. Maybe a
Prelude.Nothing,
      $sel:width:InsertableImage' :: Maybe Natural
width = forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: Lens' InsertableImage (Maybe Natural)
insertableImage_duration = 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 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 :: Lens' InsertableImage (Maybe Natural)
insertableImage_fadeIn = 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)

-- | 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 :: Lens' InsertableImage (Maybe Natural)
insertableImage_fadeOut = 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 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 :: Lens' InsertableImage (Maybe Natural)
insertableImage_height = 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 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 :: Lens' InsertableImage (Maybe Text)
insertableImage_imageInserterInput = 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 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 :: Lens' InsertableImage (Maybe Natural)
insertableImage_imageX = 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 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 :: Lens' InsertableImage (Maybe Natural)
insertableImage_imageY = 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 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 :: Lens' InsertableImage (Maybe Natural)
insertableImage_layer = 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)

-- | 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 :: Lens' InsertableImage (Maybe Natural)
insertableImage_opacity = 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 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 :: Lens' InsertableImage (Maybe Text)
insertableImage_startTime = 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 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 :: Lens' InsertableImage (Maybe Natural)
insertableImage_width = 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)

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

instance Prelude.Hashable InsertableImage where
  hashWithSalt :: Int -> InsertableImage -> Int
hashWithSalt Int
_salt InsertableImage' {Maybe Natural
Maybe Text
width :: Maybe Natural
startTime :: Maybe Text
opacity :: Maybe Natural
layer :: Maybe Natural
imageY :: Maybe Natural
imageX :: Maybe Natural
imageInserterInput :: Maybe Text
height :: Maybe Natural
fadeOut :: Maybe Natural
fadeIn :: Maybe Natural
duration :: Maybe Natural
$sel:width:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:startTime:InsertableImage' :: InsertableImage -> Maybe Text
$sel:opacity:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:layer:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageY:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageX:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageInserterInput:InsertableImage' :: InsertableImage -> Maybe Text
$sel:height:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:fadeOut:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:fadeIn:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:duration:InsertableImage' :: InsertableImage -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
duration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
fadeIn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
fadeOut
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
height
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageInserterInput
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
imageX
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
imageY
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
layer
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
opacity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
startTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
width

instance Prelude.NFData InsertableImage where
  rnf :: InsertableImage -> ()
rnf InsertableImage' {Maybe Natural
Maybe Text
width :: Maybe Natural
startTime :: Maybe Text
opacity :: Maybe Natural
layer :: Maybe Natural
imageY :: Maybe Natural
imageX :: Maybe Natural
imageInserterInput :: Maybe Text
height :: Maybe Natural
fadeOut :: Maybe Natural
fadeIn :: Maybe Natural
duration :: Maybe Natural
$sel:width:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:startTime:InsertableImage' :: InsertableImage -> Maybe Text
$sel:opacity:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:layer:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageY:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageX:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageInserterInput:InsertableImage' :: InsertableImage -> Maybe Text
$sel:height:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:fadeOut:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:fadeIn:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:duration:InsertableImage' :: InsertableImage -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
duration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
fadeIn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
fadeOut
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
height
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageInserterInput
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
layer
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
opacity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
width

instance Data.ToJSON InsertableImage where
  toJSON :: InsertableImage -> Value
toJSON InsertableImage' {Maybe Natural
Maybe Text
width :: Maybe Natural
startTime :: Maybe Text
opacity :: Maybe Natural
layer :: Maybe Natural
imageY :: Maybe Natural
imageX :: Maybe Natural
imageInserterInput :: Maybe Text
height :: Maybe Natural
fadeOut :: Maybe Natural
fadeIn :: Maybe Natural
duration :: Maybe Natural
$sel:width:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:startTime:InsertableImage' :: InsertableImage -> Maybe Text
$sel:opacity:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:layer:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageY:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageX:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:imageInserterInput:InsertableImage' :: InsertableImage -> Maybe Text
$sel:height:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:fadeOut:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:fadeIn:InsertableImage' :: InsertableImage -> Maybe Natural
$sel:duration:InsertableImage' :: InsertableImage -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"duration" 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
duration,
            (Key
"fadeIn" 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
fadeIn,
            (Key
"fadeOut" 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
fadeOut,
            (Key
"height" 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
height,
            (Key
"imageInserterInput" 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 Text
imageInserterInput,
            (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,
            (Key
"layer" 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
layer,
            (Key
"opacity" 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
opacity,
            (Key
"startTime" 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 Text
startTime,
            (Key
"width" 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
width
          ]
      )