{-# 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.MediaConvert.Types.DolbyVision where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.DolbyVisionLevel6Metadata
import Amazonka.MediaConvert.Types.DolbyVisionLevel6Mode
import Amazonka.MediaConvert.Types.DolbyVisionMapping
import Amazonka.MediaConvert.Types.DolbyVisionProfile
import qualified Amazonka.Prelude as Prelude
data DolbyVision = DolbyVision'
{
DolbyVision -> Maybe DolbyVisionLevel6Metadata
l6Metadata :: Prelude.Maybe DolbyVisionLevel6Metadata,
DolbyVision -> Maybe DolbyVisionLevel6Mode
l6Mode :: Prelude.Maybe DolbyVisionLevel6Mode,
DolbyVision -> Maybe DolbyVisionMapping
mapping :: Prelude.Maybe DolbyVisionMapping,
DolbyVision -> Maybe DolbyVisionProfile
profile :: Prelude.Maybe DolbyVisionProfile
}
deriving (DolbyVision -> DolbyVision -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DolbyVision -> DolbyVision -> Bool
$c/= :: DolbyVision -> DolbyVision -> Bool
== :: DolbyVision -> DolbyVision -> Bool
$c== :: DolbyVision -> DolbyVision -> Bool
Prelude.Eq, ReadPrec [DolbyVision]
ReadPrec DolbyVision
Int -> ReadS DolbyVision
ReadS [DolbyVision]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DolbyVision]
$creadListPrec :: ReadPrec [DolbyVision]
readPrec :: ReadPrec DolbyVision
$creadPrec :: ReadPrec DolbyVision
readList :: ReadS [DolbyVision]
$creadList :: ReadS [DolbyVision]
readsPrec :: Int -> ReadS DolbyVision
$creadsPrec :: Int -> ReadS DolbyVision
Prelude.Read, Int -> DolbyVision -> ShowS
[DolbyVision] -> ShowS
DolbyVision -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DolbyVision] -> ShowS
$cshowList :: [DolbyVision] -> ShowS
show :: DolbyVision -> String
$cshow :: DolbyVision -> String
showsPrec :: Int -> DolbyVision -> ShowS
$cshowsPrec :: Int -> DolbyVision -> ShowS
Prelude.Show, forall x. Rep DolbyVision x -> DolbyVision
forall x. DolbyVision -> Rep DolbyVision x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DolbyVision x -> DolbyVision
$cfrom :: forall x. DolbyVision -> Rep DolbyVision x
Prelude.Generic)
newDolbyVision ::
DolbyVision
newDolbyVision :: DolbyVision
newDolbyVision =
DolbyVision'
{ $sel:l6Metadata:DolbyVision' :: Maybe DolbyVisionLevel6Metadata
l6Metadata = forall a. Maybe a
Prelude.Nothing,
$sel:l6Mode:DolbyVision' :: Maybe DolbyVisionLevel6Mode
l6Mode = forall a. Maybe a
Prelude.Nothing,
$sel:mapping:DolbyVision' :: Maybe DolbyVisionMapping
mapping = forall a. Maybe a
Prelude.Nothing,
$sel:profile:DolbyVision' :: Maybe DolbyVisionProfile
profile = forall a. Maybe a
Prelude.Nothing
}
dolbyVision_l6Metadata :: Lens.Lens' DolbyVision (Prelude.Maybe DolbyVisionLevel6Metadata)
dolbyVision_l6Metadata :: Lens' DolbyVision (Maybe DolbyVisionLevel6Metadata)
dolbyVision_l6Metadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DolbyVision' {Maybe DolbyVisionLevel6Metadata
l6Metadata :: Maybe DolbyVisionLevel6Metadata
$sel:l6Metadata:DolbyVision' :: DolbyVision -> Maybe DolbyVisionLevel6Metadata
l6Metadata} -> Maybe DolbyVisionLevel6Metadata
l6Metadata) (\s :: DolbyVision
s@DolbyVision' {} Maybe DolbyVisionLevel6Metadata
a -> DolbyVision
s {$sel:l6Metadata:DolbyVision' :: Maybe DolbyVisionLevel6Metadata
l6Metadata = Maybe DolbyVisionLevel6Metadata
a} :: DolbyVision)
dolbyVision_l6Mode :: Lens.Lens' DolbyVision (Prelude.Maybe DolbyVisionLevel6Mode)
dolbyVision_l6Mode :: Lens' DolbyVision (Maybe DolbyVisionLevel6Mode)
dolbyVision_l6Mode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DolbyVision' {Maybe DolbyVisionLevel6Mode
l6Mode :: Maybe DolbyVisionLevel6Mode
$sel:l6Mode:DolbyVision' :: DolbyVision -> Maybe DolbyVisionLevel6Mode
l6Mode} -> Maybe DolbyVisionLevel6Mode
l6Mode) (\s :: DolbyVision
s@DolbyVision' {} Maybe DolbyVisionLevel6Mode
a -> DolbyVision
s {$sel:l6Mode:DolbyVision' :: Maybe DolbyVisionLevel6Mode
l6Mode = Maybe DolbyVisionLevel6Mode
a} :: DolbyVision)
dolbyVision_mapping :: Lens.Lens' DolbyVision (Prelude.Maybe DolbyVisionMapping)
dolbyVision_mapping :: Lens' DolbyVision (Maybe DolbyVisionMapping)
dolbyVision_mapping = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DolbyVision' {Maybe DolbyVisionMapping
mapping :: Maybe DolbyVisionMapping
$sel:mapping:DolbyVision' :: DolbyVision -> Maybe DolbyVisionMapping
mapping} -> Maybe DolbyVisionMapping
mapping) (\s :: DolbyVision
s@DolbyVision' {} Maybe DolbyVisionMapping
a -> DolbyVision
s {$sel:mapping:DolbyVision' :: Maybe DolbyVisionMapping
mapping = Maybe DolbyVisionMapping
a} :: DolbyVision)
dolbyVision_profile :: Lens.Lens' DolbyVision (Prelude.Maybe DolbyVisionProfile)
dolbyVision_profile :: Lens' DolbyVision (Maybe DolbyVisionProfile)
dolbyVision_profile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DolbyVision' {Maybe DolbyVisionProfile
profile :: Maybe DolbyVisionProfile
$sel:profile:DolbyVision' :: DolbyVision -> Maybe DolbyVisionProfile
profile} -> Maybe DolbyVisionProfile
profile) (\s :: DolbyVision
s@DolbyVision' {} Maybe DolbyVisionProfile
a -> DolbyVision
s {$sel:profile:DolbyVision' :: Maybe DolbyVisionProfile
profile = Maybe DolbyVisionProfile
a} :: DolbyVision)
instance Data.FromJSON DolbyVision where
parseJSON :: Value -> Parser DolbyVision
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DolbyVision"
( \Object
x ->
Maybe DolbyVisionLevel6Metadata
-> Maybe DolbyVisionLevel6Mode
-> Maybe DolbyVisionMapping
-> Maybe DolbyVisionProfile
-> DolbyVision
DolbyVision'
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
"l6Metadata")
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
"l6Mode")
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
"mapping")
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
"profile")
)
instance Prelude.Hashable DolbyVision where
hashWithSalt :: Int -> DolbyVision -> Int
hashWithSalt Int
_salt DolbyVision' {Maybe DolbyVisionLevel6Metadata
Maybe DolbyVisionLevel6Mode
Maybe DolbyVisionMapping
Maybe DolbyVisionProfile
profile :: Maybe DolbyVisionProfile
mapping :: Maybe DolbyVisionMapping
l6Mode :: Maybe DolbyVisionLevel6Mode
l6Metadata :: Maybe DolbyVisionLevel6Metadata
$sel:profile:DolbyVision' :: DolbyVision -> Maybe DolbyVisionProfile
$sel:mapping:DolbyVision' :: DolbyVision -> Maybe DolbyVisionMapping
$sel:l6Mode:DolbyVision' :: DolbyVision -> Maybe DolbyVisionLevel6Mode
$sel:l6Metadata:DolbyVision' :: DolbyVision -> Maybe DolbyVisionLevel6Metadata
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DolbyVisionLevel6Metadata
l6Metadata
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DolbyVisionLevel6Mode
l6Mode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DolbyVisionMapping
mapping
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DolbyVisionProfile
profile
instance Prelude.NFData DolbyVision where
rnf :: DolbyVision -> ()
rnf DolbyVision' {Maybe DolbyVisionLevel6Metadata
Maybe DolbyVisionLevel6Mode
Maybe DolbyVisionMapping
Maybe DolbyVisionProfile
profile :: Maybe DolbyVisionProfile
mapping :: Maybe DolbyVisionMapping
l6Mode :: Maybe DolbyVisionLevel6Mode
l6Metadata :: Maybe DolbyVisionLevel6Metadata
$sel:profile:DolbyVision' :: DolbyVision -> Maybe DolbyVisionProfile
$sel:mapping:DolbyVision' :: DolbyVision -> Maybe DolbyVisionMapping
$sel:l6Mode:DolbyVision' :: DolbyVision -> Maybe DolbyVisionLevel6Mode
$sel:l6Metadata:DolbyVision' :: DolbyVision -> Maybe DolbyVisionLevel6Metadata
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DolbyVisionLevel6Metadata
l6Metadata
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DolbyVisionLevel6Mode
l6Mode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DolbyVisionMapping
mapping
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DolbyVisionProfile
profile
instance Data.ToJSON DolbyVision where
toJSON :: DolbyVision -> Value
toJSON DolbyVision' {Maybe DolbyVisionLevel6Metadata
Maybe DolbyVisionLevel6Mode
Maybe DolbyVisionMapping
Maybe DolbyVisionProfile
profile :: Maybe DolbyVisionProfile
mapping :: Maybe DolbyVisionMapping
l6Mode :: Maybe DolbyVisionLevel6Mode
l6Metadata :: Maybe DolbyVisionLevel6Metadata
$sel:profile:DolbyVision' :: DolbyVision -> Maybe DolbyVisionProfile
$sel:mapping:DolbyVision' :: DolbyVision -> Maybe DolbyVisionMapping
$sel:l6Mode:DolbyVision' :: DolbyVision -> Maybe DolbyVisionLevel6Mode
$sel:l6Metadata:DolbyVision' :: DolbyVision -> Maybe DolbyVisionLevel6Metadata
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"l6Metadata" 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 DolbyVisionLevel6Metadata
l6Metadata,
(Key
"l6Mode" 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 DolbyVisionLevel6Mode
l6Mode,
(Key
"mapping" 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 DolbyVisionMapping
mapping,
(Key
"profile" 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 DolbyVisionProfile
profile
]
)