{-# 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.AudioSelector where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.AudioDefaultSelection
import Amazonka.MediaConvert.Types.AudioSelectorType
import Amazonka.MediaConvert.Types.HlsRenditionGroupSettings
import Amazonka.MediaConvert.Types.LanguageCode
import Amazonka.MediaConvert.Types.RemixSettings
import qualified Amazonka.Prelude as Prelude
data AudioSelector = AudioSelector'
{
AudioSelector -> Maybe [Natural]
tracks :: Prelude.Maybe [Prelude.Natural],
AudioSelector -> Maybe Text
customLanguageCode :: Prelude.Maybe Prelude.Text,
AudioSelector -> Maybe Natural
programSelection :: Prelude.Maybe Prelude.Natural,
AudioSelector -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
AudioSelector -> Maybe Int
offset :: Prelude.Maybe Prelude.Int,
AudioSelector -> Maybe AudioDefaultSelection
defaultSelection :: Prelude.Maybe AudioDefaultSelection,
AudioSelector -> Maybe [Natural]
pids :: Prelude.Maybe [Prelude.Natural],
AudioSelector -> Maybe HlsRenditionGroupSettings
hlsRenditionGroupSettings :: Prelude.Maybe HlsRenditionGroupSettings,
AudioSelector -> Maybe AudioSelectorType
selectorType :: Prelude.Maybe AudioSelectorType,
AudioSelector -> Maybe Text
externalAudioFileInput :: Prelude.Maybe Prelude.Text,
AudioSelector -> Maybe RemixSettings
remixSettings :: Prelude.Maybe RemixSettings
}
deriving (AudioSelector -> AudioSelector -> Bool
(AudioSelector -> AudioSelector -> Bool)
-> (AudioSelector -> AudioSelector -> Bool) -> Eq AudioSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioSelector -> AudioSelector -> Bool
$c/= :: AudioSelector -> AudioSelector -> Bool
== :: AudioSelector -> AudioSelector -> Bool
$c== :: AudioSelector -> AudioSelector -> Bool
Prelude.Eq, ReadPrec [AudioSelector]
ReadPrec AudioSelector
Int -> ReadS AudioSelector
ReadS [AudioSelector]
(Int -> ReadS AudioSelector)
-> ReadS [AudioSelector]
-> ReadPrec AudioSelector
-> ReadPrec [AudioSelector]
-> Read AudioSelector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AudioSelector]
$creadListPrec :: ReadPrec [AudioSelector]
readPrec :: ReadPrec AudioSelector
$creadPrec :: ReadPrec AudioSelector
readList :: ReadS [AudioSelector]
$creadList :: ReadS [AudioSelector]
readsPrec :: Int -> ReadS AudioSelector
$creadsPrec :: Int -> ReadS AudioSelector
Prelude.Read, Int -> AudioSelector -> ShowS
[AudioSelector] -> ShowS
AudioSelector -> String
(Int -> AudioSelector -> ShowS)
-> (AudioSelector -> String)
-> ([AudioSelector] -> ShowS)
-> Show AudioSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AudioSelector] -> ShowS
$cshowList :: [AudioSelector] -> ShowS
show :: AudioSelector -> String
$cshow :: AudioSelector -> String
showsPrec :: Int -> AudioSelector -> ShowS
$cshowsPrec :: Int -> AudioSelector -> ShowS
Prelude.Show, (forall x. AudioSelector -> Rep AudioSelector x)
-> (forall x. Rep AudioSelector x -> AudioSelector)
-> Generic AudioSelector
forall x. Rep AudioSelector x -> AudioSelector
forall x. AudioSelector -> Rep AudioSelector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AudioSelector x -> AudioSelector
$cfrom :: forall x. AudioSelector -> Rep AudioSelector x
Prelude.Generic)
newAudioSelector ::
AudioSelector
newAudioSelector :: AudioSelector
newAudioSelector =
AudioSelector' :: Maybe [Natural]
-> Maybe Text
-> Maybe Natural
-> Maybe LanguageCode
-> Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector
AudioSelector'
{ $sel:tracks:AudioSelector' :: Maybe [Natural]
tracks = Maybe [Natural]
forall a. Maybe a
Prelude.Nothing,
$sel:customLanguageCode:AudioSelector' :: Maybe Text
customLanguageCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:programSelection:AudioSelector' :: Maybe Natural
programSelection = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:languageCode:AudioSelector' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
forall a. Maybe a
Prelude.Nothing,
$sel:offset:AudioSelector' :: Maybe Int
offset = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:defaultSelection:AudioSelector' :: Maybe AudioDefaultSelection
defaultSelection = Maybe AudioDefaultSelection
forall a. Maybe a
Prelude.Nothing,
$sel:pids:AudioSelector' :: Maybe [Natural]
pids = Maybe [Natural]
forall a. Maybe a
Prelude.Nothing,
$sel:hlsRenditionGroupSettings:AudioSelector' :: Maybe HlsRenditionGroupSettings
hlsRenditionGroupSettings = Maybe HlsRenditionGroupSettings
forall a. Maybe a
Prelude.Nothing,
$sel:selectorType:AudioSelector' :: Maybe AudioSelectorType
selectorType = Maybe AudioSelectorType
forall a. Maybe a
Prelude.Nothing,
$sel:externalAudioFileInput:AudioSelector' :: Maybe Text
externalAudioFileInput = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:remixSettings:AudioSelector' :: Maybe RemixSettings
remixSettings = Maybe RemixSettings
forall a. Maybe a
Prelude.Nothing
}
audioSelector_tracks :: Lens.Lens' AudioSelector (Prelude.Maybe [Prelude.Natural])
audioSelector_tracks :: (Maybe [Natural] -> f (Maybe [Natural]))
-> AudioSelector -> f AudioSelector
audioSelector_tracks = (AudioSelector -> Maybe [Natural])
-> (AudioSelector -> Maybe [Natural] -> AudioSelector)
-> Lens
AudioSelector AudioSelector (Maybe [Natural]) (Maybe [Natural])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe [Natural]
tracks :: Maybe [Natural]
$sel:tracks:AudioSelector' :: AudioSelector -> Maybe [Natural]
tracks} -> Maybe [Natural]
tracks) (\s :: AudioSelector
s@AudioSelector' {} Maybe [Natural]
a -> AudioSelector
s {$sel:tracks:AudioSelector' :: Maybe [Natural]
tracks = Maybe [Natural]
a} :: AudioSelector) ((Maybe [Natural] -> f (Maybe [Natural]))
-> AudioSelector -> f AudioSelector)
-> ((Maybe [Natural] -> f (Maybe [Natural]))
-> Maybe [Natural] -> f (Maybe [Natural]))
-> (Maybe [Natural] -> f (Maybe [Natural]))
-> AudioSelector
-> f AudioSelector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Natural] [Natural] [Natural] [Natural]
-> Iso
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Natural] [Natural] [Natural] [Natural]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
audioSelector_customLanguageCode :: Lens.Lens' AudioSelector (Prelude.Maybe Prelude.Text)
audioSelector_customLanguageCode :: (Maybe Text -> f (Maybe Text)) -> AudioSelector -> f AudioSelector
audioSelector_customLanguageCode = (AudioSelector -> Maybe Text)
-> (AudioSelector -> Maybe Text -> AudioSelector)
-> Lens AudioSelector AudioSelector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe Text
customLanguageCode :: Maybe Text
$sel:customLanguageCode:AudioSelector' :: AudioSelector -> Maybe Text
customLanguageCode} -> Maybe Text
customLanguageCode) (\s :: AudioSelector
s@AudioSelector' {} Maybe Text
a -> AudioSelector
s {$sel:customLanguageCode:AudioSelector' :: Maybe Text
customLanguageCode = Maybe Text
a} :: AudioSelector)
audioSelector_programSelection :: Lens.Lens' AudioSelector (Prelude.Maybe Prelude.Natural)
audioSelector_programSelection :: (Maybe Natural -> f (Maybe Natural))
-> AudioSelector -> f AudioSelector
audioSelector_programSelection = (AudioSelector -> Maybe Natural)
-> (AudioSelector -> Maybe Natural -> AudioSelector)
-> Lens AudioSelector AudioSelector (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe Natural
programSelection :: Maybe Natural
$sel:programSelection:AudioSelector' :: AudioSelector -> Maybe Natural
programSelection} -> Maybe Natural
programSelection) (\s :: AudioSelector
s@AudioSelector' {} Maybe Natural
a -> AudioSelector
s {$sel:programSelection:AudioSelector' :: Maybe Natural
programSelection = Maybe Natural
a} :: AudioSelector)
audioSelector_languageCode :: Lens.Lens' AudioSelector (Prelude.Maybe LanguageCode)
audioSelector_languageCode :: (Maybe LanguageCode -> f (Maybe LanguageCode))
-> AudioSelector -> f AudioSelector
audioSelector_languageCode = (AudioSelector -> Maybe LanguageCode)
-> (AudioSelector -> Maybe LanguageCode -> AudioSelector)
-> Lens
AudioSelector
AudioSelector
(Maybe LanguageCode)
(Maybe LanguageCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:AudioSelector' :: AudioSelector -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: AudioSelector
s@AudioSelector' {} Maybe LanguageCode
a -> AudioSelector
s {$sel:languageCode:AudioSelector' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: AudioSelector)
audioSelector_offset :: Lens.Lens' AudioSelector (Prelude.Maybe Prelude.Int)
audioSelector_offset :: (Maybe Int -> f (Maybe Int)) -> AudioSelector -> f AudioSelector
audioSelector_offset = (AudioSelector -> Maybe Int)
-> (AudioSelector -> Maybe Int -> AudioSelector)
-> Lens AudioSelector AudioSelector (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe Int
offset :: Maybe Int
$sel:offset:AudioSelector' :: AudioSelector -> Maybe Int
offset} -> Maybe Int
offset) (\s :: AudioSelector
s@AudioSelector' {} Maybe Int
a -> AudioSelector
s {$sel:offset:AudioSelector' :: Maybe Int
offset = Maybe Int
a} :: AudioSelector)
audioSelector_defaultSelection :: Lens.Lens' AudioSelector (Prelude.Maybe AudioDefaultSelection)
audioSelector_defaultSelection :: (Maybe AudioDefaultSelection -> f (Maybe AudioDefaultSelection))
-> AudioSelector -> f AudioSelector
audioSelector_defaultSelection = (AudioSelector -> Maybe AudioDefaultSelection)
-> (AudioSelector -> Maybe AudioDefaultSelection -> AudioSelector)
-> Lens
AudioSelector
AudioSelector
(Maybe AudioDefaultSelection)
(Maybe AudioDefaultSelection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe AudioDefaultSelection
defaultSelection :: Maybe AudioDefaultSelection
$sel:defaultSelection:AudioSelector' :: AudioSelector -> Maybe AudioDefaultSelection
defaultSelection} -> Maybe AudioDefaultSelection
defaultSelection) (\s :: AudioSelector
s@AudioSelector' {} Maybe AudioDefaultSelection
a -> AudioSelector
s {$sel:defaultSelection:AudioSelector' :: Maybe AudioDefaultSelection
defaultSelection = Maybe AudioDefaultSelection
a} :: AudioSelector)
audioSelector_pids :: Lens.Lens' AudioSelector (Prelude.Maybe [Prelude.Natural])
audioSelector_pids :: (Maybe [Natural] -> f (Maybe [Natural]))
-> AudioSelector -> f AudioSelector
audioSelector_pids = (AudioSelector -> Maybe [Natural])
-> (AudioSelector -> Maybe [Natural] -> AudioSelector)
-> Lens
AudioSelector AudioSelector (Maybe [Natural]) (Maybe [Natural])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe [Natural]
pids :: Maybe [Natural]
$sel:pids:AudioSelector' :: AudioSelector -> Maybe [Natural]
pids} -> Maybe [Natural]
pids) (\s :: AudioSelector
s@AudioSelector' {} Maybe [Natural]
a -> AudioSelector
s {$sel:pids:AudioSelector' :: Maybe [Natural]
pids = Maybe [Natural]
a} :: AudioSelector) ((Maybe [Natural] -> f (Maybe [Natural]))
-> AudioSelector -> f AudioSelector)
-> ((Maybe [Natural] -> f (Maybe [Natural]))
-> Maybe [Natural] -> f (Maybe [Natural]))
-> (Maybe [Natural] -> f (Maybe [Natural]))
-> AudioSelector
-> f AudioSelector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Natural] [Natural] [Natural] [Natural]
-> Iso
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Natural] [Natural] [Natural] [Natural]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
audioSelector_hlsRenditionGroupSettings :: Lens.Lens' AudioSelector (Prelude.Maybe HlsRenditionGroupSettings)
audioSelector_hlsRenditionGroupSettings :: (Maybe HlsRenditionGroupSettings
-> f (Maybe HlsRenditionGroupSettings))
-> AudioSelector -> f AudioSelector
audioSelector_hlsRenditionGroupSettings = (AudioSelector -> Maybe HlsRenditionGroupSettings)
-> (AudioSelector
-> Maybe HlsRenditionGroupSettings -> AudioSelector)
-> Lens
AudioSelector
AudioSelector
(Maybe HlsRenditionGroupSettings)
(Maybe HlsRenditionGroupSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe HlsRenditionGroupSettings
hlsRenditionGroupSettings :: Maybe HlsRenditionGroupSettings
$sel:hlsRenditionGroupSettings:AudioSelector' :: AudioSelector -> Maybe HlsRenditionGroupSettings
hlsRenditionGroupSettings} -> Maybe HlsRenditionGroupSettings
hlsRenditionGroupSettings) (\s :: AudioSelector
s@AudioSelector' {} Maybe HlsRenditionGroupSettings
a -> AudioSelector
s {$sel:hlsRenditionGroupSettings:AudioSelector' :: Maybe HlsRenditionGroupSettings
hlsRenditionGroupSettings = Maybe HlsRenditionGroupSettings
a} :: AudioSelector)
audioSelector_selectorType :: Lens.Lens' AudioSelector (Prelude.Maybe AudioSelectorType)
audioSelector_selectorType :: (Maybe AudioSelectorType -> f (Maybe AudioSelectorType))
-> AudioSelector -> f AudioSelector
audioSelector_selectorType = (AudioSelector -> Maybe AudioSelectorType)
-> (AudioSelector -> Maybe AudioSelectorType -> AudioSelector)
-> Lens
AudioSelector
AudioSelector
(Maybe AudioSelectorType)
(Maybe AudioSelectorType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe AudioSelectorType
selectorType :: Maybe AudioSelectorType
$sel:selectorType:AudioSelector' :: AudioSelector -> Maybe AudioSelectorType
selectorType} -> Maybe AudioSelectorType
selectorType) (\s :: AudioSelector
s@AudioSelector' {} Maybe AudioSelectorType
a -> AudioSelector
s {$sel:selectorType:AudioSelector' :: Maybe AudioSelectorType
selectorType = Maybe AudioSelectorType
a} :: AudioSelector)
audioSelector_externalAudioFileInput :: Lens.Lens' AudioSelector (Prelude.Maybe Prelude.Text)
audioSelector_externalAudioFileInput :: (Maybe Text -> f (Maybe Text)) -> AudioSelector -> f AudioSelector
audioSelector_externalAudioFileInput = (AudioSelector -> Maybe Text)
-> (AudioSelector -> Maybe Text -> AudioSelector)
-> Lens AudioSelector AudioSelector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe Text
externalAudioFileInput :: Maybe Text
$sel:externalAudioFileInput:AudioSelector' :: AudioSelector -> Maybe Text
externalAudioFileInput} -> Maybe Text
externalAudioFileInput) (\s :: AudioSelector
s@AudioSelector' {} Maybe Text
a -> AudioSelector
s {$sel:externalAudioFileInput:AudioSelector' :: Maybe Text
externalAudioFileInput = Maybe Text
a} :: AudioSelector)
audioSelector_remixSettings :: Lens.Lens' AudioSelector (Prelude.Maybe RemixSettings)
audioSelector_remixSettings :: (Maybe RemixSettings -> f (Maybe RemixSettings))
-> AudioSelector -> f AudioSelector
audioSelector_remixSettings = (AudioSelector -> Maybe RemixSettings)
-> (AudioSelector -> Maybe RemixSettings -> AudioSelector)
-> Lens
AudioSelector
AudioSelector
(Maybe RemixSettings)
(Maybe RemixSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelector' {Maybe RemixSettings
remixSettings :: Maybe RemixSettings
$sel:remixSettings:AudioSelector' :: AudioSelector -> Maybe RemixSettings
remixSettings} -> Maybe RemixSettings
remixSettings) (\s :: AudioSelector
s@AudioSelector' {} Maybe RemixSettings
a -> AudioSelector
s {$sel:remixSettings:AudioSelector' :: Maybe RemixSettings
remixSettings = Maybe RemixSettings
a} :: AudioSelector)
instance Core.FromJSON AudioSelector where
parseJSON :: Value -> Parser AudioSelector
parseJSON =
String
-> (Object -> Parser AudioSelector)
-> Value
-> Parser AudioSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AudioSelector"
( \Object
x ->
Maybe [Natural]
-> Maybe Text
-> Maybe Natural
-> Maybe LanguageCode
-> Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector
AudioSelector'
(Maybe [Natural]
-> Maybe Text
-> Maybe Natural
-> Maybe LanguageCode
-> Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
-> Parser (Maybe [Natural])
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe LanguageCode
-> Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [Natural]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tracks" Parser (Maybe (Maybe [Natural]))
-> Maybe [Natural] -> Parser (Maybe [Natural])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Natural]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Natural
-> Maybe LanguageCode
-> Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe LanguageCode
-> Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
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
"customLanguageCode")
Parser
(Maybe Natural
-> Maybe LanguageCode
-> Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
-> Parser (Maybe Natural)
-> Parser
(Maybe LanguageCode
-> Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"programSelection")
Parser
(Maybe LanguageCode
-> Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
-> Parser (Maybe LanguageCode)
-> Parser
(Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LanguageCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"languageCode")
Parser
(Maybe Int
-> Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
-> Parser (Maybe Int)
-> Parser
(Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"offset")
Parser
(Maybe AudioDefaultSelection
-> Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
-> Parser (Maybe AudioDefaultSelection)
-> Parser
(Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AudioDefaultSelection)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"defaultSelection")
Parser
(Maybe [Natural]
-> Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
-> Parser (Maybe [Natural])
-> Parser
(Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Natural]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pids" Parser (Maybe (Maybe [Natural]))
-> Maybe [Natural] -> Parser (Maybe [Natural])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Natural]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe HlsRenditionGroupSettings
-> Maybe AudioSelectorType
-> Maybe Text
-> Maybe RemixSettings
-> AudioSelector)
-> Parser (Maybe HlsRenditionGroupSettings)
-> Parser
(Maybe AudioSelectorType
-> Maybe Text -> Maybe RemixSettings -> AudioSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsRenditionGroupSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hlsRenditionGroupSettings")
Parser
(Maybe AudioSelectorType
-> Maybe Text -> Maybe RemixSettings -> AudioSelector)
-> Parser (Maybe AudioSelectorType)
-> Parser (Maybe Text -> Maybe RemixSettings -> AudioSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AudioSelectorType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"selectorType")
Parser (Maybe Text -> Maybe RemixSettings -> AudioSelector)
-> Parser (Maybe Text)
-> Parser (Maybe RemixSettings -> AudioSelector)
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
"externalAudioFileInput")
Parser (Maybe RemixSettings -> AudioSelector)
-> Parser (Maybe RemixSettings) -> Parser AudioSelector
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")
)
instance Prelude.Hashable AudioSelector
instance Prelude.NFData AudioSelector
instance Core.ToJSON AudioSelector where
toJSON :: AudioSelector -> Value
toJSON AudioSelector' {Maybe Int
Maybe Natural
Maybe [Natural]
Maybe Text
Maybe AudioDefaultSelection
Maybe AudioSelectorType
Maybe LanguageCode
Maybe HlsRenditionGroupSettings
Maybe RemixSettings
remixSettings :: Maybe RemixSettings
externalAudioFileInput :: Maybe Text
selectorType :: Maybe AudioSelectorType
hlsRenditionGroupSettings :: Maybe HlsRenditionGroupSettings
pids :: Maybe [Natural]
defaultSelection :: Maybe AudioDefaultSelection
offset :: Maybe Int
languageCode :: Maybe LanguageCode
programSelection :: Maybe Natural
customLanguageCode :: Maybe Text
tracks :: Maybe [Natural]
$sel:remixSettings:AudioSelector' :: AudioSelector -> Maybe RemixSettings
$sel:externalAudioFileInput:AudioSelector' :: AudioSelector -> Maybe Text
$sel:selectorType:AudioSelector' :: AudioSelector -> Maybe AudioSelectorType
$sel:hlsRenditionGroupSettings:AudioSelector' :: AudioSelector -> Maybe HlsRenditionGroupSettings
$sel:pids:AudioSelector' :: AudioSelector -> Maybe [Natural]
$sel:defaultSelection:AudioSelector' :: AudioSelector -> Maybe AudioDefaultSelection
$sel:offset:AudioSelector' :: AudioSelector -> Maybe Int
$sel:languageCode:AudioSelector' :: AudioSelector -> Maybe LanguageCode
$sel:programSelection:AudioSelector' :: AudioSelector -> Maybe Natural
$sel:customLanguageCode:AudioSelector' :: AudioSelector -> Maybe Text
$sel:tracks:AudioSelector' :: AudioSelector -> Maybe [Natural]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"tracks" Text -> [Natural] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Natural] -> Pair) -> Maybe [Natural] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Natural]
tracks,
(Text
"customLanguageCode" 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
customLanguageCode,
(Text
"programSelection" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
programSelection,
(Text
"languageCode" Text -> LanguageCode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LanguageCode -> Pair) -> Maybe LanguageCode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LanguageCode
languageCode,
(Text
"offset" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
offset,
(Text
"defaultSelection" Text -> AudioDefaultSelection -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AudioDefaultSelection -> Pair)
-> Maybe AudioDefaultSelection -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AudioDefaultSelection
defaultSelection,
(Text
"pids" Text -> [Natural] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Natural] -> Pair) -> Maybe [Natural] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Natural]
pids,
(Text
"hlsRenditionGroupSettings" Text -> HlsRenditionGroupSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HlsRenditionGroupSettings -> Pair)
-> Maybe HlsRenditionGroupSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsRenditionGroupSettings
hlsRenditionGroupSettings,
(Text
"selectorType" Text -> AudioSelectorType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AudioSelectorType -> Pair)
-> Maybe AudioSelectorType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AudioSelectorType
selectorType,
(Text
"externalAudioFileInput" 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
externalAudioFileInput,
(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
]
)