{-# 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.Preset where
import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.Types.AudioParameters
import Amazonka.ElasticTranscoder.Types.Thumbnails
import Amazonka.ElasticTranscoder.Types.VideoParameters
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Preset = Preset'
{
Preset -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Preset -> Maybe VideoParameters
video :: Prelude.Maybe VideoParameters,
Preset -> Maybe Thumbnails
thumbnails :: Prelude.Maybe Thumbnails,
Preset -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Preset -> Maybe Text
container :: Prelude.Maybe Prelude.Text,
Preset -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Preset -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
Preset -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Preset -> Maybe AudioParameters
audio :: Prelude.Maybe AudioParameters
}
deriving (Preset -> Preset -> Bool
(Preset -> Preset -> Bool)
-> (Preset -> Preset -> Bool) -> Eq Preset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Preset -> Preset -> Bool
$c/= :: Preset -> Preset -> Bool
== :: Preset -> Preset -> Bool
$c== :: Preset -> Preset -> Bool
Prelude.Eq, ReadPrec [Preset]
ReadPrec Preset
Int -> ReadS Preset
ReadS [Preset]
(Int -> ReadS Preset)
-> ReadS [Preset]
-> ReadPrec Preset
-> ReadPrec [Preset]
-> Read Preset
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Preset]
$creadListPrec :: ReadPrec [Preset]
readPrec :: ReadPrec Preset
$creadPrec :: ReadPrec Preset
readList :: ReadS [Preset]
$creadList :: ReadS [Preset]
readsPrec :: Int -> ReadS Preset
$creadsPrec :: Int -> ReadS Preset
Prelude.Read, Int -> Preset -> ShowS
[Preset] -> ShowS
Preset -> String
(Int -> Preset -> ShowS)
-> (Preset -> String) -> ([Preset] -> ShowS) -> Show Preset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Preset] -> ShowS
$cshowList :: [Preset] -> ShowS
show :: Preset -> String
$cshow :: Preset -> String
showsPrec :: Int -> Preset -> ShowS
$cshowsPrec :: Int -> Preset -> ShowS
Prelude.Show, (forall x. Preset -> Rep Preset x)
-> (forall x. Rep Preset x -> Preset) -> Generic Preset
forall x. Rep Preset x -> Preset
forall x. Preset -> Rep Preset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Preset x -> Preset
$cfrom :: forall x. Preset -> Rep Preset x
Prelude.Generic)
newPreset ::
Preset
newPreset :: Preset
newPreset =
Preset' :: Maybe Text
-> Maybe VideoParameters
-> Maybe Thumbnails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset
Preset'
{ $sel:arn:Preset' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:video:Preset' :: Maybe VideoParameters
video = Maybe VideoParameters
forall a. Maybe a
Prelude.Nothing,
$sel:thumbnails:Preset' :: Maybe Thumbnails
thumbnails = Maybe Thumbnails
forall a. Maybe a
Prelude.Nothing,
$sel:name:Preset' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:container:Preset' :: Maybe Text
container = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:Preset' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':Preset' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Preset' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:audio:Preset' :: Maybe AudioParameters
audio = Maybe AudioParameters
forall a. Maybe a
Prelude.Nothing
}
preset_arn :: Lens.Lens' Preset (Prelude.Maybe Prelude.Text)
preset_arn :: (Maybe Text -> f (Maybe Text)) -> Preset -> f Preset
preset_arn = (Preset -> Maybe Text)
-> (Preset -> Maybe Text -> Preset)
-> Lens Preset Preset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Text
arn :: Maybe Text
$sel:arn:Preset' :: Preset -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Preset
s@Preset' {} Maybe Text
a -> Preset
s {$sel:arn:Preset' :: Maybe Text
arn = Maybe Text
a} :: Preset)
preset_video :: Lens.Lens' Preset (Prelude.Maybe VideoParameters)
preset_video :: (Maybe VideoParameters -> f (Maybe VideoParameters))
-> Preset -> f Preset
preset_video = (Preset -> Maybe VideoParameters)
-> (Preset -> Maybe VideoParameters -> Preset)
-> Lens
Preset Preset (Maybe VideoParameters) (Maybe VideoParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe VideoParameters
video :: Maybe VideoParameters
$sel:video:Preset' :: Preset -> Maybe VideoParameters
video} -> Maybe VideoParameters
video) (\s :: Preset
s@Preset' {} Maybe VideoParameters
a -> Preset
s {$sel:video:Preset' :: Maybe VideoParameters
video = Maybe VideoParameters
a} :: Preset)
preset_thumbnails :: Lens.Lens' Preset (Prelude.Maybe Thumbnails)
preset_thumbnails :: (Maybe Thumbnails -> f (Maybe Thumbnails)) -> Preset -> f Preset
preset_thumbnails = (Preset -> Maybe Thumbnails)
-> (Preset -> Maybe Thumbnails -> Preset)
-> Lens Preset Preset (Maybe Thumbnails) (Maybe Thumbnails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Thumbnails
thumbnails :: Maybe Thumbnails
$sel:thumbnails:Preset' :: Preset -> Maybe Thumbnails
thumbnails} -> Maybe Thumbnails
thumbnails) (\s :: Preset
s@Preset' {} Maybe Thumbnails
a -> Preset
s {$sel:thumbnails:Preset' :: Maybe Thumbnails
thumbnails = Maybe Thumbnails
a} :: Preset)
preset_name :: Lens.Lens' Preset (Prelude.Maybe Prelude.Text)
preset_name :: (Maybe Text -> f (Maybe Text)) -> Preset -> f Preset
preset_name = (Preset -> Maybe Text)
-> (Preset -> Maybe Text -> Preset)
-> Lens Preset Preset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Text
name :: Maybe Text
$sel:name:Preset' :: Preset -> Maybe Text
name} -> Maybe Text
name) (\s :: Preset
s@Preset' {} Maybe Text
a -> Preset
s {$sel:name:Preset' :: Maybe Text
name = Maybe Text
a} :: Preset)
preset_container :: Lens.Lens' Preset (Prelude.Maybe Prelude.Text)
preset_container :: (Maybe Text -> f (Maybe Text)) -> Preset -> f Preset
preset_container = (Preset -> Maybe Text)
-> (Preset -> Maybe Text -> Preset)
-> Lens Preset Preset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Text
container :: Maybe Text
$sel:container:Preset' :: Preset -> Maybe Text
container} -> Maybe Text
container) (\s :: Preset
s@Preset' {} Maybe Text
a -> Preset
s {$sel:container:Preset' :: Maybe Text
container = Maybe Text
a} :: Preset)
preset_id :: Lens.Lens' Preset (Prelude.Maybe Prelude.Text)
preset_id :: (Maybe Text -> f (Maybe Text)) -> Preset -> f Preset
preset_id = (Preset -> Maybe Text)
-> (Preset -> Maybe Text -> Preset)
-> Lens Preset Preset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Text
id :: Maybe Text
$sel:id:Preset' :: Preset -> Maybe Text
id} -> Maybe Text
id) (\s :: Preset
s@Preset' {} Maybe Text
a -> Preset
s {$sel:id:Preset' :: Maybe Text
id = Maybe Text
a} :: Preset)
preset_type :: Lens.Lens' Preset (Prelude.Maybe Prelude.Text)
preset_type :: (Maybe Text -> f (Maybe Text)) -> Preset -> f Preset
preset_type = (Preset -> Maybe Text)
-> (Preset -> Maybe Text -> Preset)
-> Lens Preset Preset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Text
type' :: Maybe Text
$sel:type':Preset' :: Preset -> Maybe Text
type'} -> Maybe Text
type') (\s :: Preset
s@Preset' {} Maybe Text
a -> Preset
s {$sel:type':Preset' :: Maybe Text
type' = Maybe Text
a} :: Preset)
preset_description :: Lens.Lens' Preset (Prelude.Maybe Prelude.Text)
preset_description :: (Maybe Text -> f (Maybe Text)) -> Preset -> f Preset
preset_description = (Preset -> Maybe Text)
-> (Preset -> Maybe Text -> Preset)
-> Lens Preset Preset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Text
description :: Maybe Text
$sel:description:Preset' :: Preset -> Maybe Text
description} -> Maybe Text
description) (\s :: Preset
s@Preset' {} Maybe Text
a -> Preset
s {$sel:description:Preset' :: Maybe Text
description = Maybe Text
a} :: Preset)
preset_audio :: Lens.Lens' Preset (Prelude.Maybe AudioParameters)
preset_audio :: (Maybe AudioParameters -> f (Maybe AudioParameters))
-> Preset -> f Preset
preset_audio = (Preset -> Maybe AudioParameters)
-> (Preset -> Maybe AudioParameters -> Preset)
-> Lens
Preset Preset (Maybe AudioParameters) (Maybe AudioParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe AudioParameters
audio :: Maybe AudioParameters
$sel:audio:Preset' :: Preset -> Maybe AudioParameters
audio} -> Maybe AudioParameters
audio) (\s :: Preset
s@Preset' {} Maybe AudioParameters
a -> Preset
s {$sel:audio:Preset' :: Maybe AudioParameters
audio = Maybe AudioParameters
a} :: Preset)
instance Core.FromJSON Preset where
parseJSON :: Value -> Parser Preset
parseJSON =
String -> (Object -> Parser Preset) -> Value -> Parser Preset
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Preset"
( \Object
x ->
Maybe Text
-> Maybe VideoParameters
-> Maybe Thumbnails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset
Preset'
(Maybe Text
-> Maybe VideoParameters
-> Maybe Thumbnails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset)
-> Parser (Maybe Text)
-> Parser
(Maybe VideoParameters
-> Maybe Thumbnails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset)
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
"Arn")
Parser
(Maybe VideoParameters
-> Maybe Thumbnails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset)
-> Parser (Maybe VideoParameters)
-> Parser
(Maybe Thumbnails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VideoParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Video")
Parser
(Maybe Thumbnails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset)
-> Parser (Maybe Thumbnails)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Thumbnails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Thumbnails")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset)
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
"Name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AudioParameters
-> Preset)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe AudioParameters -> Preset)
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
"Container")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe AudioParameters -> Preset)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe AudioParameters -> Preset)
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
"Id")
Parser
(Maybe Text -> Maybe Text -> Maybe AudioParameters -> Preset)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe AudioParameters -> Preset)
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
"Type")
Parser (Maybe Text -> Maybe AudioParameters -> Preset)
-> Parser (Maybe Text) -> Parser (Maybe AudioParameters -> Preset)
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
"Description")
Parser (Maybe AudioParameters -> Preset)
-> Parser (Maybe AudioParameters) -> Parser Preset
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AudioParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Audio")
)
instance Prelude.Hashable Preset
instance Prelude.NFData Preset