{-# 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.Ac3Settings 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.Ac3BitstreamMode
import Amazonka.MediaLive.Types.Ac3CodingMode
import Amazonka.MediaLive.Types.Ac3DrcProfile
import Amazonka.MediaLive.Types.Ac3LfeFilter
import Amazonka.MediaLive.Types.Ac3MetadataControl
import qualified Amazonka.Prelude as Prelude
data Ac3Settings = Ac3Settings'
{
Ac3Settings -> Maybe Double
bitrate :: Prelude.Maybe Prelude.Double,
Ac3Settings -> Maybe Ac3BitstreamMode
bitstreamMode :: Prelude.Maybe Ac3BitstreamMode,
Ac3Settings -> Maybe Ac3CodingMode
codingMode :: Prelude.Maybe Ac3CodingMode,
Ac3Settings -> Maybe Natural
dialnorm :: Prelude.Maybe Prelude.Natural,
Ac3Settings -> Maybe Ac3DrcProfile
drcProfile :: Prelude.Maybe Ac3DrcProfile,
Ac3Settings -> Maybe Ac3LfeFilter
lfeFilter :: Prelude.Maybe Ac3LfeFilter,
Ac3Settings -> Maybe Ac3MetadataControl
metadataControl :: Prelude.Maybe Ac3MetadataControl
}
deriving (Ac3Settings -> Ac3Settings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Ac3Settings -> Ac3Settings -> Bool
$c/= :: Ac3Settings -> Ac3Settings -> Bool
== :: Ac3Settings -> Ac3Settings -> Bool
$c== :: Ac3Settings -> Ac3Settings -> Bool
Prelude.Eq, ReadPrec [Ac3Settings]
ReadPrec Ac3Settings
Int -> ReadS Ac3Settings
ReadS [Ac3Settings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Ac3Settings]
$creadListPrec :: ReadPrec [Ac3Settings]
readPrec :: ReadPrec Ac3Settings
$creadPrec :: ReadPrec Ac3Settings
readList :: ReadS [Ac3Settings]
$creadList :: ReadS [Ac3Settings]
readsPrec :: Int -> ReadS Ac3Settings
$creadsPrec :: Int -> ReadS Ac3Settings
Prelude.Read, Int -> Ac3Settings -> ShowS
[Ac3Settings] -> ShowS
Ac3Settings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Ac3Settings] -> ShowS
$cshowList :: [Ac3Settings] -> ShowS
show :: Ac3Settings -> String
$cshow :: Ac3Settings -> String
showsPrec :: Int -> Ac3Settings -> ShowS
$cshowsPrec :: Int -> Ac3Settings -> ShowS
Prelude.Show, forall x. Rep Ac3Settings x -> Ac3Settings
forall x. Ac3Settings -> Rep Ac3Settings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Ac3Settings x -> Ac3Settings
$cfrom :: forall x. Ac3Settings -> Rep Ac3Settings x
Prelude.Generic)
newAc3Settings ::
Ac3Settings
newAc3Settings :: Ac3Settings
newAc3Settings =
Ac3Settings'
{ $sel:bitrate:Ac3Settings' :: Maybe Double
bitrate = forall a. Maybe a
Prelude.Nothing,
$sel:bitstreamMode:Ac3Settings' :: Maybe Ac3BitstreamMode
bitstreamMode = forall a. Maybe a
Prelude.Nothing,
$sel:codingMode:Ac3Settings' :: Maybe Ac3CodingMode
codingMode = forall a. Maybe a
Prelude.Nothing,
$sel:dialnorm:Ac3Settings' :: Maybe Natural
dialnorm = forall a. Maybe a
Prelude.Nothing,
$sel:drcProfile:Ac3Settings' :: Maybe Ac3DrcProfile
drcProfile = forall a. Maybe a
Prelude.Nothing,
$sel:lfeFilter:Ac3Settings' :: Maybe Ac3LfeFilter
lfeFilter = forall a. Maybe a
Prelude.Nothing,
$sel:metadataControl:Ac3Settings' :: Maybe Ac3MetadataControl
metadataControl = forall a. Maybe a
Prelude.Nothing
}
ac3Settings_bitrate :: Lens.Lens' Ac3Settings (Prelude.Maybe Prelude.Double)
ac3Settings_bitrate :: Lens' Ac3Settings (Maybe Double)
ac3Settings_bitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Double
bitrate :: Maybe Double
$sel:bitrate:Ac3Settings' :: Ac3Settings -> Maybe Double
bitrate} -> Maybe Double
bitrate) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Double
a -> Ac3Settings
s {$sel:bitrate:Ac3Settings' :: Maybe Double
bitrate = Maybe Double
a} :: Ac3Settings)
ac3Settings_bitstreamMode :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3BitstreamMode)
ac3Settings_bitstreamMode :: Lens' Ac3Settings (Maybe Ac3BitstreamMode)
ac3Settings_bitstreamMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3BitstreamMode
bitstreamMode :: Maybe Ac3BitstreamMode
$sel:bitstreamMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3BitstreamMode
bitstreamMode} -> Maybe Ac3BitstreamMode
bitstreamMode) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3BitstreamMode
a -> Ac3Settings
s {$sel:bitstreamMode:Ac3Settings' :: Maybe Ac3BitstreamMode
bitstreamMode = Maybe Ac3BitstreamMode
a} :: Ac3Settings)
ac3Settings_codingMode :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3CodingMode)
ac3Settings_codingMode :: Lens' Ac3Settings (Maybe Ac3CodingMode)
ac3Settings_codingMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3CodingMode
codingMode :: Maybe Ac3CodingMode
$sel:codingMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3CodingMode
codingMode} -> Maybe Ac3CodingMode
codingMode) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3CodingMode
a -> Ac3Settings
s {$sel:codingMode:Ac3Settings' :: Maybe Ac3CodingMode
codingMode = Maybe Ac3CodingMode
a} :: Ac3Settings)
ac3Settings_dialnorm :: Lens.Lens' Ac3Settings (Prelude.Maybe Prelude.Natural)
ac3Settings_dialnorm :: Lens' Ac3Settings (Maybe Natural)
ac3Settings_dialnorm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Natural
dialnorm :: Maybe Natural
$sel:dialnorm:Ac3Settings' :: Ac3Settings -> Maybe Natural
dialnorm} -> Maybe Natural
dialnorm) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Natural
a -> Ac3Settings
s {$sel:dialnorm:Ac3Settings' :: Maybe Natural
dialnorm = Maybe Natural
a} :: Ac3Settings)
ac3Settings_drcProfile :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3DrcProfile)
ac3Settings_drcProfile :: Lens' Ac3Settings (Maybe Ac3DrcProfile)
ac3Settings_drcProfile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3DrcProfile
drcProfile :: Maybe Ac3DrcProfile
$sel:drcProfile:Ac3Settings' :: Ac3Settings -> Maybe Ac3DrcProfile
drcProfile} -> Maybe Ac3DrcProfile
drcProfile) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3DrcProfile
a -> Ac3Settings
s {$sel:drcProfile:Ac3Settings' :: Maybe Ac3DrcProfile
drcProfile = Maybe Ac3DrcProfile
a} :: Ac3Settings)
ac3Settings_lfeFilter :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3LfeFilter)
ac3Settings_lfeFilter :: Lens' Ac3Settings (Maybe Ac3LfeFilter)
ac3Settings_lfeFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3LfeFilter
lfeFilter :: Maybe Ac3LfeFilter
$sel:lfeFilter:Ac3Settings' :: Ac3Settings -> Maybe Ac3LfeFilter
lfeFilter} -> Maybe Ac3LfeFilter
lfeFilter) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3LfeFilter
a -> Ac3Settings
s {$sel:lfeFilter:Ac3Settings' :: Maybe Ac3LfeFilter
lfeFilter = Maybe Ac3LfeFilter
a} :: Ac3Settings)
ac3Settings_metadataControl :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3MetadataControl)
ac3Settings_metadataControl :: Lens' Ac3Settings (Maybe Ac3MetadataControl)
ac3Settings_metadataControl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3MetadataControl
metadataControl :: Maybe Ac3MetadataControl
$sel:metadataControl:Ac3Settings' :: Ac3Settings -> Maybe Ac3MetadataControl
metadataControl} -> Maybe Ac3MetadataControl
metadataControl) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3MetadataControl
a -> Ac3Settings
s {$sel:metadataControl:Ac3Settings' :: Maybe Ac3MetadataControl
metadataControl = Maybe Ac3MetadataControl
a} :: Ac3Settings)
instance Data.FromJSON Ac3Settings where
parseJSON :: Value -> Parser Ac3Settings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Ac3Settings"
( \Object
x ->
Maybe Double
-> Maybe Ac3BitstreamMode
-> Maybe Ac3CodingMode
-> Maybe Natural
-> Maybe Ac3DrcProfile
-> Maybe Ac3LfeFilter
-> Maybe Ac3MetadataControl
-> Ac3Settings
Ac3Settings'
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
"bitrate")
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
"bitstreamMode")
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
"codingMode")
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
"dialnorm")
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
"drcProfile")
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
"lfeFilter")
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
"metadataControl")
)
instance Prelude.Hashable Ac3Settings where
hashWithSalt :: Int -> Ac3Settings -> Int
hashWithSalt Int
_salt Ac3Settings' {Maybe Double
Maybe Natural
Maybe Ac3BitstreamMode
Maybe Ac3CodingMode
Maybe Ac3DrcProfile
Maybe Ac3LfeFilter
Maybe Ac3MetadataControl
metadataControl :: Maybe Ac3MetadataControl
lfeFilter :: Maybe Ac3LfeFilter
drcProfile :: Maybe Ac3DrcProfile
dialnorm :: Maybe Natural
codingMode :: Maybe Ac3CodingMode
bitstreamMode :: Maybe Ac3BitstreamMode
bitrate :: Maybe Double
$sel:metadataControl:Ac3Settings' :: Ac3Settings -> Maybe Ac3MetadataControl
$sel:lfeFilter:Ac3Settings' :: Ac3Settings -> Maybe Ac3LfeFilter
$sel:drcProfile:Ac3Settings' :: Ac3Settings -> Maybe Ac3DrcProfile
$sel:dialnorm:Ac3Settings' :: Ac3Settings -> Maybe Natural
$sel:codingMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3CodingMode
$sel:bitstreamMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3BitstreamMode
$sel:bitrate:Ac3Settings' :: Ac3Settings -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
bitrate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Ac3BitstreamMode
bitstreamMode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Ac3CodingMode
codingMode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
dialnorm
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Ac3DrcProfile
drcProfile
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Ac3LfeFilter
lfeFilter
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Ac3MetadataControl
metadataControl
instance Prelude.NFData Ac3Settings where
rnf :: Ac3Settings -> ()
rnf Ac3Settings' {Maybe Double
Maybe Natural
Maybe Ac3BitstreamMode
Maybe Ac3CodingMode
Maybe Ac3DrcProfile
Maybe Ac3LfeFilter
Maybe Ac3MetadataControl
metadataControl :: Maybe Ac3MetadataControl
lfeFilter :: Maybe Ac3LfeFilter
drcProfile :: Maybe Ac3DrcProfile
dialnorm :: Maybe Natural
codingMode :: Maybe Ac3CodingMode
bitstreamMode :: Maybe Ac3BitstreamMode
bitrate :: Maybe Double
$sel:metadataControl:Ac3Settings' :: Ac3Settings -> Maybe Ac3MetadataControl
$sel:lfeFilter:Ac3Settings' :: Ac3Settings -> Maybe Ac3LfeFilter
$sel:drcProfile:Ac3Settings' :: Ac3Settings -> Maybe Ac3DrcProfile
$sel:dialnorm:Ac3Settings' :: Ac3Settings -> Maybe Natural
$sel:codingMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3CodingMode
$sel:bitstreamMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3BitstreamMode
$sel:bitrate:Ac3Settings' :: Ac3Settings -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
bitrate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Ac3BitstreamMode
bitstreamMode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Ac3CodingMode
codingMode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
dialnorm
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Ac3DrcProfile
drcProfile
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Ac3LfeFilter
lfeFilter
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Ac3MetadataControl
metadataControl
instance Data.ToJSON Ac3Settings where
toJSON :: Ac3Settings -> Value
toJSON Ac3Settings' {Maybe Double
Maybe Natural
Maybe Ac3BitstreamMode
Maybe Ac3CodingMode
Maybe Ac3DrcProfile
Maybe Ac3LfeFilter
Maybe Ac3MetadataControl
metadataControl :: Maybe Ac3MetadataControl
lfeFilter :: Maybe Ac3LfeFilter
drcProfile :: Maybe Ac3DrcProfile
dialnorm :: Maybe Natural
codingMode :: Maybe Ac3CodingMode
bitstreamMode :: Maybe Ac3BitstreamMode
bitrate :: Maybe Double
$sel:metadataControl:Ac3Settings' :: Ac3Settings -> Maybe Ac3MetadataControl
$sel:lfeFilter:Ac3Settings' :: Ac3Settings -> Maybe Ac3LfeFilter
$sel:drcProfile:Ac3Settings' :: Ac3Settings -> Maybe Ac3DrcProfile
$sel:dialnorm:Ac3Settings' :: Ac3Settings -> Maybe Natural
$sel:codingMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3CodingMode
$sel:bitstreamMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3BitstreamMode
$sel:bitrate:Ac3Settings' :: Ac3Settings -> Maybe Double
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"bitrate" 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 Double
bitrate,
(Key
"bitstreamMode" 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 Ac3BitstreamMode
bitstreamMode,
(Key
"codingMode" 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 Ac3CodingMode
codingMode,
(Key
"dialnorm" 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 Natural
dialnorm,
(Key
"drcProfile" 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 Ac3DrcProfile
drcProfile,
(Key
"lfeFilter" 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 Ac3LfeFilter
lfeFilter,
(Key
"metadataControl" 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 Ac3MetadataControl
metadataControl
]
)