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