{-# 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.AudioCodecSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.AacSettings
import Amazonka.MediaConvert.Types.Ac3Settings
import Amazonka.MediaConvert.Types.AiffSettings
import Amazonka.MediaConvert.Types.AudioCodec
import Amazonka.MediaConvert.Types.Eac3AtmosSettings
import Amazonka.MediaConvert.Types.Eac3Settings
import Amazonka.MediaConvert.Types.Mp2Settings
import Amazonka.MediaConvert.Types.Mp3Settings
import Amazonka.MediaConvert.Types.OpusSettings
import Amazonka.MediaConvert.Types.VorbisSettings
import Amazonka.MediaConvert.Types.WavSettings
import qualified Amazonka.Prelude as Prelude
data AudioCodecSettings = AudioCodecSettings'
{
AudioCodecSettings -> Maybe AiffSettings
aiffSettings :: Prelude.Maybe AiffSettings,
AudioCodecSettings -> Maybe AudioCodec
codec :: Prelude.Maybe AudioCodec,
AudioCodecSettings -> Maybe Ac3Settings
ac3Settings :: Prelude.Maybe Ac3Settings,
AudioCodecSettings -> Maybe OpusSettings
opusSettings :: Prelude.Maybe OpusSettings,
AudioCodecSettings -> Maybe Mp2Settings
mp2Settings :: Prelude.Maybe Mp2Settings,
AudioCodecSettings -> Maybe WavSettings
wavSettings :: Prelude.Maybe WavSettings,
AudioCodecSettings -> Maybe Eac3AtmosSettings
eac3AtmosSettings :: Prelude.Maybe Eac3AtmosSettings,
AudioCodecSettings -> Maybe Mp3Settings
mp3Settings :: Prelude.Maybe Mp3Settings,
AudioCodecSettings -> Maybe VorbisSettings
vorbisSettings :: Prelude.Maybe VorbisSettings,
AudioCodecSettings -> Maybe AacSettings
aacSettings :: Prelude.Maybe AacSettings,
AudioCodecSettings -> Maybe Eac3Settings
eac3Settings :: Prelude.Maybe Eac3Settings
}
deriving (AudioCodecSettings -> AudioCodecSettings -> Bool
(AudioCodecSettings -> AudioCodecSettings -> Bool)
-> (AudioCodecSettings -> AudioCodecSettings -> Bool)
-> Eq AudioCodecSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioCodecSettings -> AudioCodecSettings -> Bool
$c/= :: AudioCodecSettings -> AudioCodecSettings -> Bool
== :: AudioCodecSettings -> AudioCodecSettings -> Bool
$c== :: AudioCodecSettings -> AudioCodecSettings -> Bool
Prelude.Eq, ReadPrec [AudioCodecSettings]
ReadPrec AudioCodecSettings
Int -> ReadS AudioCodecSettings
ReadS [AudioCodecSettings]
(Int -> ReadS AudioCodecSettings)
-> ReadS [AudioCodecSettings]
-> ReadPrec AudioCodecSettings
-> ReadPrec [AudioCodecSettings]
-> Read AudioCodecSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AudioCodecSettings]
$creadListPrec :: ReadPrec [AudioCodecSettings]
readPrec :: ReadPrec AudioCodecSettings
$creadPrec :: ReadPrec AudioCodecSettings
readList :: ReadS [AudioCodecSettings]
$creadList :: ReadS [AudioCodecSettings]
readsPrec :: Int -> ReadS AudioCodecSettings
$creadsPrec :: Int -> ReadS AudioCodecSettings
Prelude.Read, Int -> AudioCodecSettings -> ShowS
[AudioCodecSettings] -> ShowS
AudioCodecSettings -> String
(Int -> AudioCodecSettings -> ShowS)
-> (AudioCodecSettings -> String)
-> ([AudioCodecSettings] -> ShowS)
-> Show AudioCodecSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AudioCodecSettings] -> ShowS
$cshowList :: [AudioCodecSettings] -> ShowS
show :: AudioCodecSettings -> String
$cshow :: AudioCodecSettings -> String
showsPrec :: Int -> AudioCodecSettings -> ShowS
$cshowsPrec :: Int -> AudioCodecSettings -> ShowS
Prelude.Show, (forall x. AudioCodecSettings -> Rep AudioCodecSettings x)
-> (forall x. Rep AudioCodecSettings x -> AudioCodecSettings)
-> Generic AudioCodecSettings
forall x. Rep AudioCodecSettings x -> AudioCodecSettings
forall x. AudioCodecSettings -> Rep AudioCodecSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AudioCodecSettings x -> AudioCodecSettings
$cfrom :: forall x. AudioCodecSettings -> Rep AudioCodecSettings x
Prelude.Generic)
newAudioCodecSettings ::
AudioCodecSettings
newAudioCodecSettings :: AudioCodecSettings
newAudioCodecSettings =
AudioCodecSettings' :: Maybe AiffSettings
-> Maybe AudioCodec
-> Maybe Ac3Settings
-> Maybe OpusSettings
-> Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings
AudioCodecSettings'
{ $sel:aiffSettings:AudioCodecSettings' :: Maybe AiffSettings
aiffSettings = Maybe AiffSettings
forall a. Maybe a
Prelude.Nothing,
$sel:codec:AudioCodecSettings' :: Maybe AudioCodec
codec = Maybe AudioCodec
forall a. Maybe a
Prelude.Nothing,
$sel:ac3Settings:AudioCodecSettings' :: Maybe Ac3Settings
ac3Settings = Maybe Ac3Settings
forall a. Maybe a
Prelude.Nothing,
$sel:opusSettings:AudioCodecSettings' :: Maybe OpusSettings
opusSettings = Maybe OpusSettings
forall a. Maybe a
Prelude.Nothing,
$sel:mp2Settings:AudioCodecSettings' :: Maybe Mp2Settings
mp2Settings = Maybe Mp2Settings
forall a. Maybe a
Prelude.Nothing,
$sel:wavSettings:AudioCodecSettings' :: Maybe WavSettings
wavSettings = Maybe WavSettings
forall a. Maybe a
Prelude.Nothing,
$sel:eac3AtmosSettings:AudioCodecSettings' :: Maybe Eac3AtmosSettings
eac3AtmosSettings = Maybe Eac3AtmosSettings
forall a. Maybe a
Prelude.Nothing,
$sel:mp3Settings:AudioCodecSettings' :: Maybe Mp3Settings
mp3Settings = Maybe Mp3Settings
forall a. Maybe a
Prelude.Nothing,
$sel:vorbisSettings:AudioCodecSettings' :: Maybe VorbisSettings
vorbisSettings = Maybe VorbisSettings
forall a. Maybe a
Prelude.Nothing,
$sel:aacSettings:AudioCodecSettings' :: Maybe AacSettings
aacSettings = Maybe AacSettings
forall a. Maybe a
Prelude.Nothing,
$sel:eac3Settings:AudioCodecSettings' :: Maybe Eac3Settings
eac3Settings = Maybe Eac3Settings
forall a. Maybe a
Prelude.Nothing
}
audioCodecSettings_aiffSettings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe AiffSettings)
audioCodecSettings_aiffSettings :: (Maybe AiffSettings -> f (Maybe AiffSettings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_aiffSettings = (AudioCodecSettings -> Maybe AiffSettings)
-> (AudioCodecSettings -> Maybe AiffSettings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe AiffSettings)
(Maybe AiffSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe AiffSettings
aiffSettings :: Maybe AiffSettings
$sel:aiffSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe AiffSettings
aiffSettings} -> Maybe AiffSettings
aiffSettings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe AiffSettings
a -> AudioCodecSettings
s {$sel:aiffSettings:AudioCodecSettings' :: Maybe AiffSettings
aiffSettings = Maybe AiffSettings
a} :: AudioCodecSettings)
audioCodecSettings_codec :: Lens.Lens' AudioCodecSettings (Prelude.Maybe AudioCodec)
audioCodecSettings_codec :: (Maybe AudioCodec -> f (Maybe AudioCodec))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_codec = (AudioCodecSettings -> Maybe AudioCodec)
-> (AudioCodecSettings -> Maybe AudioCodec -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe AudioCodec)
(Maybe AudioCodec)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe AudioCodec
codec :: Maybe AudioCodec
$sel:codec:AudioCodecSettings' :: AudioCodecSettings -> Maybe AudioCodec
codec} -> Maybe AudioCodec
codec) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe AudioCodec
a -> AudioCodecSettings
s {$sel:codec:AudioCodecSettings' :: Maybe AudioCodec
codec = Maybe AudioCodec
a} :: AudioCodecSettings)
audioCodecSettings_ac3Settings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe Ac3Settings)
audioCodecSettings_ac3Settings :: (Maybe Ac3Settings -> f (Maybe Ac3Settings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_ac3Settings = (AudioCodecSettings -> Maybe Ac3Settings)
-> (AudioCodecSettings -> Maybe Ac3Settings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe Ac3Settings)
(Maybe Ac3Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe Ac3Settings
ac3Settings :: Maybe Ac3Settings
$sel:ac3Settings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Ac3Settings
ac3Settings} -> Maybe Ac3Settings
ac3Settings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe Ac3Settings
a -> AudioCodecSettings
s {$sel:ac3Settings:AudioCodecSettings' :: Maybe Ac3Settings
ac3Settings = Maybe Ac3Settings
a} :: AudioCodecSettings)
audioCodecSettings_opusSettings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe OpusSettings)
audioCodecSettings_opusSettings :: (Maybe OpusSettings -> f (Maybe OpusSettings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_opusSettings = (AudioCodecSettings -> Maybe OpusSettings)
-> (AudioCodecSettings -> Maybe OpusSettings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe OpusSettings)
(Maybe OpusSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe OpusSettings
opusSettings :: Maybe OpusSettings
$sel:opusSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe OpusSettings
opusSettings} -> Maybe OpusSettings
opusSettings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe OpusSettings
a -> AudioCodecSettings
s {$sel:opusSettings:AudioCodecSettings' :: Maybe OpusSettings
opusSettings = Maybe OpusSettings
a} :: AudioCodecSettings)
audioCodecSettings_mp2Settings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe Mp2Settings)
audioCodecSettings_mp2Settings :: (Maybe Mp2Settings -> f (Maybe Mp2Settings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_mp2Settings = (AudioCodecSettings -> Maybe Mp2Settings)
-> (AudioCodecSettings -> Maybe Mp2Settings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe Mp2Settings)
(Maybe Mp2Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe Mp2Settings
mp2Settings :: Maybe Mp2Settings
$sel:mp2Settings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Mp2Settings
mp2Settings} -> Maybe Mp2Settings
mp2Settings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe Mp2Settings
a -> AudioCodecSettings
s {$sel:mp2Settings:AudioCodecSettings' :: Maybe Mp2Settings
mp2Settings = Maybe Mp2Settings
a} :: AudioCodecSettings)
audioCodecSettings_wavSettings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe WavSettings)
audioCodecSettings_wavSettings :: (Maybe WavSettings -> f (Maybe WavSettings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_wavSettings = (AudioCodecSettings -> Maybe WavSettings)
-> (AudioCodecSettings -> Maybe WavSettings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe WavSettings)
(Maybe WavSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe WavSettings
wavSettings :: Maybe WavSettings
$sel:wavSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe WavSettings
wavSettings} -> Maybe WavSettings
wavSettings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe WavSettings
a -> AudioCodecSettings
s {$sel:wavSettings:AudioCodecSettings' :: Maybe WavSettings
wavSettings = Maybe WavSettings
a} :: AudioCodecSettings)
audioCodecSettings_eac3AtmosSettings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe Eac3AtmosSettings)
audioCodecSettings_eac3AtmosSettings :: (Maybe Eac3AtmosSettings -> f (Maybe Eac3AtmosSettings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_eac3AtmosSettings = (AudioCodecSettings -> Maybe Eac3AtmosSettings)
-> (AudioCodecSettings
-> Maybe Eac3AtmosSettings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe Eac3AtmosSettings)
(Maybe Eac3AtmosSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe Eac3AtmosSettings
eac3AtmosSettings :: Maybe Eac3AtmosSettings
$sel:eac3AtmosSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Eac3AtmosSettings
eac3AtmosSettings} -> Maybe Eac3AtmosSettings
eac3AtmosSettings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe Eac3AtmosSettings
a -> AudioCodecSettings
s {$sel:eac3AtmosSettings:AudioCodecSettings' :: Maybe Eac3AtmosSettings
eac3AtmosSettings = Maybe Eac3AtmosSettings
a} :: AudioCodecSettings)
audioCodecSettings_mp3Settings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe Mp3Settings)
audioCodecSettings_mp3Settings :: (Maybe Mp3Settings -> f (Maybe Mp3Settings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_mp3Settings = (AudioCodecSettings -> Maybe Mp3Settings)
-> (AudioCodecSettings -> Maybe Mp3Settings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe Mp3Settings)
(Maybe Mp3Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe Mp3Settings
mp3Settings :: Maybe Mp3Settings
$sel:mp3Settings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Mp3Settings
mp3Settings} -> Maybe Mp3Settings
mp3Settings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe Mp3Settings
a -> AudioCodecSettings
s {$sel:mp3Settings:AudioCodecSettings' :: Maybe Mp3Settings
mp3Settings = Maybe Mp3Settings
a} :: AudioCodecSettings)
audioCodecSettings_vorbisSettings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe VorbisSettings)
audioCodecSettings_vorbisSettings :: (Maybe VorbisSettings -> f (Maybe VorbisSettings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_vorbisSettings = (AudioCodecSettings -> Maybe VorbisSettings)
-> (AudioCodecSettings
-> Maybe VorbisSettings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe VorbisSettings)
(Maybe VorbisSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe VorbisSettings
vorbisSettings :: Maybe VorbisSettings
$sel:vorbisSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe VorbisSettings
vorbisSettings} -> Maybe VorbisSettings
vorbisSettings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe VorbisSettings
a -> AudioCodecSettings
s {$sel:vorbisSettings:AudioCodecSettings' :: Maybe VorbisSettings
vorbisSettings = Maybe VorbisSettings
a} :: AudioCodecSettings)
audioCodecSettings_aacSettings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe AacSettings)
audioCodecSettings_aacSettings :: (Maybe AacSettings -> f (Maybe AacSettings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_aacSettings = (AudioCodecSettings -> Maybe AacSettings)
-> (AudioCodecSettings -> Maybe AacSettings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe AacSettings)
(Maybe AacSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe AacSettings
aacSettings :: Maybe AacSettings
$sel:aacSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe AacSettings
aacSettings} -> Maybe AacSettings
aacSettings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe AacSettings
a -> AudioCodecSettings
s {$sel:aacSettings:AudioCodecSettings' :: Maybe AacSettings
aacSettings = Maybe AacSettings
a} :: AudioCodecSettings)
audioCodecSettings_eac3Settings :: Lens.Lens' AudioCodecSettings (Prelude.Maybe Eac3Settings)
audioCodecSettings_eac3Settings :: (Maybe Eac3Settings -> f (Maybe Eac3Settings))
-> AudioCodecSettings -> f AudioCodecSettings
audioCodecSettings_eac3Settings = (AudioCodecSettings -> Maybe Eac3Settings)
-> (AudioCodecSettings -> Maybe Eac3Settings -> AudioCodecSettings)
-> Lens
AudioCodecSettings
AudioCodecSettings
(Maybe Eac3Settings)
(Maybe Eac3Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioCodecSettings' {Maybe Eac3Settings
eac3Settings :: Maybe Eac3Settings
$sel:eac3Settings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Eac3Settings
eac3Settings} -> Maybe Eac3Settings
eac3Settings) (\s :: AudioCodecSettings
s@AudioCodecSettings' {} Maybe Eac3Settings
a -> AudioCodecSettings
s {$sel:eac3Settings:AudioCodecSettings' :: Maybe Eac3Settings
eac3Settings = Maybe Eac3Settings
a} :: AudioCodecSettings)
instance Core.FromJSON AudioCodecSettings where
parseJSON :: Value -> Parser AudioCodecSettings
parseJSON =
String
-> (Object -> Parser AudioCodecSettings)
-> Value
-> Parser AudioCodecSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AudioCodecSettings"
( \Object
x ->
Maybe AiffSettings
-> Maybe AudioCodec
-> Maybe Ac3Settings
-> Maybe OpusSettings
-> Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings
AudioCodecSettings'
(Maybe AiffSettings
-> Maybe AudioCodec
-> Maybe Ac3Settings
-> Maybe OpusSettings
-> Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
-> Parser (Maybe AiffSettings)
-> Parser
(Maybe AudioCodec
-> Maybe Ac3Settings
-> Maybe OpusSettings
-> Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AiffSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"aiffSettings")
Parser
(Maybe AudioCodec
-> Maybe Ac3Settings
-> Maybe OpusSettings
-> Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
-> Parser (Maybe AudioCodec)
-> Parser
(Maybe Ac3Settings
-> Maybe OpusSettings
-> Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AudioCodec)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"codec")
Parser
(Maybe Ac3Settings
-> Maybe OpusSettings
-> Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
-> Parser (Maybe Ac3Settings)
-> Parser
(Maybe OpusSettings
-> Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Ac3Settings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ac3Settings")
Parser
(Maybe OpusSettings
-> Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
-> Parser (Maybe OpusSettings)
-> Parser
(Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OpusSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"opusSettings")
Parser
(Maybe Mp2Settings
-> Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
-> Parser (Maybe Mp2Settings)
-> Parser
(Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Mp2Settings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mp2Settings")
Parser
(Maybe WavSettings
-> Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
-> Parser (Maybe WavSettings)
-> Parser
(Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe WavSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"wavSettings")
Parser
(Maybe Eac3AtmosSettings
-> Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
-> Parser (Maybe Eac3AtmosSettings)
-> Parser
(Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Eac3AtmosSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"eac3AtmosSettings")
Parser
(Maybe Mp3Settings
-> Maybe VorbisSettings
-> Maybe AacSettings
-> Maybe Eac3Settings
-> AudioCodecSettings)
-> Parser (Maybe Mp3Settings)
-> Parser
(Maybe VorbisSettings
-> Maybe AacSettings -> Maybe Eac3Settings -> AudioCodecSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Mp3Settings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mp3Settings")
Parser
(Maybe VorbisSettings
-> Maybe AacSettings -> Maybe Eac3Settings -> AudioCodecSettings)
-> Parser (Maybe VorbisSettings)
-> Parser
(Maybe AacSettings -> Maybe Eac3Settings -> AudioCodecSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VorbisSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vorbisSettings")
Parser
(Maybe AacSettings -> Maybe Eac3Settings -> AudioCodecSettings)
-> Parser (Maybe AacSettings)
-> Parser (Maybe Eac3Settings -> AudioCodecSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AacSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"aacSettings")
Parser (Maybe Eac3Settings -> AudioCodecSettings)
-> Parser (Maybe Eac3Settings) -> Parser AudioCodecSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Eac3Settings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"eac3Settings")
)
instance Prelude.Hashable AudioCodecSettings
instance Prelude.NFData AudioCodecSettings
instance Core.ToJSON AudioCodecSettings where
toJSON :: AudioCodecSettings -> Value
toJSON AudioCodecSettings' {Maybe AacSettings
Maybe Ac3Settings
Maybe AiffSettings
Maybe AudioCodec
Maybe Eac3AtmosSettings
Maybe Eac3Settings
Maybe Mp2Settings
Maybe Mp3Settings
Maybe OpusSettings
Maybe VorbisSettings
Maybe WavSettings
eac3Settings :: Maybe Eac3Settings
aacSettings :: Maybe AacSettings
vorbisSettings :: Maybe VorbisSettings
mp3Settings :: Maybe Mp3Settings
eac3AtmosSettings :: Maybe Eac3AtmosSettings
wavSettings :: Maybe WavSettings
mp2Settings :: Maybe Mp2Settings
opusSettings :: Maybe OpusSettings
ac3Settings :: Maybe Ac3Settings
codec :: Maybe AudioCodec
aiffSettings :: Maybe AiffSettings
$sel:eac3Settings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Eac3Settings
$sel:aacSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe AacSettings
$sel:vorbisSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe VorbisSettings
$sel:mp3Settings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Mp3Settings
$sel:eac3AtmosSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Eac3AtmosSettings
$sel:wavSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe WavSettings
$sel:mp2Settings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Mp2Settings
$sel:opusSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe OpusSettings
$sel:ac3Settings:AudioCodecSettings' :: AudioCodecSettings -> Maybe Ac3Settings
$sel:codec:AudioCodecSettings' :: AudioCodecSettings -> Maybe AudioCodec
$sel:aiffSettings:AudioCodecSettings' :: AudioCodecSettings -> Maybe AiffSettings
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"aiffSettings" Text -> AiffSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AiffSettings -> Pair) -> Maybe AiffSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AiffSettings
aiffSettings,
(Text
"codec" Text -> AudioCodec -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AudioCodec -> Pair) -> Maybe AudioCodec -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AudioCodec
codec,
(Text
"ac3Settings" Text -> Ac3Settings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Ac3Settings -> Pair) -> Maybe Ac3Settings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Ac3Settings
ac3Settings,
(Text
"opusSettings" Text -> OpusSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OpusSettings -> Pair) -> Maybe OpusSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpusSettings
opusSettings,
(Text
"mp2Settings" Text -> Mp2Settings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Mp2Settings -> Pair) -> Maybe Mp2Settings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Mp2Settings
mp2Settings,
(Text
"wavSettings" Text -> WavSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (WavSettings -> Pair) -> Maybe WavSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WavSettings
wavSettings,
(Text
"eac3AtmosSettings" Text -> Eac3AtmosSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Eac3AtmosSettings -> Pair)
-> Maybe Eac3AtmosSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Eac3AtmosSettings
eac3AtmosSettings,
(Text
"mp3Settings" Text -> Mp3Settings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Mp3Settings -> Pair) -> Maybe Mp3Settings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Mp3Settings
mp3Settings,
(Text
"vorbisSettings" Text -> VorbisSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(VorbisSettings -> Pair) -> Maybe VorbisSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VorbisSettings
vorbisSettings,
(Text
"aacSettings" Text -> AacSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AacSettings -> Pair) -> Maybe AacSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AacSettings
aacSettings,
(Text
"eac3Settings" Text -> Eac3Settings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Eac3Settings -> Pair) -> Maybe Eac3Settings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Eac3Settings
eac3Settings
]
)