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

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

-- | Thumbnails for videos.
--
-- /See:/ 'newThumbnails' smart constructor.
data Thumbnails = 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 -> Maybe Text
sizingPolicy :: 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 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | The approximate number of seconds between thumbnails. Specify an integer
    -- value.
    Thumbnails -> Maybe Text
interval :: 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
  }
  deriving (Thumbnails -> Thumbnails -> Bool
(Thumbnails -> Thumbnails -> Bool)
-> (Thumbnails -> Thumbnails -> Bool) -> Eq Thumbnails
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]
(Int -> ReadS Thumbnails)
-> ReadS [Thumbnails]
-> ReadPrec Thumbnails
-> ReadPrec [Thumbnails]
-> Read 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
(Int -> Thumbnails -> ShowS)
-> (Thumbnails -> String)
-> ([Thumbnails] -> ShowS)
-> Show Thumbnails
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. Thumbnails -> Rep Thumbnails x)
-> (forall x. Rep Thumbnails x -> Thumbnails) -> Generic Thumbnails
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:
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'interval', 'thumbnails_interval' - The approximate number of seconds between thumbnails. Specify an integer
-- value.
--
-- '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.
newThumbnails ::
  Thumbnails
newThumbnails :: Thumbnails
newThumbnails =
  Thumbnails' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Thumbnails
Thumbnails'
    { $sel:sizingPolicy:Thumbnails' :: Maybe Text
sizingPolicy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:format:Thumbnails' :: Maybe Text
format = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxHeight:Thumbnails' :: Maybe Text
maxHeight = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resolution:Thumbnails' :: Maybe Text
resolution = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:aspectRatio:Thumbnails' :: Maybe Text
aspectRatio = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:paddingPolicy:Thumbnails' :: Maybe Text
paddingPolicy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:interval:Thumbnails' :: Maybe Text
interval = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxWidth:Thumbnails' :: Maybe Text
maxWidth = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> Thumbnails -> f Thumbnails
thumbnails_sizingPolicy = (Thumbnails -> Maybe Text)
-> (Thumbnails -> Maybe Text -> Thumbnails)
-> Lens Thumbnails Thumbnails (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> Thumbnails -> f Thumbnails
thumbnails_format = (Thumbnails -> Maybe Text)
-> (Thumbnails -> Maybe Text -> Thumbnails)
-> Lens Thumbnails Thumbnails (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text)) -> Thumbnails -> f Thumbnails
thumbnails_maxHeight = (Thumbnails -> Maybe Text)
-> (Thumbnails -> Maybe Text -> Thumbnails)
-> Lens Thumbnails Thumbnails (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> Thumbnails -> f Thumbnails
thumbnails_resolution = (Thumbnails -> Maybe Text)
-> (Thumbnails -> Maybe Text -> Thumbnails)
-> Lens Thumbnails Thumbnails (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> Thumbnails -> f Thumbnails
thumbnails_aspectRatio = (Thumbnails -> Maybe Text)
-> (Thumbnails -> Maybe Text -> Thumbnails)
-> Lens Thumbnails Thumbnails (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> Thumbnails -> f Thumbnails
thumbnails_paddingPolicy = (Thumbnails -> Maybe Text)
-> (Thumbnails -> Maybe Text -> Thumbnails)
-> Lens Thumbnails Thumbnails (Maybe Text) (Maybe Text)
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)

-- | The approximate number of seconds between thumbnails. Specify an integer
-- value.
thumbnails_interval :: Lens.Lens' Thumbnails (Prelude.Maybe Prelude.Text)
thumbnails_interval :: (Maybe Text -> f (Maybe Text)) -> Thumbnails -> f Thumbnails
thumbnails_interval = (Thumbnails -> Maybe Text)
-> (Thumbnails -> Maybe Text -> Thumbnails)
-> Lens Thumbnails Thumbnails (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text)) -> Thumbnails -> f Thumbnails
thumbnails_maxWidth = (Thumbnails -> Maybe Text)
-> (Thumbnails -> Maybe Text -> Thumbnails)
-> Lens Thumbnails Thumbnails (Maybe Text) (Maybe Text)
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)

instance Core.FromJSON Thumbnails where
  parseJSON :: Value -> Parser Thumbnails
parseJSON =
    String
-> (Object -> Parser Thumbnails) -> Value -> Parser Thumbnails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Thumbnails"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Thumbnails
Thumbnails'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Thumbnails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Thumbnails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SizingPolicy")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Thumbnails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Thumbnails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Format")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Thumbnails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Thumbnails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxHeight")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Thumbnails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> Thumbnails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Resolution")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> Thumbnails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Thumbnails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AspectRatio")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> Thumbnails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Thumbnails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PaddingPolicy")
            Parser (Maybe Text -> Maybe Text -> Thumbnails)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Thumbnails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Interval")
            Parser (Maybe Text -> Thumbnails)
-> Parser (Maybe Text) -> Parser Thumbnails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxWidth")
      )

instance Prelude.Hashable Thumbnails

instance Prelude.NFData Thumbnails

instance Core.ToJSON Thumbnails where
  toJSON :: Thumbnails -> Value
toJSON Thumbnails' {Maybe Text
maxWidth :: Maybe Text
interval :: Maybe Text
paddingPolicy :: Maybe Text
aspectRatio :: Maybe Text
resolution :: Maybe Text
maxHeight :: Maybe Text
format :: Maybe Text
sizingPolicy :: Maybe Text
$sel:maxWidth:Thumbnails' :: Thumbnails -> Maybe Text
$sel:interval:Thumbnails' :: Thumbnails -> Maybe Text
$sel:paddingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
$sel:aspectRatio:Thumbnails' :: Thumbnails -> Maybe Text
$sel:resolution:Thumbnails' :: Thumbnails -> Maybe Text
$sel:maxHeight:Thumbnails' :: Thumbnails -> Maybe Text
$sel:format:Thumbnails' :: Thumbnails -> Maybe Text
$sel:sizingPolicy:Thumbnails' :: Thumbnails -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"SizingPolicy" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sizingPolicy,
            (Text
"Format" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
format,
            (Text
"MaxHeight" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
maxHeight,
            (Text
"Resolution" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resolution,
            (Text
"AspectRatio" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
aspectRatio,
            (Text
"PaddingPolicy" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
paddingPolicy,
            (Text
"Interval" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
interval,
            (Text
"MaxWidth" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
maxWidth
          ]
      )