{-# 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.AudioDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.AudioCodecSettings
import Amazonka.MediaLive.Types.AudioDescriptionAudioTypeControl
import Amazonka.MediaLive.Types.AudioDescriptionLanguageCodeControl
import Amazonka.MediaLive.Types.AudioNormalizationSettings
import Amazonka.MediaLive.Types.AudioType
import Amazonka.MediaLive.Types.AudioWatermarkSettings
import Amazonka.MediaLive.Types.RemixSettings
import qualified Amazonka.Prelude as Prelude
data AudioDescription = AudioDescription'
{
AudioDescription -> Maybe Text
languageCode :: Prelude.Maybe Prelude.Text,
AudioDescription -> Maybe AudioType
audioType :: Prelude.Maybe AudioType,
AudioDescription -> Maybe AudioNormalizationSettings
audioNormalizationSettings :: Prelude.Maybe AudioNormalizationSettings,
AudioDescription -> Maybe AudioDescriptionLanguageCodeControl
languageCodeControl :: Prelude.Maybe AudioDescriptionLanguageCodeControl,
AudioDescription -> Maybe AudioCodecSettings
codecSettings :: Prelude.Maybe AudioCodecSettings,
AudioDescription -> Maybe AudioWatermarkSettings
audioWatermarkingSettings :: Prelude.Maybe AudioWatermarkSettings,
AudioDescription -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text,
AudioDescription -> Maybe RemixSettings
remixSettings :: Prelude.Maybe RemixSettings,
AudioDescription -> Maybe AudioDescriptionAudioTypeControl
audioTypeControl :: Prelude.Maybe AudioDescriptionAudioTypeControl,
AudioDescription -> Text
audioSelectorName :: Prelude.Text,
AudioDescription -> Text
name :: Prelude.Text
}
deriving (AudioDescription -> AudioDescription -> Bool
(AudioDescription -> AudioDescription -> Bool)
-> (AudioDescription -> AudioDescription -> Bool)
-> Eq AudioDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioDescription -> AudioDescription -> Bool
$c/= :: AudioDescription -> AudioDescription -> Bool
== :: AudioDescription -> AudioDescription -> Bool
$c== :: AudioDescription -> AudioDescription -> Bool
Prelude.Eq, ReadPrec [AudioDescription]
ReadPrec AudioDescription
Int -> ReadS AudioDescription
ReadS [AudioDescription]
(Int -> ReadS AudioDescription)
-> ReadS [AudioDescription]
-> ReadPrec AudioDescription
-> ReadPrec [AudioDescription]
-> Read AudioDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AudioDescription]
$creadListPrec :: ReadPrec [AudioDescription]
readPrec :: ReadPrec AudioDescription
$creadPrec :: ReadPrec AudioDescription
readList :: ReadS [AudioDescription]
$creadList :: ReadS [AudioDescription]
readsPrec :: Int -> ReadS AudioDescription
$creadsPrec :: Int -> ReadS AudioDescription
Prelude.Read, Int -> AudioDescription -> ShowS
[AudioDescription] -> ShowS
AudioDescription -> String
(Int -> AudioDescription -> ShowS)
-> (AudioDescription -> String)
-> ([AudioDescription] -> ShowS)
-> Show AudioDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AudioDescription] -> ShowS
$cshowList :: [AudioDescription] -> ShowS
show :: AudioDescription -> String
$cshow :: AudioDescription -> String
showsPrec :: Int -> AudioDescription -> ShowS
$cshowsPrec :: Int -> AudioDescription -> ShowS
Prelude.Show, (forall x. AudioDescription -> Rep AudioDescription x)
-> (forall x. Rep AudioDescription x -> AudioDescription)
-> Generic AudioDescription
forall x. Rep AudioDescription x -> AudioDescription
forall x. AudioDescription -> Rep AudioDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AudioDescription x -> AudioDescription
$cfrom :: forall x. AudioDescription -> Rep AudioDescription x
Prelude.Generic)
newAudioDescription ::
Prelude.Text ->
Prelude.Text ->
AudioDescription
newAudioDescription :: Text -> Text -> AudioDescription
newAudioDescription Text
pAudioSelectorName_ Text
pName_ =
AudioDescription' :: Maybe Text
-> Maybe AudioType
-> Maybe AudioNormalizationSettings
-> Maybe AudioDescriptionLanguageCodeControl
-> Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription
AudioDescription'
{ $sel:languageCode:AudioDescription' :: Maybe Text
languageCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:audioType:AudioDescription' :: Maybe AudioType
audioType = Maybe AudioType
forall a. Maybe a
Prelude.Nothing,
$sel:audioNormalizationSettings:AudioDescription' :: Maybe AudioNormalizationSettings
audioNormalizationSettings = Maybe AudioNormalizationSettings
forall a. Maybe a
Prelude.Nothing,
$sel:languageCodeControl:AudioDescription' :: Maybe AudioDescriptionLanguageCodeControl
languageCodeControl = Maybe AudioDescriptionLanguageCodeControl
forall a. Maybe a
Prelude.Nothing,
$sel:codecSettings:AudioDescription' :: Maybe AudioCodecSettings
codecSettings = Maybe AudioCodecSettings
forall a. Maybe a
Prelude.Nothing,
$sel:audioWatermarkingSettings:AudioDescription' :: Maybe AudioWatermarkSettings
audioWatermarkingSettings = Maybe AudioWatermarkSettings
forall a. Maybe a
Prelude.Nothing,
$sel:streamName:AudioDescription' :: Maybe Text
streamName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:remixSettings:AudioDescription' :: Maybe RemixSettings
remixSettings = Maybe RemixSettings
forall a. Maybe a
Prelude.Nothing,
$sel:audioTypeControl:AudioDescription' :: Maybe AudioDescriptionAudioTypeControl
audioTypeControl = Maybe AudioDescriptionAudioTypeControl
forall a. Maybe a
Prelude.Nothing,
$sel:audioSelectorName:AudioDescription' :: Text
audioSelectorName = Text
pAudioSelectorName_,
$sel:name:AudioDescription' :: Text
name = Text
pName_
}
audioDescription_languageCode :: Lens.Lens' AudioDescription (Prelude.Maybe Prelude.Text)
audioDescription_languageCode :: (Maybe Text -> f (Maybe Text))
-> AudioDescription -> f AudioDescription
audioDescription_languageCode = (AudioDescription -> Maybe Text)
-> (AudioDescription -> Maybe Text -> AudioDescription)
-> Lens AudioDescription AudioDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe Text
languageCode :: Maybe Text
$sel:languageCode:AudioDescription' :: AudioDescription -> Maybe Text
languageCode} -> Maybe Text
languageCode) (\s :: AudioDescription
s@AudioDescription' {} Maybe Text
a -> AudioDescription
s {$sel:languageCode:AudioDescription' :: Maybe Text
languageCode = Maybe Text
a} :: AudioDescription)
audioDescription_audioType :: Lens.Lens' AudioDescription (Prelude.Maybe AudioType)
audioDescription_audioType :: (Maybe AudioType -> f (Maybe AudioType))
-> AudioDescription -> f AudioDescription
audioDescription_audioType = (AudioDescription -> Maybe AudioType)
-> (AudioDescription -> Maybe AudioType -> AudioDescription)
-> Lens
AudioDescription
AudioDescription
(Maybe AudioType)
(Maybe AudioType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioType
audioType :: Maybe AudioType
$sel:audioType:AudioDescription' :: AudioDescription -> Maybe AudioType
audioType} -> Maybe AudioType
audioType) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioType
a -> AudioDescription
s {$sel:audioType:AudioDescription' :: Maybe AudioType
audioType = Maybe AudioType
a} :: AudioDescription)
audioDescription_audioNormalizationSettings :: Lens.Lens' AudioDescription (Prelude.Maybe AudioNormalizationSettings)
audioDescription_audioNormalizationSettings :: (Maybe AudioNormalizationSettings
-> f (Maybe AudioNormalizationSettings))
-> AudioDescription -> f AudioDescription
audioDescription_audioNormalizationSettings = (AudioDescription -> Maybe AudioNormalizationSettings)
-> (AudioDescription
-> Maybe AudioNormalizationSettings -> AudioDescription)
-> Lens
AudioDescription
AudioDescription
(Maybe AudioNormalizationSettings)
(Maybe AudioNormalizationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioNormalizationSettings
audioNormalizationSettings :: Maybe AudioNormalizationSettings
$sel:audioNormalizationSettings:AudioDescription' :: AudioDescription -> Maybe AudioNormalizationSettings
audioNormalizationSettings} -> Maybe AudioNormalizationSettings
audioNormalizationSettings) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioNormalizationSettings
a -> AudioDescription
s {$sel:audioNormalizationSettings:AudioDescription' :: Maybe AudioNormalizationSettings
audioNormalizationSettings = Maybe AudioNormalizationSettings
a} :: AudioDescription)
audioDescription_languageCodeControl :: Lens.Lens' AudioDescription (Prelude.Maybe AudioDescriptionLanguageCodeControl)
audioDescription_languageCodeControl :: (Maybe AudioDescriptionLanguageCodeControl
-> f (Maybe AudioDescriptionLanguageCodeControl))
-> AudioDescription -> f AudioDescription
audioDescription_languageCodeControl = (AudioDescription -> Maybe AudioDescriptionLanguageCodeControl)
-> (AudioDescription
-> Maybe AudioDescriptionLanguageCodeControl -> AudioDescription)
-> Lens
AudioDescription
AudioDescription
(Maybe AudioDescriptionLanguageCodeControl)
(Maybe AudioDescriptionLanguageCodeControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioDescriptionLanguageCodeControl
languageCodeControl :: Maybe AudioDescriptionLanguageCodeControl
$sel:languageCodeControl:AudioDescription' :: AudioDescription -> Maybe AudioDescriptionLanguageCodeControl
languageCodeControl} -> Maybe AudioDescriptionLanguageCodeControl
languageCodeControl) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioDescriptionLanguageCodeControl
a -> AudioDescription
s {$sel:languageCodeControl:AudioDescription' :: Maybe AudioDescriptionLanguageCodeControl
languageCodeControl = Maybe AudioDescriptionLanguageCodeControl
a} :: AudioDescription)
audioDescription_codecSettings :: Lens.Lens' AudioDescription (Prelude.Maybe AudioCodecSettings)
audioDescription_codecSettings :: (Maybe AudioCodecSettings -> f (Maybe AudioCodecSettings))
-> AudioDescription -> f AudioDescription
audioDescription_codecSettings = (AudioDescription -> Maybe AudioCodecSettings)
-> (AudioDescription
-> Maybe AudioCodecSettings -> AudioDescription)
-> Lens
AudioDescription
AudioDescription
(Maybe AudioCodecSettings)
(Maybe AudioCodecSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioCodecSettings
codecSettings :: Maybe AudioCodecSettings
$sel:codecSettings:AudioDescription' :: AudioDescription -> Maybe AudioCodecSettings
codecSettings} -> Maybe AudioCodecSettings
codecSettings) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioCodecSettings
a -> AudioDescription
s {$sel:codecSettings:AudioDescription' :: Maybe AudioCodecSettings
codecSettings = Maybe AudioCodecSettings
a} :: AudioDescription)
audioDescription_audioWatermarkingSettings :: Lens.Lens' AudioDescription (Prelude.Maybe AudioWatermarkSettings)
audioDescription_audioWatermarkingSettings :: (Maybe AudioWatermarkSettings -> f (Maybe AudioWatermarkSettings))
-> AudioDescription -> f AudioDescription
audioDescription_audioWatermarkingSettings = (AudioDescription -> Maybe AudioWatermarkSettings)
-> (AudioDescription
-> Maybe AudioWatermarkSettings -> AudioDescription)
-> Lens
AudioDescription
AudioDescription
(Maybe AudioWatermarkSettings)
(Maybe AudioWatermarkSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioWatermarkSettings
audioWatermarkingSettings :: Maybe AudioWatermarkSettings
$sel:audioWatermarkingSettings:AudioDescription' :: AudioDescription -> Maybe AudioWatermarkSettings
audioWatermarkingSettings} -> Maybe AudioWatermarkSettings
audioWatermarkingSettings) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioWatermarkSettings
a -> AudioDescription
s {$sel:audioWatermarkingSettings:AudioDescription' :: Maybe AudioWatermarkSettings
audioWatermarkingSettings = Maybe AudioWatermarkSettings
a} :: AudioDescription)
audioDescription_streamName :: Lens.Lens' AudioDescription (Prelude.Maybe Prelude.Text)
audioDescription_streamName :: (Maybe Text -> f (Maybe Text))
-> AudioDescription -> f AudioDescription
audioDescription_streamName = (AudioDescription -> Maybe Text)
-> (AudioDescription -> Maybe Text -> AudioDescription)
-> Lens AudioDescription AudioDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe Text
streamName :: Maybe Text
$sel:streamName:AudioDescription' :: AudioDescription -> Maybe Text
streamName} -> Maybe Text
streamName) (\s :: AudioDescription
s@AudioDescription' {} Maybe Text
a -> AudioDescription
s {$sel:streamName:AudioDescription' :: Maybe Text
streamName = Maybe Text
a} :: AudioDescription)
audioDescription_remixSettings :: Lens.Lens' AudioDescription (Prelude.Maybe RemixSettings)
audioDescription_remixSettings :: (Maybe RemixSettings -> f (Maybe RemixSettings))
-> AudioDescription -> f AudioDescription
audioDescription_remixSettings = (AudioDescription -> Maybe RemixSettings)
-> (AudioDescription -> Maybe RemixSettings -> AudioDescription)
-> Lens
AudioDescription
AudioDescription
(Maybe RemixSettings)
(Maybe RemixSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe RemixSettings
remixSettings :: Maybe RemixSettings
$sel:remixSettings:AudioDescription' :: AudioDescription -> Maybe RemixSettings
remixSettings} -> Maybe RemixSettings
remixSettings) (\s :: AudioDescription
s@AudioDescription' {} Maybe RemixSettings
a -> AudioDescription
s {$sel:remixSettings:AudioDescription' :: Maybe RemixSettings
remixSettings = Maybe RemixSettings
a} :: AudioDescription)
audioDescription_audioTypeControl :: Lens.Lens' AudioDescription (Prelude.Maybe AudioDescriptionAudioTypeControl)
audioDescription_audioTypeControl :: (Maybe AudioDescriptionAudioTypeControl
-> f (Maybe AudioDescriptionAudioTypeControl))
-> AudioDescription -> f AudioDescription
audioDescription_audioTypeControl = (AudioDescription -> Maybe AudioDescriptionAudioTypeControl)
-> (AudioDescription
-> Maybe AudioDescriptionAudioTypeControl -> AudioDescription)
-> Lens
AudioDescription
AudioDescription
(Maybe AudioDescriptionAudioTypeControl)
(Maybe AudioDescriptionAudioTypeControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioDescriptionAudioTypeControl
audioTypeControl :: Maybe AudioDescriptionAudioTypeControl
$sel:audioTypeControl:AudioDescription' :: AudioDescription -> Maybe AudioDescriptionAudioTypeControl
audioTypeControl} -> Maybe AudioDescriptionAudioTypeControl
audioTypeControl) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioDescriptionAudioTypeControl
a -> AudioDescription
s {$sel:audioTypeControl:AudioDescription' :: Maybe AudioDescriptionAudioTypeControl
audioTypeControl = Maybe AudioDescriptionAudioTypeControl
a} :: AudioDescription)
audioDescription_audioSelectorName :: Lens.Lens' AudioDescription Prelude.Text
audioDescription_audioSelectorName :: (Text -> f Text) -> AudioDescription -> f AudioDescription
audioDescription_audioSelectorName = (AudioDescription -> Text)
-> (AudioDescription -> Text -> AudioDescription)
-> Lens AudioDescription AudioDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Text
audioSelectorName :: Text
$sel:audioSelectorName:AudioDescription' :: AudioDescription -> Text
audioSelectorName} -> Text
audioSelectorName) (\s :: AudioDescription
s@AudioDescription' {} Text
a -> AudioDescription
s {$sel:audioSelectorName:AudioDescription' :: Text
audioSelectorName = Text
a} :: AudioDescription)
audioDescription_name :: Lens.Lens' AudioDescription Prelude.Text
audioDescription_name :: (Text -> f Text) -> AudioDescription -> f AudioDescription
audioDescription_name = (AudioDescription -> Text)
-> (AudioDescription -> Text -> AudioDescription)
-> Lens AudioDescription AudioDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Text
name :: Text
$sel:name:AudioDescription' :: AudioDescription -> Text
name} -> Text
name) (\s :: AudioDescription
s@AudioDescription' {} Text
a -> AudioDescription
s {$sel:name:AudioDescription' :: Text
name = Text
a} :: AudioDescription)
instance Core.FromJSON AudioDescription where
parseJSON :: Value -> Parser AudioDescription
parseJSON =
String
-> (Object -> Parser AudioDescription)
-> Value
-> Parser AudioDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AudioDescription"
( \Object
x ->
Maybe Text
-> Maybe AudioType
-> Maybe AudioNormalizationSettings
-> Maybe AudioDescriptionLanguageCodeControl
-> Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription
AudioDescription'
(Maybe Text
-> Maybe AudioType
-> Maybe AudioNormalizationSettings
-> Maybe AudioDescriptionLanguageCodeControl
-> Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe AudioType
-> Maybe AudioNormalizationSettings
-> Maybe AudioDescriptionLanguageCodeControl
-> Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
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
"languageCode")
Parser
(Maybe AudioType
-> Maybe AudioNormalizationSettings
-> Maybe AudioDescriptionLanguageCodeControl
-> Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
-> Parser (Maybe AudioType)
-> Parser
(Maybe AudioNormalizationSettings
-> Maybe AudioDescriptionLanguageCodeControl
-> Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AudioType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioType")
Parser
(Maybe AudioNormalizationSettings
-> Maybe AudioDescriptionLanguageCodeControl
-> Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
-> Parser (Maybe AudioNormalizationSettings)
-> Parser
(Maybe AudioDescriptionLanguageCodeControl
-> Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AudioNormalizationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioNormalizationSettings")
Parser
(Maybe AudioDescriptionLanguageCodeControl
-> Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
-> Parser (Maybe AudioDescriptionLanguageCodeControl)
-> Parser
(Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AudioDescriptionLanguageCodeControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"languageCodeControl")
Parser
(Maybe AudioCodecSettings
-> Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
-> Parser (Maybe AudioCodecSettings)
-> Parser
(Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AudioCodecSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"codecSettings")
Parser
(Maybe AudioWatermarkSettings
-> Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
-> Parser (Maybe AudioWatermarkSettings)
-> Parser
(Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AudioWatermarkSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioWatermarkingSettings")
Parser
(Maybe Text
-> Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
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
"streamName")
Parser
(Maybe RemixSettings
-> Maybe AudioDescriptionAudioTypeControl
-> Text
-> Text
-> AudioDescription)
-> Parser (Maybe RemixSettings)
-> Parser
(Maybe AudioDescriptionAudioTypeControl
-> Text -> Text -> AudioDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RemixSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"remixSettings")
Parser
(Maybe AudioDescriptionAudioTypeControl
-> Text -> Text -> AudioDescription)
-> Parser (Maybe AudioDescriptionAudioTypeControl)
-> Parser (Text -> Text -> AudioDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AudioDescriptionAudioTypeControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioTypeControl")
Parser (Text -> Text -> AudioDescription)
-> Parser Text -> Parser (Text -> AudioDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"audioSelectorName")
Parser (Text -> AudioDescription)
-> Parser Text -> Parser AudioDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
)
instance Prelude.Hashable AudioDescription
instance Prelude.NFData AudioDescription
instance Core.ToJSON AudioDescription where
toJSON :: AudioDescription -> Value
toJSON AudioDescription' {Maybe Text
Maybe AudioDescriptionAudioTypeControl
Maybe AudioDescriptionLanguageCodeControl
Maybe AudioNormalizationSettings
Maybe AudioType
Maybe AudioWatermarkSettings
Maybe RemixSettings
Maybe AudioCodecSettings
Text
name :: Text
audioSelectorName :: Text
audioTypeControl :: Maybe AudioDescriptionAudioTypeControl
remixSettings :: Maybe RemixSettings
streamName :: Maybe Text
audioWatermarkingSettings :: Maybe AudioWatermarkSettings
codecSettings :: Maybe AudioCodecSettings
languageCodeControl :: Maybe AudioDescriptionLanguageCodeControl
audioNormalizationSettings :: Maybe AudioNormalizationSettings
audioType :: Maybe AudioType
languageCode :: Maybe Text
$sel:name:AudioDescription' :: AudioDescription -> Text
$sel:audioSelectorName:AudioDescription' :: AudioDescription -> Text
$sel:audioTypeControl:AudioDescription' :: AudioDescription -> Maybe AudioDescriptionAudioTypeControl
$sel:remixSettings:AudioDescription' :: AudioDescription -> Maybe RemixSettings
$sel:streamName:AudioDescription' :: AudioDescription -> Maybe Text
$sel:audioWatermarkingSettings:AudioDescription' :: AudioDescription -> Maybe AudioWatermarkSettings
$sel:codecSettings:AudioDescription' :: AudioDescription -> Maybe AudioCodecSettings
$sel:languageCodeControl:AudioDescription' :: AudioDescription -> Maybe AudioDescriptionLanguageCodeControl
$sel:audioNormalizationSettings:AudioDescription' :: AudioDescription -> Maybe AudioNormalizationSettings
$sel:audioType:AudioDescription' :: AudioDescription -> Maybe AudioType
$sel:languageCode:AudioDescription' :: AudioDescription -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"languageCode" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
languageCode,
(Text
"audioType" Text -> AudioType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AudioType -> Pair) -> Maybe AudioType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AudioType
audioType,
(Text
"audioNormalizationSettings" Text -> AudioNormalizationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AudioNormalizationSettings -> Pair)
-> Maybe AudioNormalizationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AudioNormalizationSettings
audioNormalizationSettings,
(Text
"languageCodeControl" Text -> AudioDescriptionLanguageCodeControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AudioDescriptionLanguageCodeControl -> Pair)
-> Maybe AudioDescriptionLanguageCodeControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AudioDescriptionLanguageCodeControl
languageCodeControl,
(Text
"codecSettings" Text -> AudioCodecSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AudioCodecSettings -> Pair)
-> Maybe AudioCodecSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AudioCodecSettings
codecSettings,
(Text
"audioWatermarkingSettings" Text -> AudioWatermarkSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AudioWatermarkSettings -> Pair)
-> Maybe AudioWatermarkSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AudioWatermarkSettings
audioWatermarkingSettings,
(Text
"streamName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
streamName,
(Text
"remixSettings" Text -> RemixSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RemixSettings -> Pair) -> Maybe RemixSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RemixSettings
remixSettings,
(Text
"audioTypeControl" Text -> AudioDescriptionAudioTypeControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AudioDescriptionAudioTypeControl -> Pair)
-> Maybe AudioDescriptionAudioTypeControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AudioDescriptionAudioTypeControl
audioTypeControl,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"audioSelectorName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
audioSelectorName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)