{-# 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.MediaLive.Types.AudioDolbyEDecode where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.DolbyEProgramSelection
import qualified Amazonka.Prelude as Prelude
data AudioDolbyEDecode = AudioDolbyEDecode'
{
AudioDolbyEDecode -> DolbyEProgramSelection
programSelection :: DolbyEProgramSelection
}
deriving (AudioDolbyEDecode -> AudioDolbyEDecode -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioDolbyEDecode -> AudioDolbyEDecode -> Bool
$c/= :: AudioDolbyEDecode -> AudioDolbyEDecode -> Bool
== :: AudioDolbyEDecode -> AudioDolbyEDecode -> Bool
$c== :: AudioDolbyEDecode -> AudioDolbyEDecode -> Bool
Prelude.Eq, ReadPrec [AudioDolbyEDecode]
ReadPrec AudioDolbyEDecode
Int -> ReadS AudioDolbyEDecode
ReadS [AudioDolbyEDecode]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AudioDolbyEDecode]
$creadListPrec :: ReadPrec [AudioDolbyEDecode]
readPrec :: ReadPrec AudioDolbyEDecode
$creadPrec :: ReadPrec AudioDolbyEDecode
readList :: ReadS [AudioDolbyEDecode]
$creadList :: ReadS [AudioDolbyEDecode]
readsPrec :: Int -> ReadS AudioDolbyEDecode
$creadsPrec :: Int -> ReadS AudioDolbyEDecode
Prelude.Read, Int -> AudioDolbyEDecode -> ShowS
[AudioDolbyEDecode] -> ShowS
AudioDolbyEDecode -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AudioDolbyEDecode] -> ShowS
$cshowList :: [AudioDolbyEDecode] -> ShowS
show :: AudioDolbyEDecode -> String
$cshow :: AudioDolbyEDecode -> String
showsPrec :: Int -> AudioDolbyEDecode -> ShowS
$cshowsPrec :: Int -> AudioDolbyEDecode -> ShowS
Prelude.Show, forall x. Rep AudioDolbyEDecode x -> AudioDolbyEDecode
forall x. AudioDolbyEDecode -> Rep AudioDolbyEDecode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AudioDolbyEDecode x -> AudioDolbyEDecode
$cfrom :: forall x. AudioDolbyEDecode -> Rep AudioDolbyEDecode x
Prelude.Generic)
newAudioDolbyEDecode ::
DolbyEProgramSelection ->
AudioDolbyEDecode
newAudioDolbyEDecode :: DolbyEProgramSelection -> AudioDolbyEDecode
newAudioDolbyEDecode DolbyEProgramSelection
pProgramSelection_ =
AudioDolbyEDecode'
{ $sel:programSelection:AudioDolbyEDecode' :: DolbyEProgramSelection
programSelection =
DolbyEProgramSelection
pProgramSelection_
}
audioDolbyEDecode_programSelection :: Lens.Lens' AudioDolbyEDecode DolbyEProgramSelection
audioDolbyEDecode_programSelection :: Lens' AudioDolbyEDecode DolbyEProgramSelection
audioDolbyEDecode_programSelection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDolbyEDecode' {DolbyEProgramSelection
programSelection :: DolbyEProgramSelection
$sel:programSelection:AudioDolbyEDecode' :: AudioDolbyEDecode -> DolbyEProgramSelection
programSelection} -> DolbyEProgramSelection
programSelection) (\s :: AudioDolbyEDecode
s@AudioDolbyEDecode' {} DolbyEProgramSelection
a -> AudioDolbyEDecode
s {$sel:programSelection:AudioDolbyEDecode' :: DolbyEProgramSelection
programSelection = DolbyEProgramSelection
a} :: AudioDolbyEDecode)
instance Data.FromJSON AudioDolbyEDecode where
parseJSON :: Value -> Parser AudioDolbyEDecode
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AudioDolbyEDecode"
( \Object
x ->
DolbyEProgramSelection -> AudioDolbyEDecode
AudioDolbyEDecode'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"programSelection")
)
instance Prelude.Hashable AudioDolbyEDecode where
hashWithSalt :: Int -> AudioDolbyEDecode -> Int
hashWithSalt Int
_salt AudioDolbyEDecode' {DolbyEProgramSelection
programSelection :: DolbyEProgramSelection
$sel:programSelection:AudioDolbyEDecode' :: AudioDolbyEDecode -> DolbyEProgramSelection
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DolbyEProgramSelection
programSelection
instance Prelude.NFData AudioDolbyEDecode where
rnf :: AudioDolbyEDecode -> ()
rnf AudioDolbyEDecode' {DolbyEProgramSelection
programSelection :: DolbyEProgramSelection
$sel:programSelection:AudioDolbyEDecode' :: AudioDolbyEDecode -> DolbyEProgramSelection
..} =
forall a. NFData a => a -> ()
Prelude.rnf DolbyEProgramSelection
programSelection
instance Data.ToJSON AudioDolbyEDecode where
toJSON :: AudioDolbyEDecode -> Value
toJSON AudioDolbyEDecode' {DolbyEProgramSelection
programSelection :: DolbyEProgramSelection
$sel:programSelection:AudioDolbyEDecode' :: AudioDolbyEDecode -> DolbyEProgramSelection
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"programSelection" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DolbyEProgramSelection
programSelection)
]
)