{-# 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.Artwork where
import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.Types.Encryption
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Artwork = Artwork'
{
Artwork -> Maybe Text
sizingPolicy :: Prelude.Maybe Prelude.Text,
Artwork -> Maybe Text
albumArtFormat :: Prelude.Maybe Prelude.Text,
Artwork -> Maybe Text
maxHeight :: Prelude.Maybe Prelude.Text,
Artwork -> Maybe Text
inputKey :: Prelude.Maybe Prelude.Text,
Artwork -> Maybe Text
paddingPolicy :: Prelude.Maybe Prelude.Text,
Artwork -> Maybe Encryption
encryption :: Prelude.Maybe Encryption,
Artwork -> Maybe Text
maxWidth :: Prelude.Maybe Prelude.Text
}
deriving (Artwork -> Artwork -> Bool
(Artwork -> Artwork -> Bool)
-> (Artwork -> Artwork -> Bool) -> Eq Artwork
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Artwork -> Artwork -> Bool
$c/= :: Artwork -> Artwork -> Bool
== :: Artwork -> Artwork -> Bool
$c== :: Artwork -> Artwork -> Bool
Prelude.Eq, ReadPrec [Artwork]
ReadPrec Artwork
Int -> ReadS Artwork
ReadS [Artwork]
(Int -> ReadS Artwork)
-> ReadS [Artwork]
-> ReadPrec Artwork
-> ReadPrec [Artwork]
-> Read Artwork
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Artwork]
$creadListPrec :: ReadPrec [Artwork]
readPrec :: ReadPrec Artwork
$creadPrec :: ReadPrec Artwork
readList :: ReadS [Artwork]
$creadList :: ReadS [Artwork]
readsPrec :: Int -> ReadS Artwork
$creadsPrec :: Int -> ReadS Artwork
Prelude.Read, Int -> Artwork -> ShowS
[Artwork] -> ShowS
Artwork -> String
(Int -> Artwork -> ShowS)
-> (Artwork -> String) -> ([Artwork] -> ShowS) -> Show Artwork
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Artwork] -> ShowS
$cshowList :: [Artwork] -> ShowS
show :: Artwork -> String
$cshow :: Artwork -> String
showsPrec :: Int -> Artwork -> ShowS
$cshowsPrec :: Int -> Artwork -> ShowS
Prelude.Show, (forall x. Artwork -> Rep Artwork x)
-> (forall x. Rep Artwork x -> Artwork) -> Generic Artwork
forall x. Rep Artwork x -> Artwork
forall x. Artwork -> Rep Artwork x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Artwork x -> Artwork
$cfrom :: forall x. Artwork -> Rep Artwork x
Prelude.Generic)
newArtwork ::
Artwork
newArtwork :: Artwork
newArtwork =
Artwork' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Encryption
-> Maybe Text
-> Artwork
Artwork'
{ $sel:sizingPolicy:Artwork' :: Maybe Text
sizingPolicy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:albumArtFormat:Artwork' :: Maybe Text
albumArtFormat = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxHeight:Artwork' :: Maybe Text
maxHeight = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:inputKey:Artwork' :: Maybe Text
inputKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:paddingPolicy:Artwork' :: Maybe Text
paddingPolicy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:encryption:Artwork' :: Maybe Encryption
encryption = Maybe Encryption
forall a. Maybe a
Prelude.Nothing,
$sel:maxWidth:Artwork' :: Maybe Text
maxWidth = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
artwork_sizingPolicy :: Lens.Lens' Artwork (Prelude.Maybe Prelude.Text)
artwork_sizingPolicy :: (Maybe Text -> f (Maybe Text)) -> Artwork -> f Artwork
artwork_sizingPolicy = (Artwork -> Maybe Text)
-> (Artwork -> Maybe Text -> Artwork)
-> Lens Artwork Artwork (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Artwork' {Maybe Text
sizingPolicy :: Maybe Text
$sel:sizingPolicy:Artwork' :: Artwork -> Maybe Text
sizingPolicy} -> Maybe Text
sizingPolicy) (\s :: Artwork
s@Artwork' {} Maybe Text
a -> Artwork
s {$sel:sizingPolicy:Artwork' :: Maybe Text
sizingPolicy = Maybe Text
a} :: Artwork)
artwork_albumArtFormat :: Lens.Lens' Artwork (Prelude.Maybe Prelude.Text)
artwork_albumArtFormat :: (Maybe Text -> f (Maybe Text)) -> Artwork -> f Artwork
artwork_albumArtFormat = (Artwork -> Maybe Text)
-> (Artwork -> Maybe Text -> Artwork)
-> Lens Artwork Artwork (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Artwork' {Maybe Text
albumArtFormat :: Maybe Text
$sel:albumArtFormat:Artwork' :: Artwork -> Maybe Text
albumArtFormat} -> Maybe Text
albumArtFormat) (\s :: Artwork
s@Artwork' {} Maybe Text
a -> Artwork
s {$sel:albumArtFormat:Artwork' :: Maybe Text
albumArtFormat = Maybe Text
a} :: Artwork)
artwork_maxHeight :: Lens.Lens' Artwork (Prelude.Maybe Prelude.Text)
artwork_maxHeight :: (Maybe Text -> f (Maybe Text)) -> Artwork -> f Artwork
artwork_maxHeight = (Artwork -> Maybe Text)
-> (Artwork -> Maybe Text -> Artwork)
-> Lens Artwork Artwork (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Artwork' {Maybe Text
maxHeight :: Maybe Text
$sel:maxHeight:Artwork' :: Artwork -> Maybe Text
maxHeight} -> Maybe Text
maxHeight) (\s :: Artwork
s@Artwork' {} Maybe Text
a -> Artwork
s {$sel:maxHeight:Artwork' :: Maybe Text
maxHeight = Maybe Text
a} :: Artwork)
artwork_inputKey :: Lens.Lens' Artwork (Prelude.Maybe Prelude.Text)
artwork_inputKey :: (Maybe Text -> f (Maybe Text)) -> Artwork -> f Artwork
artwork_inputKey = (Artwork -> Maybe Text)
-> (Artwork -> Maybe Text -> Artwork)
-> Lens Artwork Artwork (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Artwork' {Maybe Text
inputKey :: Maybe Text
$sel:inputKey:Artwork' :: Artwork -> Maybe Text
inputKey} -> Maybe Text
inputKey) (\s :: Artwork
s@Artwork' {} Maybe Text
a -> Artwork
s {$sel:inputKey:Artwork' :: Maybe Text
inputKey = Maybe Text
a} :: Artwork)
artwork_paddingPolicy :: Lens.Lens' Artwork (Prelude.Maybe Prelude.Text)
artwork_paddingPolicy :: (Maybe Text -> f (Maybe Text)) -> Artwork -> f Artwork
artwork_paddingPolicy = (Artwork -> Maybe Text)
-> (Artwork -> Maybe Text -> Artwork)
-> Lens Artwork Artwork (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Artwork' {Maybe Text
paddingPolicy :: Maybe Text
$sel:paddingPolicy:Artwork' :: Artwork -> Maybe Text
paddingPolicy} -> Maybe Text
paddingPolicy) (\s :: Artwork
s@Artwork' {} Maybe Text
a -> Artwork
s {$sel:paddingPolicy:Artwork' :: Maybe Text
paddingPolicy = Maybe Text
a} :: Artwork)
artwork_encryption :: Lens.Lens' Artwork (Prelude.Maybe Encryption)
artwork_encryption :: (Maybe Encryption -> f (Maybe Encryption)) -> Artwork -> f Artwork
artwork_encryption = (Artwork -> Maybe Encryption)
-> (Artwork -> Maybe Encryption -> Artwork)
-> Lens Artwork Artwork (Maybe Encryption) (Maybe Encryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Artwork' {Maybe Encryption
encryption :: Maybe Encryption
$sel:encryption:Artwork' :: Artwork -> Maybe Encryption
encryption} -> Maybe Encryption
encryption) (\s :: Artwork
s@Artwork' {} Maybe Encryption
a -> Artwork
s {$sel:encryption:Artwork' :: Maybe Encryption
encryption = Maybe Encryption
a} :: Artwork)
artwork_maxWidth :: Lens.Lens' Artwork (Prelude.Maybe Prelude.Text)
artwork_maxWidth :: (Maybe Text -> f (Maybe Text)) -> Artwork -> f Artwork
artwork_maxWidth = (Artwork -> Maybe Text)
-> (Artwork -> Maybe Text -> Artwork)
-> Lens Artwork Artwork (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Artwork' {Maybe Text
maxWidth :: Maybe Text
$sel:maxWidth:Artwork' :: Artwork -> Maybe Text
maxWidth} -> Maybe Text
maxWidth) (\s :: Artwork
s@Artwork' {} Maybe Text
a -> Artwork
s {$sel:maxWidth:Artwork' :: Maybe Text
maxWidth = Maybe Text
a} :: Artwork)
instance Core.FromJSON Artwork where
parseJSON :: Value -> Parser Artwork
parseJSON =
String -> (Object -> Parser Artwork) -> Value -> Parser Artwork
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Artwork"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Encryption
-> Maybe Text
-> Artwork
Artwork'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Encryption
-> Maybe Text
-> Artwork)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Encryption
-> Maybe Text
-> Artwork)
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 Encryption
-> Maybe Text
-> Artwork)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Encryption
-> Maybe Text
-> Artwork)
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
"AlbumArtFormat")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Encryption
-> Maybe Text
-> Artwork)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Encryption -> Maybe Text -> Artwork)
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 Encryption -> Maybe Text -> Artwork)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Encryption -> Maybe Text -> Artwork)
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
"InputKey")
Parser (Maybe Text -> Maybe Encryption -> Maybe Text -> Artwork)
-> Parser (Maybe Text)
-> Parser (Maybe Encryption -> Maybe Text -> Artwork)
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 Encryption -> Maybe Text -> Artwork)
-> Parser (Maybe Encryption) -> Parser (Maybe Text -> Artwork)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Encryption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Encryption")
Parser (Maybe Text -> Artwork)
-> Parser (Maybe Text) -> Parser Artwork
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 Artwork
instance Prelude.NFData Artwork
instance Core.ToJSON Artwork where
toJSON :: Artwork -> Value
toJSON Artwork' {Maybe Text
Maybe Encryption
maxWidth :: Maybe Text
encryption :: Maybe Encryption
paddingPolicy :: Maybe Text
inputKey :: Maybe Text
maxHeight :: Maybe Text
albumArtFormat :: Maybe Text
sizingPolicy :: Maybe Text
$sel:maxWidth:Artwork' :: Artwork -> Maybe Text
$sel:encryption:Artwork' :: Artwork -> Maybe Encryption
$sel:paddingPolicy:Artwork' :: Artwork -> Maybe Text
$sel:inputKey:Artwork' :: Artwork -> Maybe Text
$sel:maxHeight:Artwork' :: Artwork -> Maybe Text
$sel:albumArtFormat:Artwork' :: Artwork -> Maybe Text
$sel:sizingPolicy:Artwork' :: Artwork -> 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
"AlbumArtFormat" 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
albumArtFormat,
(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
"InputKey" 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
inputKey,
(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
"Encryption" Text -> Encryption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Encryption -> Pair) -> Maybe Encryption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Encryption
encryption,
(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
]
)