{-# 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 #-}
module Amazonka.ElasticTranscoder.Types.Thumbnails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Thumbnails = Thumbnails'
{
Thumbnails -> Maybe Text
sizingPolicy :: Prelude.Maybe Prelude.Text,
Thumbnails -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
Thumbnails -> Maybe Text
maxHeight :: Prelude.Maybe Prelude.Text,
Thumbnails -> Maybe Text
resolution :: Prelude.Maybe Prelude.Text,
Thumbnails -> Maybe Text
aspectRatio :: Prelude.Maybe Prelude.Text,
Thumbnails -> Maybe Text
paddingPolicy :: Prelude.Maybe Prelude.Text,
Thumbnails -> Maybe Text
interval :: Prelude.Maybe Prelude.Text,
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)
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
}
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)
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)
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)
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)
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)
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)
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)
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
]
)