{-# 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.DashIsoImageBasedTrickPlaySettings
-- 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.DashIsoImageBasedTrickPlaySettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.DashIsoIntervalCadence
import qualified Amazonka.Prelude as Prelude

-- | Tile and thumbnail settings applicable when imageBasedTrickPlay is
-- ADVANCED
--
-- /See:/ 'newDashIsoImageBasedTrickPlaySettings' smart constructor.
data DashIsoImageBasedTrickPlaySettings = DashIsoImageBasedTrickPlaySettings'
  { -- | Number of thumbnails in each row of a tile image. Set a value between 1
    -- and 512.
    DashIsoImageBasedTrickPlaySettings -> Maybe Natural
tileWidth :: Prelude.Maybe Prelude.Natural,
    -- | Height of each thumbnail within each tile image, in pixels. Leave blank
    -- to maintain aspect ratio with thumbnail width. If following the aspect
    -- ratio would lead to a total tile height greater than 4096, then the job
    -- will be rejected. Must be divisible by 2.
    DashIsoImageBasedTrickPlaySettings -> Maybe Natural
thumbnailHeight :: Prelude.Maybe Prelude.Natural,
    -- | The cadence MediaConvert follows for generating thumbnails. If set to
    -- FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in
    -- the output (matching the GOP cadence). If set to FOLLOW_CUSTOM,
    -- MediaConvert generates thumbnails according to the interval you specify
    -- in thumbnailInterval.
    DashIsoImageBasedTrickPlaySettings -> Maybe DashIsoIntervalCadence
intervalCadence :: Prelude.Maybe DashIsoIntervalCadence,
    -- | Width of each thumbnail within each tile image, in pixels. Default is
    -- 312. Must be divisible by 8.
    DashIsoImageBasedTrickPlaySettings -> Maybe Natural
thumbnailWidth :: Prelude.Maybe Prelude.Natural,
    -- | Enter the interval, in seconds, that MediaConvert uses to generate
    -- thumbnails. If the interval you enter doesn\'t align with the output
    -- frame rate, MediaConvert automatically rounds the interval to align with
    -- the output frame rate. For example, if the output frame rate is 29.97
    -- frames per second and you enter 5, MediaConvert uses a 150 frame
    -- interval to generate thumbnails.
    DashIsoImageBasedTrickPlaySettings -> Maybe Double
thumbnailInterval :: Prelude.Maybe Prelude.Double,
    -- | Number of thumbnails in each column of a tile image. Set a value between
    -- 2 and 2048. Must be divisible by 2.
    DashIsoImageBasedTrickPlaySettings -> Maybe Natural
tileHeight :: Prelude.Maybe Prelude.Natural
  }
  deriving (DashIsoImageBasedTrickPlaySettings
-> DashIsoImageBasedTrickPlaySettings -> Bool
(DashIsoImageBasedTrickPlaySettings
 -> DashIsoImageBasedTrickPlaySettings -> Bool)
-> (DashIsoImageBasedTrickPlaySettings
    -> DashIsoImageBasedTrickPlaySettings -> Bool)
-> Eq DashIsoImageBasedTrickPlaySettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DashIsoImageBasedTrickPlaySettings
-> DashIsoImageBasedTrickPlaySettings -> Bool
$c/= :: DashIsoImageBasedTrickPlaySettings
-> DashIsoImageBasedTrickPlaySettings -> Bool
== :: DashIsoImageBasedTrickPlaySettings
-> DashIsoImageBasedTrickPlaySettings -> Bool
$c== :: DashIsoImageBasedTrickPlaySettings
-> DashIsoImageBasedTrickPlaySettings -> Bool
Prelude.Eq, ReadPrec [DashIsoImageBasedTrickPlaySettings]
ReadPrec DashIsoImageBasedTrickPlaySettings
Int -> ReadS DashIsoImageBasedTrickPlaySettings
ReadS [DashIsoImageBasedTrickPlaySettings]
(Int -> ReadS DashIsoImageBasedTrickPlaySettings)
-> ReadS [DashIsoImageBasedTrickPlaySettings]
-> ReadPrec DashIsoImageBasedTrickPlaySettings
-> ReadPrec [DashIsoImageBasedTrickPlaySettings]
-> Read DashIsoImageBasedTrickPlaySettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DashIsoImageBasedTrickPlaySettings]
$creadListPrec :: ReadPrec [DashIsoImageBasedTrickPlaySettings]
readPrec :: ReadPrec DashIsoImageBasedTrickPlaySettings
$creadPrec :: ReadPrec DashIsoImageBasedTrickPlaySettings
readList :: ReadS [DashIsoImageBasedTrickPlaySettings]
$creadList :: ReadS [DashIsoImageBasedTrickPlaySettings]
readsPrec :: Int -> ReadS DashIsoImageBasedTrickPlaySettings
$creadsPrec :: Int -> ReadS DashIsoImageBasedTrickPlaySettings
Prelude.Read, Int -> DashIsoImageBasedTrickPlaySettings -> ShowS
[DashIsoImageBasedTrickPlaySettings] -> ShowS
DashIsoImageBasedTrickPlaySettings -> String
(Int -> DashIsoImageBasedTrickPlaySettings -> ShowS)
-> (DashIsoImageBasedTrickPlaySettings -> String)
-> ([DashIsoImageBasedTrickPlaySettings] -> ShowS)
-> Show DashIsoImageBasedTrickPlaySettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DashIsoImageBasedTrickPlaySettings] -> ShowS
$cshowList :: [DashIsoImageBasedTrickPlaySettings] -> ShowS
show :: DashIsoImageBasedTrickPlaySettings -> String
$cshow :: DashIsoImageBasedTrickPlaySettings -> String
showsPrec :: Int -> DashIsoImageBasedTrickPlaySettings -> ShowS
$cshowsPrec :: Int -> DashIsoImageBasedTrickPlaySettings -> ShowS
Prelude.Show, (forall x.
 DashIsoImageBasedTrickPlaySettings
 -> Rep DashIsoImageBasedTrickPlaySettings x)
-> (forall x.
    Rep DashIsoImageBasedTrickPlaySettings x
    -> DashIsoImageBasedTrickPlaySettings)
-> Generic DashIsoImageBasedTrickPlaySettings
forall x.
Rep DashIsoImageBasedTrickPlaySettings x
-> DashIsoImageBasedTrickPlaySettings
forall x.
DashIsoImageBasedTrickPlaySettings
-> Rep DashIsoImageBasedTrickPlaySettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DashIsoImageBasedTrickPlaySettings x
-> DashIsoImageBasedTrickPlaySettings
$cfrom :: forall x.
DashIsoImageBasedTrickPlaySettings
-> Rep DashIsoImageBasedTrickPlaySettings x
Prelude.Generic)

-- |
-- Create a value of 'DashIsoImageBasedTrickPlaySettings' 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:
--
-- 'tileWidth', 'dashIsoImageBasedTrickPlaySettings_tileWidth' - Number of thumbnails in each row of a tile image. Set a value between 1
-- and 512.
--
-- 'thumbnailHeight', 'dashIsoImageBasedTrickPlaySettings_thumbnailHeight' - Height of each thumbnail within each tile image, in pixels. Leave blank
-- to maintain aspect ratio with thumbnail width. If following the aspect
-- ratio would lead to a total tile height greater than 4096, then the job
-- will be rejected. Must be divisible by 2.
--
-- 'intervalCadence', 'dashIsoImageBasedTrickPlaySettings_intervalCadence' - The cadence MediaConvert follows for generating thumbnails. If set to
-- FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in
-- the output (matching the GOP cadence). If set to FOLLOW_CUSTOM,
-- MediaConvert generates thumbnails according to the interval you specify
-- in thumbnailInterval.
--
-- 'thumbnailWidth', 'dashIsoImageBasedTrickPlaySettings_thumbnailWidth' - Width of each thumbnail within each tile image, in pixels. Default is
-- 312. Must be divisible by 8.
--
-- 'thumbnailInterval', 'dashIsoImageBasedTrickPlaySettings_thumbnailInterval' - Enter the interval, in seconds, that MediaConvert uses to generate
-- thumbnails. If the interval you enter doesn\'t align with the output
-- frame rate, MediaConvert automatically rounds the interval to align with
-- the output frame rate. For example, if the output frame rate is 29.97
-- frames per second and you enter 5, MediaConvert uses a 150 frame
-- interval to generate thumbnails.
--
-- 'tileHeight', 'dashIsoImageBasedTrickPlaySettings_tileHeight' - Number of thumbnails in each column of a tile image. Set a value between
-- 2 and 2048. Must be divisible by 2.
newDashIsoImageBasedTrickPlaySettings ::
  DashIsoImageBasedTrickPlaySettings
newDashIsoImageBasedTrickPlaySettings :: DashIsoImageBasedTrickPlaySettings
newDashIsoImageBasedTrickPlaySettings =
  DashIsoImageBasedTrickPlaySettings' :: Maybe Natural
-> Maybe Natural
-> Maybe DashIsoIntervalCadence
-> Maybe Natural
-> Maybe Double
-> Maybe Natural
-> DashIsoImageBasedTrickPlaySettings
DashIsoImageBasedTrickPlaySettings'
    { $sel:tileWidth:DashIsoImageBasedTrickPlaySettings' :: Maybe Natural
tileWidth =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:thumbnailHeight:DashIsoImageBasedTrickPlaySettings' :: Maybe Natural
thumbnailHeight = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:intervalCadence:DashIsoImageBasedTrickPlaySettings' :: Maybe DashIsoIntervalCadence
intervalCadence = Maybe DashIsoIntervalCadence
forall a. Maybe a
Prelude.Nothing,
      $sel:thumbnailWidth:DashIsoImageBasedTrickPlaySettings' :: Maybe Natural
thumbnailWidth = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:thumbnailInterval:DashIsoImageBasedTrickPlaySettings' :: Maybe Double
thumbnailInterval = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:tileHeight:DashIsoImageBasedTrickPlaySettings' :: Maybe Natural
tileHeight = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Number of thumbnails in each row of a tile image. Set a value between 1
-- and 512.
dashIsoImageBasedTrickPlaySettings_tileWidth :: Lens.Lens' DashIsoImageBasedTrickPlaySettings (Prelude.Maybe Prelude.Natural)
dashIsoImageBasedTrickPlaySettings_tileWidth :: (Maybe Natural -> f (Maybe Natural))
-> DashIsoImageBasedTrickPlaySettings
-> f DashIsoImageBasedTrickPlaySettings
dashIsoImageBasedTrickPlaySettings_tileWidth = (DashIsoImageBasedTrickPlaySettings -> Maybe Natural)
-> (DashIsoImageBasedTrickPlaySettings
    -> Maybe Natural -> DashIsoImageBasedTrickPlaySettings)
-> Lens
     DashIsoImageBasedTrickPlaySettings
     DashIsoImageBasedTrickPlaySettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashIsoImageBasedTrickPlaySettings' {Maybe Natural
tileWidth :: Maybe Natural
$sel:tileWidth:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Natural
tileWidth} -> Maybe Natural
tileWidth) (\s :: DashIsoImageBasedTrickPlaySettings
s@DashIsoImageBasedTrickPlaySettings' {} Maybe Natural
a -> DashIsoImageBasedTrickPlaySettings
s {$sel:tileWidth:DashIsoImageBasedTrickPlaySettings' :: Maybe Natural
tileWidth = Maybe Natural
a} :: DashIsoImageBasedTrickPlaySettings)

-- | Height of each thumbnail within each tile image, in pixels. Leave blank
-- to maintain aspect ratio with thumbnail width. If following the aspect
-- ratio would lead to a total tile height greater than 4096, then the job
-- will be rejected. Must be divisible by 2.
dashIsoImageBasedTrickPlaySettings_thumbnailHeight :: Lens.Lens' DashIsoImageBasedTrickPlaySettings (Prelude.Maybe Prelude.Natural)
dashIsoImageBasedTrickPlaySettings_thumbnailHeight :: (Maybe Natural -> f (Maybe Natural))
-> DashIsoImageBasedTrickPlaySettings
-> f DashIsoImageBasedTrickPlaySettings
dashIsoImageBasedTrickPlaySettings_thumbnailHeight = (DashIsoImageBasedTrickPlaySettings -> Maybe Natural)
-> (DashIsoImageBasedTrickPlaySettings
    -> Maybe Natural -> DashIsoImageBasedTrickPlaySettings)
-> Lens
     DashIsoImageBasedTrickPlaySettings
     DashIsoImageBasedTrickPlaySettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashIsoImageBasedTrickPlaySettings' {Maybe Natural
thumbnailHeight :: Maybe Natural
$sel:thumbnailHeight:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Natural
thumbnailHeight} -> Maybe Natural
thumbnailHeight) (\s :: DashIsoImageBasedTrickPlaySettings
s@DashIsoImageBasedTrickPlaySettings' {} Maybe Natural
a -> DashIsoImageBasedTrickPlaySettings
s {$sel:thumbnailHeight:DashIsoImageBasedTrickPlaySettings' :: Maybe Natural
thumbnailHeight = Maybe Natural
a} :: DashIsoImageBasedTrickPlaySettings)

-- | The cadence MediaConvert follows for generating thumbnails. If set to
-- FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in
-- the output (matching the GOP cadence). If set to FOLLOW_CUSTOM,
-- MediaConvert generates thumbnails according to the interval you specify
-- in thumbnailInterval.
dashIsoImageBasedTrickPlaySettings_intervalCadence :: Lens.Lens' DashIsoImageBasedTrickPlaySettings (Prelude.Maybe DashIsoIntervalCadence)
dashIsoImageBasedTrickPlaySettings_intervalCadence :: (Maybe DashIsoIntervalCadence -> f (Maybe DashIsoIntervalCadence))
-> DashIsoImageBasedTrickPlaySettings
-> f DashIsoImageBasedTrickPlaySettings
dashIsoImageBasedTrickPlaySettings_intervalCadence = (DashIsoImageBasedTrickPlaySettings
 -> Maybe DashIsoIntervalCadence)
-> (DashIsoImageBasedTrickPlaySettings
    -> Maybe DashIsoIntervalCadence
    -> DashIsoImageBasedTrickPlaySettings)
-> Lens
     DashIsoImageBasedTrickPlaySettings
     DashIsoImageBasedTrickPlaySettings
     (Maybe DashIsoIntervalCadence)
     (Maybe DashIsoIntervalCadence)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashIsoImageBasedTrickPlaySettings' {Maybe DashIsoIntervalCadence
intervalCadence :: Maybe DashIsoIntervalCadence
$sel:intervalCadence:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe DashIsoIntervalCadence
intervalCadence} -> Maybe DashIsoIntervalCadence
intervalCadence) (\s :: DashIsoImageBasedTrickPlaySettings
s@DashIsoImageBasedTrickPlaySettings' {} Maybe DashIsoIntervalCadence
a -> DashIsoImageBasedTrickPlaySettings
s {$sel:intervalCadence:DashIsoImageBasedTrickPlaySettings' :: Maybe DashIsoIntervalCadence
intervalCadence = Maybe DashIsoIntervalCadence
a} :: DashIsoImageBasedTrickPlaySettings)

-- | Width of each thumbnail within each tile image, in pixels. Default is
-- 312. Must be divisible by 8.
dashIsoImageBasedTrickPlaySettings_thumbnailWidth :: Lens.Lens' DashIsoImageBasedTrickPlaySettings (Prelude.Maybe Prelude.Natural)
dashIsoImageBasedTrickPlaySettings_thumbnailWidth :: (Maybe Natural -> f (Maybe Natural))
-> DashIsoImageBasedTrickPlaySettings
-> f DashIsoImageBasedTrickPlaySettings
dashIsoImageBasedTrickPlaySettings_thumbnailWidth = (DashIsoImageBasedTrickPlaySettings -> Maybe Natural)
-> (DashIsoImageBasedTrickPlaySettings
    -> Maybe Natural -> DashIsoImageBasedTrickPlaySettings)
-> Lens
     DashIsoImageBasedTrickPlaySettings
     DashIsoImageBasedTrickPlaySettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashIsoImageBasedTrickPlaySettings' {Maybe Natural
thumbnailWidth :: Maybe Natural
$sel:thumbnailWidth:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Natural
thumbnailWidth} -> Maybe Natural
thumbnailWidth) (\s :: DashIsoImageBasedTrickPlaySettings
s@DashIsoImageBasedTrickPlaySettings' {} Maybe Natural
a -> DashIsoImageBasedTrickPlaySettings
s {$sel:thumbnailWidth:DashIsoImageBasedTrickPlaySettings' :: Maybe Natural
thumbnailWidth = Maybe Natural
a} :: DashIsoImageBasedTrickPlaySettings)

-- | Enter the interval, in seconds, that MediaConvert uses to generate
-- thumbnails. If the interval you enter doesn\'t align with the output
-- frame rate, MediaConvert automatically rounds the interval to align with
-- the output frame rate. For example, if the output frame rate is 29.97
-- frames per second and you enter 5, MediaConvert uses a 150 frame
-- interval to generate thumbnails.
dashIsoImageBasedTrickPlaySettings_thumbnailInterval :: Lens.Lens' DashIsoImageBasedTrickPlaySettings (Prelude.Maybe Prelude.Double)
dashIsoImageBasedTrickPlaySettings_thumbnailInterval :: (Maybe Double -> f (Maybe Double))
-> DashIsoImageBasedTrickPlaySettings
-> f DashIsoImageBasedTrickPlaySettings
dashIsoImageBasedTrickPlaySettings_thumbnailInterval = (DashIsoImageBasedTrickPlaySettings -> Maybe Double)
-> (DashIsoImageBasedTrickPlaySettings
    -> Maybe Double -> DashIsoImageBasedTrickPlaySettings)
-> Lens
     DashIsoImageBasedTrickPlaySettings
     DashIsoImageBasedTrickPlaySettings
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashIsoImageBasedTrickPlaySettings' {Maybe Double
thumbnailInterval :: Maybe Double
$sel:thumbnailInterval:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Double
thumbnailInterval} -> Maybe Double
thumbnailInterval) (\s :: DashIsoImageBasedTrickPlaySettings
s@DashIsoImageBasedTrickPlaySettings' {} Maybe Double
a -> DashIsoImageBasedTrickPlaySettings
s {$sel:thumbnailInterval:DashIsoImageBasedTrickPlaySettings' :: Maybe Double
thumbnailInterval = Maybe Double
a} :: DashIsoImageBasedTrickPlaySettings)

-- | Number of thumbnails in each column of a tile image. Set a value between
-- 2 and 2048. Must be divisible by 2.
dashIsoImageBasedTrickPlaySettings_tileHeight :: Lens.Lens' DashIsoImageBasedTrickPlaySettings (Prelude.Maybe Prelude.Natural)
dashIsoImageBasedTrickPlaySettings_tileHeight :: (Maybe Natural -> f (Maybe Natural))
-> DashIsoImageBasedTrickPlaySettings
-> f DashIsoImageBasedTrickPlaySettings
dashIsoImageBasedTrickPlaySettings_tileHeight = (DashIsoImageBasedTrickPlaySettings -> Maybe Natural)
-> (DashIsoImageBasedTrickPlaySettings
    -> Maybe Natural -> DashIsoImageBasedTrickPlaySettings)
-> Lens
     DashIsoImageBasedTrickPlaySettings
     DashIsoImageBasedTrickPlaySettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashIsoImageBasedTrickPlaySettings' {Maybe Natural
tileHeight :: Maybe Natural
$sel:tileHeight:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Natural
tileHeight} -> Maybe Natural
tileHeight) (\s :: DashIsoImageBasedTrickPlaySettings
s@DashIsoImageBasedTrickPlaySettings' {} Maybe Natural
a -> DashIsoImageBasedTrickPlaySettings
s {$sel:tileHeight:DashIsoImageBasedTrickPlaySettings' :: Maybe Natural
tileHeight = Maybe Natural
a} :: DashIsoImageBasedTrickPlaySettings)

instance
  Core.FromJSON
    DashIsoImageBasedTrickPlaySettings
  where
  parseJSON :: Value -> Parser DashIsoImageBasedTrickPlaySettings
parseJSON =
    String
-> (Object -> Parser DashIsoImageBasedTrickPlaySettings)
-> Value
-> Parser DashIsoImageBasedTrickPlaySettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DashIsoImageBasedTrickPlaySettings"
      ( \Object
x ->
          Maybe Natural
-> Maybe Natural
-> Maybe DashIsoIntervalCadence
-> Maybe Natural
-> Maybe Double
-> Maybe Natural
-> DashIsoImageBasedTrickPlaySettings
DashIsoImageBasedTrickPlaySettings'
            (Maybe Natural
 -> Maybe Natural
 -> Maybe DashIsoIntervalCadence
 -> Maybe Natural
 -> Maybe Double
 -> Maybe Natural
 -> DashIsoImageBasedTrickPlaySettings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe DashIsoIntervalCadence
      -> Maybe Natural
      -> Maybe Double
      -> Maybe Natural
      -> DashIsoImageBasedTrickPlaySettings)
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
"tileWidth")
            Parser
  (Maybe Natural
   -> Maybe DashIsoIntervalCadence
   -> Maybe Natural
   -> Maybe Double
   -> Maybe Natural
   -> DashIsoImageBasedTrickPlaySettings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe DashIsoIntervalCadence
      -> Maybe Natural
      -> Maybe Double
      -> Maybe Natural
      -> DashIsoImageBasedTrickPlaySettings)
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
"thumbnailHeight")
            Parser
  (Maybe DashIsoIntervalCadence
   -> Maybe Natural
   -> Maybe Double
   -> Maybe Natural
   -> DashIsoImageBasedTrickPlaySettings)
-> Parser (Maybe DashIsoIntervalCadence)
-> Parser
     (Maybe Natural
      -> Maybe Double
      -> Maybe Natural
      -> DashIsoImageBasedTrickPlaySettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DashIsoIntervalCadence)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"intervalCadence")
            Parser
  (Maybe Natural
   -> Maybe Double
   -> Maybe Natural
   -> DashIsoImageBasedTrickPlaySettings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Double
      -> Maybe Natural -> DashIsoImageBasedTrickPlaySettings)
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
"thumbnailWidth")
            Parser
  (Maybe Double
   -> Maybe Natural -> DashIsoImageBasedTrickPlaySettings)
-> Parser (Maybe Double)
-> Parser (Maybe Natural -> DashIsoImageBasedTrickPlaySettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"thumbnailInterval")
            Parser (Maybe Natural -> DashIsoImageBasedTrickPlaySettings)
-> Parser (Maybe Natural)
-> Parser DashIsoImageBasedTrickPlaySettings
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
"tileHeight")
      )

instance
  Prelude.Hashable
    DashIsoImageBasedTrickPlaySettings

instance
  Prelude.NFData
    DashIsoImageBasedTrickPlaySettings

instance
  Core.ToJSON
    DashIsoImageBasedTrickPlaySettings
  where
  toJSON :: DashIsoImageBasedTrickPlaySettings -> Value
toJSON DashIsoImageBasedTrickPlaySettings' {Maybe Double
Maybe Natural
Maybe DashIsoIntervalCadence
tileHeight :: Maybe Natural
thumbnailInterval :: Maybe Double
thumbnailWidth :: Maybe Natural
intervalCadence :: Maybe DashIsoIntervalCadence
thumbnailHeight :: Maybe Natural
tileWidth :: Maybe Natural
$sel:tileHeight:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Natural
$sel:thumbnailInterval:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Double
$sel:thumbnailWidth:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Natural
$sel:intervalCadence:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe DashIsoIntervalCadence
$sel:thumbnailHeight:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Natural
$sel:tileWidth:DashIsoImageBasedTrickPlaySettings' :: DashIsoImageBasedTrickPlaySettings -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"tileWidth" 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
tileWidth,
            (Text
"thumbnailHeight" 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
thumbnailHeight,
            (Text
"intervalCadence" Text -> DashIsoIntervalCadence -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DashIsoIntervalCadence -> Pair)
-> Maybe DashIsoIntervalCadence -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DashIsoIntervalCadence
intervalCadence,
            (Text
"thumbnailWidth" 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
thumbnailWidth,
            (Text
"thumbnailInterval" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
thumbnailInterval,
            (Text
"tileHeight" 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
tileHeight
          ]
      )