{-# 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.ElasticTranscoder.Types.Thumbnails
-- 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.ElasticTranscoder.Types.Thumbnails 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

-- | Thumbnails for videos.
--
-- /See:/ 'newThumbnails' smart constructor.
data Thumbnails = Thumbnails'
  { -- | To better control resolution and aspect ratio of thumbnails, we
    -- recommend that you use the values @MaxWidth@, @MaxHeight@,
    -- @SizingPolicy@, and @PaddingPolicy@ instead of @Resolution@ and
    -- @AspectRatio@. The two groups of settings are mutually exclusive. Do not
    -- use them together.
    --
    -- The aspect ratio of thumbnails. Valid values include:
    --
    -- @auto@, @1:1@, @4:3@, @3:2@, @16:9@
    --
    -- If you specify @auto@, Elastic Transcoder tries to preserve the aspect
    -- ratio of the video in the output file.
    Thumbnails -> Maybe Text
aspectRatio :: Prelude.Maybe Prelude.Text,
    -- | The format of thumbnails, if any. Valid values are @jpg@ and @png@.
    --
    -- You specify whether you want Elastic Transcoder to create thumbnails
    -- when you create a job.
    Thumbnails -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
    -- | The approximate number of seconds between thumbnails. Specify an integer
    -- value.
    Thumbnails -> Maybe Text
interval :: Prelude.Maybe Prelude.Text,
    -- | The maximum height of thumbnails in pixels. If you specify auto, Elastic
    -- Transcoder uses 1080 (Full HD) as the default value. If you specify a
    -- numeric value, enter an even integer between 32 and 3072.
    Thumbnails -> Maybe Text
maxHeight :: Prelude.Maybe Prelude.Text,
    -- | The maximum width of thumbnails in pixels. If you specify auto, Elastic
    -- Transcoder uses 1920 (Full HD) as the default value. If you specify a
    -- numeric value, enter an even integer between 32 and 4096.
    Thumbnails -> Maybe Text
maxWidth :: Prelude.Maybe Prelude.Text,
    -- | When you set @PaddingPolicy@ to @Pad@, Elastic Transcoder may add black
    -- bars to the top and bottom and\/or left and right sides of thumbnails to
    -- make the total size of the thumbnails match the values that you
    -- specified for thumbnail @MaxWidth@ and @MaxHeight@ settings.
    Thumbnails -> Maybe Text
paddingPolicy :: Prelude.Maybe Prelude.Text,
    -- | To better control resolution and aspect ratio of thumbnails, we
    -- recommend that you use the values @MaxWidth@, @MaxHeight@,
    -- @SizingPolicy@, and @PaddingPolicy@ instead of @Resolution@ and
    -- @AspectRatio@. The two groups of settings are mutually exclusive. Do not
    -- use them together.
    --
    -- The width and height of thumbnail files in pixels. Specify a value in
    -- the format @ @/@width@/@ @ x @ @/@height@/@ @ where both values are even
    -- integers. The values cannot exceed the width and height that you
    -- specified in the @Video:Resolution@ object.
    Thumbnails -> Maybe Text
resolution :: Prelude.Maybe Prelude.Text,
    -- | Specify one of the following values to control scaling of thumbnails:
    --
    -- -   @Fit@: Elastic Transcoder scales thumbnails so they match the value
    --     that you specified in thumbnail MaxWidth or MaxHeight settings
    --     without exceeding the other value.
    --
    -- -   @Fill@: Elastic Transcoder scales thumbnails so they match the value
    --     that you specified in thumbnail @MaxWidth@ or @MaxHeight@ settings
    --     and matches or exceeds the other value. Elastic Transcoder centers
    --     the image in thumbnails and then crops in the dimension (if any)
    --     that exceeds the maximum value.
    --
    -- -   @Stretch@: Elastic Transcoder stretches thumbnails to match the
    --     values that you specified for thumbnail @MaxWidth@ and @MaxHeight@
    --     settings. If the relative proportions of the input video and
    --     thumbnails are different, the thumbnails will be distorted.
    --
    -- -   @Keep@: Elastic Transcoder does not scale thumbnails. If either
    --     dimension of the input video exceeds the values that you specified
    --     for thumbnail @MaxWidth@ and @MaxHeight@ settings, Elastic
    --     Transcoder crops the thumbnails.
    --
    -- -   @ShrinkToFit@: Elastic Transcoder scales thumbnails down so that
    --     their dimensions match the values that you specified for at least
    --     one of thumbnail @MaxWidth@ and @MaxHeight@ without exceeding either
    --     value. If you specify this option, Elastic Transcoder does not scale
    --     thumbnails up.
    --
    -- -   @ShrinkToFill@: Elastic Transcoder scales thumbnails down so that
    --     their dimensions match the values that you specified for at least
    --     one of @MaxWidth@ and @MaxHeight@ without dropping below either
    --     value. If you specify this option, Elastic Transcoder does not scale
    --     thumbnails up.
    Thumbnails -> Maybe Text
sizingPolicy :: Prelude.Maybe Prelude.Text
  }
  deriving (Thumbnails -> Thumbnails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Thumbnails -> Thumbnails -> Bool
$c/= :: Thumbnails -> Thumbnails -> Bool
== :: Thumbnails -> Thumbnails -> Bool
$c== :: Thumbnails -> Thumbnails -> Bool
Prelude.Eq, ReadPrec [Thumbnails]
ReadPrec Thumbnails
Int -> ReadS Thumbnails
ReadS [Thumbnails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Thumbnails]
$creadListPrec :: ReadPrec [Thumbnails]
readPrec :: ReadPrec Thumbnails
$creadPrec :: ReadPrec Thumbnails
readList :: ReadS [Thumbnails]
$creadList :: ReadS [Thumbnails]
readsPrec :: Int -> ReadS Thumbnails
$creadsPrec :: Int -> ReadS Thumbnails
Prelude.Read, Int -> Thumbnails -> ShowS
[Thumbnails] -> ShowS
Thumbnails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Thumbnails] -> ShowS
$cshowList :: [Thumbnails] -> ShowS
show :: Thumbnails -> String
$cshow :: Thumbnails -> String
showsPrec :: Int -> Thumbnails -> ShowS
$cshowsPrec :: Int -> Thumbnails -> ShowS
Prelude.Show, forall x. Rep Thumbnails x -> Thumbnails
forall x. Thumbnails -> Rep Thumbnails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Thumbnails x -> Thumbnails
$cfrom :: forall x. Thumbnails -> Rep Thumbnails x
Prelude.Generic)

-- |
-- Create a value of 'Thumbnails' 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:
--
-- 'aspectRatio', 'thumbnails_aspectRatio' - To better control resolution and aspect ratio of thumbnails, we
-- recommend that you use the values @MaxWidth@, @MaxHeight@,
-- @SizingPolicy@, and @PaddingPolicy@ instead of @Resolution@ and
-- @AspectRatio@. The two groups of settings are mutually exclusive. Do not
-- use them together.
--
-- The aspect ratio of thumbnails. Valid values include:
--
-- @auto@, @1:1@, @4:3@, @3:2@, @16:9@
--
-- If you specify @auto@, Elastic Transcoder tries to preserve the aspect
-- ratio of the video in the output file.
--
-- 'format', 'thumbnails_format' - The format of thumbnails, if any. Valid values are @jpg@ and @png@.
--
-- You specify whether you want Elastic Transcoder to create thumbnails
-- when you create a job.
--
-- 'interval', 'thumbnails_interval' - The approximate number of seconds between thumbnails. Specify an integer
-- value.
--
-- 'maxHeight', 'thumbnails_maxHeight' - The maximum height of thumbnails in pixels. If you specify auto, Elastic
-- Transcoder uses 1080 (Full HD) as the default value. If you specify a
-- numeric value, enter an even integer between 32 and 3072.
--
-- 'maxWidth', 'thumbnails_maxWidth' - The maximum width of thumbnails in pixels. If you specify auto, Elastic
-- Transcoder uses 1920 (Full HD) as the default value. If you specify a
-- numeric value, enter an even integer between 32 and 4096.
--
-- 'paddingPolicy', 'thumbnails_paddingPolicy' - When you set @PaddingPolicy@ to @Pad@, Elastic Transcoder may add black
-- bars to the top and bottom and\/or left and right sides of thumbnails to
-- make the total size of the thumbnails match the values that you
-- specified for thumbnail @MaxWidth@ and @MaxHeight@ settings.
--
-- 'resolution', 'thumbnails_resolution' - To better control resolution and aspect ratio of thumbnails, we
-- recommend that you use the values @MaxWidth@, @MaxHeight@,
-- @SizingPolicy@, and @PaddingPolicy@ instead of @Resolution@ and
-- @AspectRatio@. The two groups of settings are mutually exclusive. Do not
-- use them together.
--
-- The width and height of thumbnail files in pixels. Specify a value in
-- the format @ @/@width@/@ @ x @ @/@height@/@ @ where both values are even
-- integers. The values cannot exceed the width and height that you
-- specified in the @Video:Resolution@ object.
--
-- 'sizingPolicy', 'thumbnails_sizingPolicy' - Specify one of the following values to control scaling of thumbnails:
--
-- -   @Fit@: Elastic Transcoder scales thumbnails so they match the value
--     that you specified in thumbnail MaxWidth or MaxHeight settings
--     without exceeding the other value.
--
-- -   @Fill@: Elastic Transcoder scales thumbnails so they match the value
--     that you specified in thumbnail @MaxWidth@ or @MaxHeight@ settings
--     and matches or exceeds the other value. Elastic Transcoder centers
--     the image in thumbnails and then crops in the dimension (if any)
--     that exceeds the maximum value.
--
-- -   @Stretch@: Elastic Transcoder stretches thumbnails to match the
--     values that you specified for thumbnail @MaxWidth@ and @MaxHeight@
--     settings. If the relative proportions of the input video and
--     thumbnails are different, the thumbnails will be distorted.
--
-- -   @Keep@: Elastic Transcoder does not scale thumbnails. If either
--     dimension of the input video exceeds the values that you specified
--     for thumbnail @MaxWidth@ and @MaxHeight@ settings, Elastic
--     Transcoder crops the thumbnails.
--
-- -   @ShrinkToFit@: Elastic Transcoder scales thumbnails down so that
--     their dimensions match the values that you specified for at least
--     one of thumbnail @MaxWidth@ and @MaxHeight@ without exceeding either
--     value. If you specify this option, Elastic Transcoder does not scale
--     thumbnails up.
--
-- -   @ShrinkToFill@: Elastic Transcoder scales thumbnails down so that
--     their dimensions match the values that you specified for at least
--     one of @MaxWidth@ and @MaxHeight@ without dropping below either
--     value. If you specify this option, Elastic Transcoder does not scale
--     thumbnails up.
newThumbnails ::
  Thumbnails
newThumbnails :: Thumbnails
newThumbnails =
  Thumbnails'
    { $sel:aspectRatio:Thumbnails' :: Maybe Text
aspectRatio = forall a. Maybe a
Prelude.Nothing,
      $sel:format:Thumbnails' :: Maybe Text
format = forall a. Maybe a
Prelude.Nothing,
      $sel:interval:Thumbnails' :: Maybe Text
interval = forall a. Maybe a
Prelude.Nothing,
      $sel:maxHeight:Thumbnails' :: Maybe Text
maxHeight = forall a. Maybe a
Prelude.Nothing,
      $sel:maxWidth:Thumbnails' :: Maybe Text
maxWidth = forall a. Maybe a
Prelude.Nothing,
      $sel:paddingPolicy:Thumbnails' :: Maybe Text
paddingPolicy = forall a. Maybe a
Prelude.Nothing,
      $sel:resolution:Thumbnails' :: Maybe Text
resolution = forall a. Maybe a
Prelude.Nothing,
      $sel:sizingPolicy:Thumbnails' :: Maybe Text
sizingPolicy = forall a. Maybe a
Prelude.Nothing
    }

-- | To better control resolution and aspect ratio of thumbnails, we
-- recommend that you use the values @MaxWidth@, @MaxHeight@,
-- @SizingPolicy@, and @PaddingPolicy@ instead of @Resolution@ and
-- @AspectRatio@. The two groups of settings are mutually exclusive. Do not
-- use them together.
--
-- The aspect ratio of thumbnails. Valid values include:
--
-- @auto@, @1:1@, @4:3@, @3:2@, @16:9@
--
-- If you specify @auto@, Elastic Transcoder tries to preserve the aspect
-- ratio of the video in the output file.
thumbnails_aspectRatio :: Lens.Lens' Thumbnails (Prelude.Maybe Prelude.Text)
thumbnails_aspectRatio :: Lens' Thumbnails (Maybe Text)
thumbnails_aspectRatio = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Thumbnails' {Maybe Text
aspectRatio :: Maybe Text
$sel:aspectRatio:Thumbnails' :: Thumbnails -> Maybe Text
aspectRatio} -> Maybe Text
aspectRatio) (\s :: Thumbnails
s@Thumbnails' {} Maybe Text
a -> Thumbnails
s {$sel:aspectRatio:Thumbnails' :: Maybe Text
aspectRatio = Maybe Text
a} :: Thumbnails)

-- | The format of thumbnails, if any. Valid values are @jpg@ and @png@.
--
-- You specify whether you want Elastic Transcoder to create thumbnails
-- when you create a job.
thumbnails_format :: Lens.Lens' Thumbnails (Prelude.Maybe Prelude.Text)
thumbnails_format :: Lens' Thumbnails (Maybe Text)
thumbnails_format = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Thumbnails' {Maybe Text
format :: Maybe Text
$sel:format:Thumbnails' :: Thumbnails -> Maybe Text
format} -> Maybe Text
format) (\s :: Thumbnails
s@Thumbnails' {} Maybe Text
a -> Thumbnails
s {$sel:format:Thumbnails' :: Maybe Text
format = Maybe Text
a} :: Thumbnails)

-- | The approximate number of seconds between thumbnails. Specify an integer
-- value.
thumbnails_interval :: Lens.Lens' Thumbnails (Prelude.Maybe Prelude.Text)
thumbnails_interval :: Lens' Thumbnails (Maybe Text)
thumbnails_interval = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Thumbnails' {Maybe Text
interval :: Maybe Text
$sel:interval:Thumbnails' :: Thumbnails -> Maybe Text
interval} -> Maybe Text
interval) (\s :: Thumbnails
s@Thumbnails' {} Maybe Text
a -> Thumbnails
s {$sel:interval:Thumbnails' :: Maybe Text
interval = Maybe Text
a} :: Thumbnails)

-- | The maximum height of thumbnails in pixels. If you specify auto, Elastic
-- Transcoder uses 1080 (Full HD) as the default value. If you specify a
-- numeric value, enter an even integer between 32 and 3072.
thumbnails_maxHeight :: Lens.Lens' Thumbnails (Prelude.Maybe Prelude.Text)
thumbnails_maxHeight :: Lens' Thumbnails (Maybe Text)
thumbnails_maxHeight = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Thumbnails' {Maybe Text
maxHeight :: Maybe Text
$sel:maxHeight:Thumbnails' :: Thumbnails -> Maybe Text
maxHeight} -> Maybe Text
maxHeight) (\s :: Thumbnails
s@Thumbnails' {} Maybe Text
a -> Thumbnails
s {$sel:maxHeight:Thumbnails' :: Maybe Text
maxHeight = Maybe Text
a} :: Thumbnails)

-- | The maximum width of thumbnails in pixels. If you specify auto, Elastic
-- Transcoder uses 1920 (Full HD) as the default value. If you specify a
-- numeric value, enter an even integer between 32 and 4096.
thumbnails_maxWidth :: Lens.Lens' Thumbnails (Prelude.Maybe Prelude.Text)
thumbnails_maxWidth :: Lens' Thumbnails (Maybe Text)
thumbnails_maxWidth = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Thumbnails' {Maybe Text
maxWidth :: Maybe Text
$sel:maxWidth:Thumbnails' :: Thumbnails -> Maybe Text
maxWidth} -> Maybe Text
maxWidth) (\s :: Thumbnails
s@Thumbnails' {} Maybe Text
a -> Thumbnails
s {$sel:maxWidth:Thumbnails' :: Maybe Text
maxWidth = Maybe Text
a} :: Thumbnails)

-- | When you set @PaddingPolicy@ to @Pad@, Elastic Transcoder may add black
-- bars to the top and bottom and\/or left and right sides of thumbnails to
-- make the total size of the thumbnails match the values that you
-- specified for thumbnail @MaxWidth@ and @MaxHeight@ settings.
thumbnails_paddingPolicy :: Lens.Lens' Thumbnails (Prelude.Maybe Prelude.Text)
thumbnails_paddingPolicy :: Lens' Thumbnails (Maybe Text)
thumbnails_paddingPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Thumbnails' {Maybe Text
paddingPolicy :: Maybe Text
$sel:paddingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
paddingPolicy} -> Maybe Text
paddingPolicy) (\s :: Thumbnails
s@Thumbnails' {} Maybe Text
a -> Thumbnails
s {$sel:paddingPolicy:Thumbnails' :: Maybe Text
paddingPolicy = Maybe Text
a} :: Thumbnails)

-- | To better control resolution and aspect ratio of thumbnails, we
-- recommend that you use the values @MaxWidth@, @MaxHeight@,
-- @SizingPolicy@, and @PaddingPolicy@ instead of @Resolution@ and
-- @AspectRatio@. The two groups of settings are mutually exclusive. Do not
-- use them together.
--
-- The width and height of thumbnail files in pixels. Specify a value in
-- the format @ @/@width@/@ @ x @ @/@height@/@ @ where both values are even
-- integers. The values cannot exceed the width and height that you
-- specified in the @Video:Resolution@ object.
thumbnails_resolution :: Lens.Lens' Thumbnails (Prelude.Maybe Prelude.Text)
thumbnails_resolution :: Lens' Thumbnails (Maybe Text)
thumbnails_resolution = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Thumbnails' {Maybe Text
resolution :: Maybe Text
$sel:resolution:Thumbnails' :: Thumbnails -> Maybe Text
resolution} -> Maybe Text
resolution) (\s :: Thumbnails
s@Thumbnails' {} Maybe Text
a -> Thumbnails
s {$sel:resolution:Thumbnails' :: Maybe Text
resolution = Maybe Text
a} :: Thumbnails)

-- | Specify one of the following values to control scaling of thumbnails:
--
-- -   @Fit@: Elastic Transcoder scales thumbnails so they match the value
--     that you specified in thumbnail MaxWidth or MaxHeight settings
--     without exceeding the other value.
--
-- -   @Fill@: Elastic Transcoder scales thumbnails so they match the value
--     that you specified in thumbnail @MaxWidth@ or @MaxHeight@ settings
--     and matches or exceeds the other value. Elastic Transcoder centers
--     the image in thumbnails and then crops in the dimension (if any)
--     that exceeds the maximum value.
--
-- -   @Stretch@: Elastic Transcoder stretches thumbnails to match the
--     values that you specified for thumbnail @MaxWidth@ and @MaxHeight@
--     settings. If the relative proportions of the input video and
--     thumbnails are different, the thumbnails will be distorted.
--
-- -   @Keep@: Elastic Transcoder does not scale thumbnails. If either
--     dimension of the input video exceeds the values that you specified
--     for thumbnail @MaxWidth@ and @MaxHeight@ settings, Elastic
--     Transcoder crops the thumbnails.
--
-- -   @ShrinkToFit@: Elastic Transcoder scales thumbnails down so that
--     their dimensions match the values that you specified for at least
--     one of thumbnail @MaxWidth@ and @MaxHeight@ without exceeding either
--     value. If you specify this option, Elastic Transcoder does not scale
--     thumbnails up.
--
-- -   @ShrinkToFill@: Elastic Transcoder scales thumbnails down so that
--     their dimensions match the values that you specified for at least
--     one of @MaxWidth@ and @MaxHeight@ without dropping below either
--     value. If you specify this option, Elastic Transcoder does not scale
--     thumbnails up.
thumbnails_sizingPolicy :: Lens.Lens' Thumbnails (Prelude.Maybe Prelude.Text)
thumbnails_sizingPolicy :: Lens' Thumbnails (Maybe Text)
thumbnails_sizingPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Thumbnails' {Maybe Text
sizingPolicy :: Maybe Text
$sel:sizingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
sizingPolicy} -> Maybe Text
sizingPolicy) (\s :: Thumbnails
s@Thumbnails' {} Maybe Text
a -> Thumbnails
s {$sel:sizingPolicy:Thumbnails' :: Maybe Text
sizingPolicy = Maybe Text
a} :: Thumbnails)

instance Data.FromJSON Thumbnails where
  parseJSON :: Value -> Parser Thumbnails
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Thumbnails"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Thumbnails
Thumbnails'
            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
"AspectRatio")
            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
"Format")
            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
"Interval")
            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
"MaxHeight")
            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
"MaxWidth")
            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
"PaddingPolicy")
            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
"Resolution")
            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
"SizingPolicy")
      )

instance Prelude.Hashable Thumbnails where
  hashWithSalt :: Int -> Thumbnails -> Int
hashWithSalt Int
_salt Thumbnails' {Maybe Text
sizingPolicy :: Maybe Text
resolution :: Maybe Text
paddingPolicy :: Maybe Text
maxWidth :: Maybe Text
maxHeight :: Maybe Text
interval :: Maybe Text
format :: Maybe Text
aspectRatio :: Maybe Text
$sel:sizingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
$sel:resolution:Thumbnails' :: Thumbnails -> Maybe Text
$sel:paddingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
$sel:maxWidth:Thumbnails' :: Thumbnails -> Maybe Text
$sel:maxHeight:Thumbnails' :: Thumbnails -> Maybe Text
$sel:interval:Thumbnails' :: Thumbnails -> Maybe Text
$sel:format:Thumbnails' :: Thumbnails -> Maybe Text
$sel:aspectRatio:Thumbnails' :: Thumbnails -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
aspectRatio
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
format
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
interval
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maxHeight
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maxWidth
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
paddingPolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resolution
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sizingPolicy

instance Prelude.NFData Thumbnails where
  rnf :: Thumbnails -> ()
rnf Thumbnails' {Maybe Text
sizingPolicy :: Maybe Text
resolution :: Maybe Text
paddingPolicy :: Maybe Text
maxWidth :: Maybe Text
maxHeight :: Maybe Text
interval :: Maybe Text
format :: Maybe Text
aspectRatio :: Maybe Text
$sel:sizingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
$sel:resolution:Thumbnails' :: Thumbnails -> Maybe Text
$sel:paddingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
$sel:maxWidth:Thumbnails' :: Thumbnails -> Maybe Text
$sel:maxHeight:Thumbnails' :: Thumbnails -> Maybe Text
$sel:interval:Thumbnails' :: Thumbnails -> Maybe Text
$sel:format:Thumbnails' :: Thumbnails -> Maybe Text
$sel:aspectRatio:Thumbnails' :: Thumbnails -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
aspectRatio
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
format
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
interval
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maxHeight
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maxWidth
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
paddingPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resolution
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sizingPolicy

instance Data.ToJSON Thumbnails where
  toJSON :: Thumbnails -> Value
toJSON Thumbnails' {Maybe Text
sizingPolicy :: Maybe Text
resolution :: Maybe Text
paddingPolicy :: Maybe Text
maxWidth :: Maybe Text
maxHeight :: Maybe Text
interval :: Maybe Text
format :: Maybe Text
aspectRatio :: Maybe Text
$sel:sizingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
$sel:resolution:Thumbnails' :: Thumbnails -> Maybe Text
$sel:paddingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
$sel:maxWidth:Thumbnails' :: Thumbnails -> Maybe Text
$sel:maxHeight:Thumbnails' :: Thumbnails -> Maybe Text
$sel:interval:Thumbnails' :: Thumbnails -> Maybe Text
$sel:format:Thumbnails' :: Thumbnails -> Maybe Text
$sel:aspectRatio:Thumbnails' :: Thumbnails -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AspectRatio" 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
aspectRatio,
            (Key
"Format" 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
format,
            (Key
"Interval" 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
interval,
            (Key
"MaxHeight" 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
maxHeight,
            (Key
"MaxWidth" 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
maxWidth,
            (Key
"PaddingPolicy" 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
paddingPolicy,
            (Key
"Resolution" 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
resolution,
            (Key
"SizingPolicy" 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
sizingPolicy
          ]
      )