{-# 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.MediaLive.Types.StaticImageActivateScheduleActionSettings
-- 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.MediaLive.Types.StaticImageActivateScheduleActionSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.InputLocation
import qualified Amazonka.Prelude as Prelude

-- | Settings for the action to activate a static image.
--
-- /See:/ 'newStaticImageActivateScheduleActionSettings' smart constructor.
data StaticImageActivateScheduleActionSettings = StaticImageActivateScheduleActionSettings'
  { -- | The duration in milliseconds for the image to remain on the video. If
    -- omitted or set to 0 the duration is unlimited and the image will remain
    -- until it is explicitly deactivated.
    StaticImageActivateScheduleActionSettings -> Maybe Natural
duration :: Prelude.Maybe Prelude.Natural,
    -- | The time in milliseconds for the image to fade in. The fade-in starts at
    -- the start time of the overlay. Default is 0 (no fade-in).
    StaticImageActivateScheduleActionSettings -> Maybe Natural
fadeIn :: Prelude.Maybe Prelude.Natural,
    -- | Applies only if a duration is specified. The time in milliseconds for
    -- the image to fade out. The fade-out starts when the duration time is
    -- hit, so it effectively extends the duration. Default is 0 (no fade-out).
    StaticImageActivateScheduleActionSettings -> Maybe Natural
fadeOut :: Prelude.Maybe Prelude.Natural,
    -- | The height of the image when inserted into the video, in pixels. The
    -- overlay will be scaled up or down to the specified height. Leave blank
    -- to use the native height of the overlay.
    StaticImageActivateScheduleActionSettings -> Maybe Natural
height :: Prelude.Maybe Prelude.Natural,
    -- | Placement of the left edge of the overlay relative to the left edge of
    -- the video frame, in pixels. 0 (the default) is the left edge of the
    -- frame. If the placement causes the overlay to extend beyond the right
    -- edge of the underlying video, then the overlay is cropped on the right.
    StaticImageActivateScheduleActionSettings -> Maybe Natural
imageX :: Prelude.Maybe Prelude.Natural,
    -- | Placement of the top edge of the overlay relative to the top edge of the
    -- video frame, in pixels. 0 (the default) is the top edge of the frame. If
    -- the placement causes the overlay to extend beyond the bottom edge of the
    -- underlying video, then the overlay is cropped on the bottom.
    StaticImageActivateScheduleActionSettings -> Maybe Natural
imageY :: Prelude.Maybe Prelude.Natural,
    -- | The number of the layer, 0 to 7. There are 8 layers that can be overlaid
    -- on the video, each layer with a different image. The layers are in Z
    -- order, which means that overlays with higher values of layer are
    -- inserted on top of overlays with lower values of layer. Default is 0.
    StaticImageActivateScheduleActionSettings -> Maybe Natural
layer :: Prelude.Maybe Prelude.Natural,
    -- | Opacity of image where 0 is transparent and 100 is fully opaque. Default
    -- is 100.
    StaticImageActivateScheduleActionSettings -> Maybe Natural
opacity :: Prelude.Maybe Prelude.Natural,
    -- | The width of the image when inserted into the video, in pixels. The
    -- overlay will be scaled up or down to the specified width. Leave blank to
    -- use the native width of the overlay.
    StaticImageActivateScheduleActionSettings -> Maybe Natural
width :: Prelude.Maybe Prelude.Natural,
    -- | The location and filename of the image file to overlay on the video. The
    -- file must be a 32-bit BMP, PNG, or TGA file, and must not be larger (in
    -- pixels) than the input video.
    StaticImageActivateScheduleActionSettings -> InputLocation
image :: InputLocation
  }
  deriving (StaticImageActivateScheduleActionSettings
-> StaticImageActivateScheduleActionSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StaticImageActivateScheduleActionSettings
-> StaticImageActivateScheduleActionSettings -> Bool
$c/= :: StaticImageActivateScheduleActionSettings
-> StaticImageActivateScheduleActionSettings -> Bool
== :: StaticImageActivateScheduleActionSettings
-> StaticImageActivateScheduleActionSettings -> Bool
$c== :: StaticImageActivateScheduleActionSettings
-> StaticImageActivateScheduleActionSettings -> Bool
Prelude.Eq, ReadPrec [StaticImageActivateScheduleActionSettings]
ReadPrec StaticImageActivateScheduleActionSettings
Int -> ReadS StaticImageActivateScheduleActionSettings
ReadS [StaticImageActivateScheduleActionSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StaticImageActivateScheduleActionSettings]
$creadListPrec :: ReadPrec [StaticImageActivateScheduleActionSettings]
readPrec :: ReadPrec StaticImageActivateScheduleActionSettings
$creadPrec :: ReadPrec StaticImageActivateScheduleActionSettings
readList :: ReadS [StaticImageActivateScheduleActionSettings]
$creadList :: ReadS [StaticImageActivateScheduleActionSettings]
readsPrec :: Int -> ReadS StaticImageActivateScheduleActionSettings
$creadsPrec :: Int -> ReadS StaticImageActivateScheduleActionSettings
Prelude.Read, Int -> StaticImageActivateScheduleActionSettings -> ShowS
[StaticImageActivateScheduleActionSettings] -> ShowS
StaticImageActivateScheduleActionSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StaticImageActivateScheduleActionSettings] -> ShowS
$cshowList :: [StaticImageActivateScheduleActionSettings] -> ShowS
show :: StaticImageActivateScheduleActionSettings -> String
$cshow :: StaticImageActivateScheduleActionSettings -> String
showsPrec :: Int -> StaticImageActivateScheduleActionSettings -> ShowS
$cshowsPrec :: Int -> StaticImageActivateScheduleActionSettings -> ShowS
Prelude.Show, forall x.
Rep StaticImageActivateScheduleActionSettings x
-> StaticImageActivateScheduleActionSettings
forall x.
StaticImageActivateScheduleActionSettings
-> Rep StaticImageActivateScheduleActionSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StaticImageActivateScheduleActionSettings x
-> StaticImageActivateScheduleActionSettings
$cfrom :: forall x.
StaticImageActivateScheduleActionSettings
-> Rep StaticImageActivateScheduleActionSettings x
Prelude.Generic)

-- |
-- Create a value of 'StaticImageActivateScheduleActionSettings' 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', 'staticImageActivateScheduleActionSettings_duration' - The duration in milliseconds for the image to remain on the video. If
-- omitted or set to 0 the duration is unlimited and the image will remain
-- until it is explicitly deactivated.
--
-- 'fadeIn', 'staticImageActivateScheduleActionSettings_fadeIn' - The time in milliseconds for the image to fade in. The fade-in starts at
-- the start time of the overlay. Default is 0 (no fade-in).
--
-- 'fadeOut', 'staticImageActivateScheduleActionSettings_fadeOut' - Applies only if a duration is specified. The time in milliseconds for
-- the image to fade out. The fade-out starts when the duration time is
-- hit, so it effectively extends the duration. Default is 0 (no fade-out).
--
-- 'height', 'staticImageActivateScheduleActionSettings_height' - The height of the image when inserted into the video, in pixels. The
-- overlay will be scaled up or down to the specified height. Leave blank
-- to use the native height of the overlay.
--
-- 'imageX', 'staticImageActivateScheduleActionSettings_imageX' - Placement of the left edge of the overlay relative to the left edge of
-- the video frame, in pixels. 0 (the default) is the left edge of the
-- frame. If the placement causes the overlay to extend beyond the right
-- edge of the underlying video, then the overlay is cropped on the right.
--
-- 'imageY', 'staticImageActivateScheduleActionSettings_imageY' - Placement of the top edge of the overlay relative to the top edge of the
-- video frame, in pixels. 0 (the default) is the top edge of the frame. If
-- the placement causes the overlay to extend beyond the bottom edge of the
-- underlying video, then the overlay is cropped on the bottom.
--
-- 'layer', 'staticImageActivateScheduleActionSettings_layer' - The number of the layer, 0 to 7. There are 8 layers that can be overlaid
-- on the video, each layer with a different image. The layers are in Z
-- order, which means that overlays with higher values of layer are
-- inserted on top of overlays with lower values of layer. Default is 0.
--
-- 'opacity', 'staticImageActivateScheduleActionSettings_opacity' - Opacity of image where 0 is transparent and 100 is fully opaque. Default
-- is 100.
--
-- 'width', 'staticImageActivateScheduleActionSettings_width' - The width of the image when inserted into the video, in pixels. The
-- overlay will be scaled up or down to the specified width. Leave blank to
-- use the native width of the overlay.
--
-- 'image', 'staticImageActivateScheduleActionSettings_image' - The location and filename of the image file to overlay on the video. The
-- file must be a 32-bit BMP, PNG, or TGA file, and must not be larger (in
-- pixels) than the input video.
newStaticImageActivateScheduleActionSettings ::
  -- | 'image'
  InputLocation ->
  StaticImageActivateScheduleActionSettings
newStaticImageActivateScheduleActionSettings :: InputLocation -> StaticImageActivateScheduleActionSettings
newStaticImageActivateScheduleActionSettings InputLocation
pImage_ =
  StaticImageActivateScheduleActionSettings'
    { $sel:duration:StaticImageActivateScheduleActionSettings' :: Maybe Natural
duration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:fadeIn:StaticImageActivateScheduleActionSettings' :: Maybe Natural
fadeIn = forall a. Maybe a
Prelude.Nothing,
      $sel:fadeOut:StaticImageActivateScheduleActionSettings' :: Maybe Natural
fadeOut = forall a. Maybe a
Prelude.Nothing,
      $sel:height:StaticImageActivateScheduleActionSettings' :: Maybe Natural
height = forall a. Maybe a
Prelude.Nothing,
      $sel:imageX:StaticImageActivateScheduleActionSettings' :: Maybe Natural
imageX = forall a. Maybe a
Prelude.Nothing,
      $sel:imageY:StaticImageActivateScheduleActionSettings' :: Maybe Natural
imageY = forall a. Maybe a
Prelude.Nothing,
      $sel:layer:StaticImageActivateScheduleActionSettings' :: Maybe Natural
layer = forall a. Maybe a
Prelude.Nothing,
      $sel:opacity:StaticImageActivateScheduleActionSettings' :: Maybe Natural
opacity = forall a. Maybe a
Prelude.Nothing,
      $sel:width:StaticImageActivateScheduleActionSettings' :: Maybe Natural
width = forall a. Maybe a
Prelude.Nothing,
      $sel:image:StaticImageActivateScheduleActionSettings' :: InputLocation
image = InputLocation
pImage_
    }

-- | The duration in milliseconds for the image to remain on the video. If
-- omitted or set to 0 the duration is unlimited and the image will remain
-- until it is explicitly deactivated.
staticImageActivateScheduleActionSettings_duration :: Lens.Lens' StaticImageActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
staticImageActivateScheduleActionSettings_duration :: Lens' StaticImageActivateScheduleActionSettings (Maybe Natural)
staticImageActivateScheduleActionSettings_duration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {Maybe Natural
duration :: Maybe Natural
$sel:duration:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
duration} -> Maybe Natural
duration) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} Maybe Natural
a -> StaticImageActivateScheduleActionSettings
s {$sel:duration:StaticImageActivateScheduleActionSettings' :: Maybe Natural
duration = Maybe Natural
a} :: StaticImageActivateScheduleActionSettings)

-- | The time in milliseconds for the image to fade in. The fade-in starts at
-- the start time of the overlay. Default is 0 (no fade-in).
staticImageActivateScheduleActionSettings_fadeIn :: Lens.Lens' StaticImageActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
staticImageActivateScheduleActionSettings_fadeIn :: Lens' StaticImageActivateScheduleActionSettings (Maybe Natural)
staticImageActivateScheduleActionSettings_fadeIn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {Maybe Natural
fadeIn :: Maybe Natural
$sel:fadeIn:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
fadeIn} -> Maybe Natural
fadeIn) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} Maybe Natural
a -> StaticImageActivateScheduleActionSettings
s {$sel:fadeIn:StaticImageActivateScheduleActionSettings' :: Maybe Natural
fadeIn = Maybe Natural
a} :: StaticImageActivateScheduleActionSettings)

-- | Applies only if a duration is specified. The time in milliseconds for
-- the image to fade out. The fade-out starts when the duration time is
-- hit, so it effectively extends the duration. Default is 0 (no fade-out).
staticImageActivateScheduleActionSettings_fadeOut :: Lens.Lens' StaticImageActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
staticImageActivateScheduleActionSettings_fadeOut :: Lens' StaticImageActivateScheduleActionSettings (Maybe Natural)
staticImageActivateScheduleActionSettings_fadeOut = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {Maybe Natural
fadeOut :: Maybe Natural
$sel:fadeOut:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
fadeOut} -> Maybe Natural
fadeOut) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} Maybe Natural
a -> StaticImageActivateScheduleActionSettings
s {$sel:fadeOut:StaticImageActivateScheduleActionSettings' :: Maybe Natural
fadeOut = Maybe Natural
a} :: StaticImageActivateScheduleActionSettings)

-- | The height of the image when inserted into the video, in pixels. The
-- overlay will be scaled up or down to the specified height. Leave blank
-- to use the native height of the overlay.
staticImageActivateScheduleActionSettings_height :: Lens.Lens' StaticImageActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
staticImageActivateScheduleActionSettings_height :: Lens' StaticImageActivateScheduleActionSettings (Maybe Natural)
staticImageActivateScheduleActionSettings_height = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {Maybe Natural
height :: Maybe Natural
$sel:height:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
height} -> Maybe Natural
height) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} Maybe Natural
a -> StaticImageActivateScheduleActionSettings
s {$sel:height:StaticImageActivateScheduleActionSettings' :: Maybe Natural
height = Maybe Natural
a} :: StaticImageActivateScheduleActionSettings)

-- | Placement of the left edge of the overlay relative to the left edge of
-- the video frame, in pixels. 0 (the default) is the left edge of the
-- frame. If the placement causes the overlay to extend beyond the right
-- edge of the underlying video, then the overlay is cropped on the right.
staticImageActivateScheduleActionSettings_imageX :: Lens.Lens' StaticImageActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
staticImageActivateScheduleActionSettings_imageX :: Lens' StaticImageActivateScheduleActionSettings (Maybe Natural)
staticImageActivateScheduleActionSettings_imageX = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {Maybe Natural
imageX :: Maybe Natural
$sel:imageX:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
imageX} -> Maybe Natural
imageX) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} Maybe Natural
a -> StaticImageActivateScheduleActionSettings
s {$sel:imageX:StaticImageActivateScheduleActionSettings' :: Maybe Natural
imageX = Maybe Natural
a} :: StaticImageActivateScheduleActionSettings)

-- | Placement of the top edge of the overlay relative to the top edge of the
-- video frame, in pixels. 0 (the default) is the top edge of the frame. If
-- the placement causes the overlay to extend beyond the bottom edge of the
-- underlying video, then the overlay is cropped on the bottom.
staticImageActivateScheduleActionSettings_imageY :: Lens.Lens' StaticImageActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
staticImageActivateScheduleActionSettings_imageY :: Lens' StaticImageActivateScheduleActionSettings (Maybe Natural)
staticImageActivateScheduleActionSettings_imageY = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {Maybe Natural
imageY :: Maybe Natural
$sel:imageY:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
imageY} -> Maybe Natural
imageY) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} Maybe Natural
a -> StaticImageActivateScheduleActionSettings
s {$sel:imageY:StaticImageActivateScheduleActionSettings' :: Maybe Natural
imageY = Maybe Natural
a} :: StaticImageActivateScheduleActionSettings)

-- | The number of the layer, 0 to 7. There are 8 layers that can be overlaid
-- on the video, each layer with a different image. The layers are in Z
-- order, which means that overlays with higher values of layer are
-- inserted on top of overlays with lower values of layer. Default is 0.
staticImageActivateScheduleActionSettings_layer :: Lens.Lens' StaticImageActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
staticImageActivateScheduleActionSettings_layer :: Lens' StaticImageActivateScheduleActionSettings (Maybe Natural)
staticImageActivateScheduleActionSettings_layer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {Maybe Natural
layer :: Maybe Natural
$sel:layer:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
layer} -> Maybe Natural
layer) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} Maybe Natural
a -> StaticImageActivateScheduleActionSettings
s {$sel:layer:StaticImageActivateScheduleActionSettings' :: Maybe Natural
layer = Maybe Natural
a} :: StaticImageActivateScheduleActionSettings)

-- | Opacity of image where 0 is transparent and 100 is fully opaque. Default
-- is 100.
staticImageActivateScheduleActionSettings_opacity :: Lens.Lens' StaticImageActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
staticImageActivateScheduleActionSettings_opacity :: Lens' StaticImageActivateScheduleActionSettings (Maybe Natural)
staticImageActivateScheduleActionSettings_opacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {Maybe Natural
opacity :: Maybe Natural
$sel:opacity:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
opacity} -> Maybe Natural
opacity) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} Maybe Natural
a -> StaticImageActivateScheduleActionSettings
s {$sel:opacity:StaticImageActivateScheduleActionSettings' :: Maybe Natural
opacity = Maybe Natural
a} :: StaticImageActivateScheduleActionSettings)

-- | The width of the image when inserted into the video, in pixels. The
-- overlay will be scaled up or down to the specified width. Leave blank to
-- use the native width of the overlay.
staticImageActivateScheduleActionSettings_width :: Lens.Lens' StaticImageActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
staticImageActivateScheduleActionSettings_width :: Lens' StaticImageActivateScheduleActionSettings (Maybe Natural)
staticImageActivateScheduleActionSettings_width = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {Maybe Natural
width :: Maybe Natural
$sel:width:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
width} -> Maybe Natural
width) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} Maybe Natural
a -> StaticImageActivateScheduleActionSettings
s {$sel:width:StaticImageActivateScheduleActionSettings' :: Maybe Natural
width = Maybe Natural
a} :: StaticImageActivateScheduleActionSettings)

-- | The location and filename of the image file to overlay on the video. The
-- file must be a 32-bit BMP, PNG, or TGA file, and must not be larger (in
-- pixels) than the input video.
staticImageActivateScheduleActionSettings_image :: Lens.Lens' StaticImageActivateScheduleActionSettings InputLocation
staticImageActivateScheduleActionSettings_image :: Lens' StaticImageActivateScheduleActionSettings InputLocation
staticImageActivateScheduleActionSettings_image = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticImageActivateScheduleActionSettings' {InputLocation
image :: InputLocation
$sel:image:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> InputLocation
image} -> InputLocation
image) (\s :: StaticImageActivateScheduleActionSettings
s@StaticImageActivateScheduleActionSettings' {} InputLocation
a -> StaticImageActivateScheduleActionSettings
s {$sel:image:StaticImageActivateScheduleActionSettings' :: InputLocation
image = InputLocation
a} :: StaticImageActivateScheduleActionSettings)

instance
  Data.FromJSON
    StaticImageActivateScheduleActionSettings
  where
  parseJSON :: Value -> Parser StaticImageActivateScheduleActionSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"StaticImageActivateScheduleActionSettings"
      ( \Object
x ->
          Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> InputLocation
-> StaticImageActivateScheduleActionSettings
StaticImageActivateScheduleActionSettings'
            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
"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
"width")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"image")
      )

instance
  Prelude.Hashable
    StaticImageActivateScheduleActionSettings
  where
  hashWithSalt :: Int -> StaticImageActivateScheduleActionSettings -> Int
hashWithSalt
    Int
_salt
    StaticImageActivateScheduleActionSettings' {Maybe Natural
InputLocation
image :: InputLocation
width :: Maybe Natural
opacity :: Maybe Natural
layer :: Maybe Natural
imageY :: Maybe Natural
imageX :: Maybe Natural
height :: Maybe Natural
fadeOut :: Maybe Natural
fadeIn :: Maybe Natural
duration :: Maybe Natural
$sel:image:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> InputLocation
$sel:width:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:opacity:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:layer:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:imageY:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:imageX:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:height:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:fadeOut:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:fadeIn:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:duration:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> 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 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 Natural
width
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InputLocation
image

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

instance
  Data.ToJSON
    StaticImageActivateScheduleActionSettings
  where
  toJSON :: StaticImageActivateScheduleActionSettings -> Value
toJSON StaticImageActivateScheduleActionSettings' {Maybe Natural
InputLocation
image :: InputLocation
width :: Maybe Natural
opacity :: Maybe Natural
layer :: Maybe Natural
imageY :: Maybe Natural
imageX :: Maybe Natural
height :: Maybe Natural
fadeOut :: Maybe Natural
fadeIn :: Maybe Natural
duration :: Maybe Natural
$sel:image:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> InputLocation
$sel:width:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:opacity:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:layer:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:imageY:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:imageX:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:height:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:fadeOut:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:fadeIn:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> Maybe Natural
$sel:duration:StaticImageActivateScheduleActionSettings' :: StaticImageActivateScheduleActionSettings -> 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
"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
"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,
            forall a. a -> Maybe a
Prelude.Just (Key
"image" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= InputLocation
image)
          ]
      )