{-# 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.AudioSelectorSettings 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.AudioHlsRenditionSelection
import Amazonka.MediaLive.Types.AudioLanguageSelection
import Amazonka.MediaLive.Types.AudioPidSelection
import Amazonka.MediaLive.Types.AudioTrackSelection
import qualified Amazonka.Prelude as Prelude
data AudioSelectorSettings = AudioSelectorSettings'
{ AudioSelectorSettings -> Maybe AudioHlsRenditionSelection
audioHlsRenditionSelection :: Prelude.Maybe AudioHlsRenditionSelection,
AudioSelectorSettings -> Maybe AudioLanguageSelection
audioLanguageSelection :: Prelude.Maybe AudioLanguageSelection,
AudioSelectorSettings -> Maybe AudioPidSelection
audioPidSelection :: Prelude.Maybe AudioPidSelection,
AudioSelectorSettings -> Maybe AudioTrackSelection
audioTrackSelection :: Prelude.Maybe AudioTrackSelection
}
deriving (AudioSelectorSettings -> AudioSelectorSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioSelectorSettings -> AudioSelectorSettings -> Bool
$c/= :: AudioSelectorSettings -> AudioSelectorSettings -> Bool
== :: AudioSelectorSettings -> AudioSelectorSettings -> Bool
$c== :: AudioSelectorSettings -> AudioSelectorSettings -> Bool
Prelude.Eq, ReadPrec [AudioSelectorSettings]
ReadPrec AudioSelectorSettings
Int -> ReadS AudioSelectorSettings
ReadS [AudioSelectorSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AudioSelectorSettings]
$creadListPrec :: ReadPrec [AudioSelectorSettings]
readPrec :: ReadPrec AudioSelectorSettings
$creadPrec :: ReadPrec AudioSelectorSettings
readList :: ReadS [AudioSelectorSettings]
$creadList :: ReadS [AudioSelectorSettings]
readsPrec :: Int -> ReadS AudioSelectorSettings
$creadsPrec :: Int -> ReadS AudioSelectorSettings
Prelude.Read, Int -> AudioSelectorSettings -> ShowS
[AudioSelectorSettings] -> ShowS
AudioSelectorSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AudioSelectorSettings] -> ShowS
$cshowList :: [AudioSelectorSettings] -> ShowS
show :: AudioSelectorSettings -> String
$cshow :: AudioSelectorSettings -> String
showsPrec :: Int -> AudioSelectorSettings -> ShowS
$cshowsPrec :: Int -> AudioSelectorSettings -> ShowS
Prelude.Show, forall x. Rep AudioSelectorSettings x -> AudioSelectorSettings
forall x. AudioSelectorSettings -> Rep AudioSelectorSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AudioSelectorSettings x -> AudioSelectorSettings
$cfrom :: forall x. AudioSelectorSettings -> Rep AudioSelectorSettings x
Prelude.Generic)
newAudioSelectorSettings ::
AudioSelectorSettings
newAudioSelectorSettings :: AudioSelectorSettings
newAudioSelectorSettings =
AudioSelectorSettings'
{ $sel:audioHlsRenditionSelection:AudioSelectorSettings' :: Maybe AudioHlsRenditionSelection
audioHlsRenditionSelection =
forall a. Maybe a
Prelude.Nothing,
$sel:audioLanguageSelection:AudioSelectorSettings' :: Maybe AudioLanguageSelection
audioLanguageSelection = forall a. Maybe a
Prelude.Nothing,
$sel:audioPidSelection:AudioSelectorSettings' :: Maybe AudioPidSelection
audioPidSelection = forall a. Maybe a
Prelude.Nothing,
$sel:audioTrackSelection:AudioSelectorSettings' :: Maybe AudioTrackSelection
audioTrackSelection = forall a. Maybe a
Prelude.Nothing
}
audioSelectorSettings_audioHlsRenditionSelection :: Lens.Lens' AudioSelectorSettings (Prelude.Maybe AudioHlsRenditionSelection)
audioSelectorSettings_audioHlsRenditionSelection :: Lens' AudioSelectorSettings (Maybe AudioHlsRenditionSelection)
audioSelectorSettings_audioHlsRenditionSelection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelectorSettings' {Maybe AudioHlsRenditionSelection
audioHlsRenditionSelection :: Maybe AudioHlsRenditionSelection
$sel:audioHlsRenditionSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioHlsRenditionSelection
audioHlsRenditionSelection} -> Maybe AudioHlsRenditionSelection
audioHlsRenditionSelection) (\s :: AudioSelectorSettings
s@AudioSelectorSettings' {} Maybe AudioHlsRenditionSelection
a -> AudioSelectorSettings
s {$sel:audioHlsRenditionSelection:AudioSelectorSettings' :: Maybe AudioHlsRenditionSelection
audioHlsRenditionSelection = Maybe AudioHlsRenditionSelection
a} :: AudioSelectorSettings)
audioSelectorSettings_audioLanguageSelection :: Lens.Lens' AudioSelectorSettings (Prelude.Maybe AudioLanguageSelection)
audioSelectorSettings_audioLanguageSelection :: Lens' AudioSelectorSettings (Maybe AudioLanguageSelection)
audioSelectorSettings_audioLanguageSelection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelectorSettings' {Maybe AudioLanguageSelection
audioLanguageSelection :: Maybe AudioLanguageSelection
$sel:audioLanguageSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioLanguageSelection
audioLanguageSelection} -> Maybe AudioLanguageSelection
audioLanguageSelection) (\s :: AudioSelectorSettings
s@AudioSelectorSettings' {} Maybe AudioLanguageSelection
a -> AudioSelectorSettings
s {$sel:audioLanguageSelection:AudioSelectorSettings' :: Maybe AudioLanguageSelection
audioLanguageSelection = Maybe AudioLanguageSelection
a} :: AudioSelectorSettings)
audioSelectorSettings_audioPidSelection :: Lens.Lens' AudioSelectorSettings (Prelude.Maybe AudioPidSelection)
audioSelectorSettings_audioPidSelection :: Lens' AudioSelectorSettings (Maybe AudioPidSelection)
audioSelectorSettings_audioPidSelection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelectorSettings' {Maybe AudioPidSelection
audioPidSelection :: Maybe AudioPidSelection
$sel:audioPidSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioPidSelection
audioPidSelection} -> Maybe AudioPidSelection
audioPidSelection) (\s :: AudioSelectorSettings
s@AudioSelectorSettings' {} Maybe AudioPidSelection
a -> AudioSelectorSettings
s {$sel:audioPidSelection:AudioSelectorSettings' :: Maybe AudioPidSelection
audioPidSelection = Maybe AudioPidSelection
a} :: AudioSelectorSettings)
audioSelectorSettings_audioTrackSelection :: Lens.Lens' AudioSelectorSettings (Prelude.Maybe AudioTrackSelection)
audioSelectorSettings_audioTrackSelection :: Lens' AudioSelectorSettings (Maybe AudioTrackSelection)
audioSelectorSettings_audioTrackSelection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelectorSettings' {Maybe AudioTrackSelection
audioTrackSelection :: Maybe AudioTrackSelection
$sel:audioTrackSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioTrackSelection
audioTrackSelection} -> Maybe AudioTrackSelection
audioTrackSelection) (\s :: AudioSelectorSettings
s@AudioSelectorSettings' {} Maybe AudioTrackSelection
a -> AudioSelectorSettings
s {$sel:audioTrackSelection:AudioSelectorSettings' :: Maybe AudioTrackSelection
audioTrackSelection = Maybe AudioTrackSelection
a} :: AudioSelectorSettings)
instance Data.FromJSON AudioSelectorSettings where
parseJSON :: Value -> Parser AudioSelectorSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AudioSelectorSettings"
( \Object
x ->
Maybe AudioHlsRenditionSelection
-> Maybe AudioLanguageSelection
-> Maybe AudioPidSelection
-> Maybe AudioTrackSelection
-> AudioSelectorSettings
AudioSelectorSettings'
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
"audioHlsRenditionSelection")
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
"audioLanguageSelection")
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
"audioPidSelection")
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
"audioTrackSelection")
)
instance Prelude.Hashable AudioSelectorSettings where
hashWithSalt :: Int -> AudioSelectorSettings -> Int
hashWithSalt Int
_salt AudioSelectorSettings' {Maybe AudioHlsRenditionSelection
Maybe AudioLanguageSelection
Maybe AudioPidSelection
Maybe AudioTrackSelection
audioTrackSelection :: Maybe AudioTrackSelection
audioPidSelection :: Maybe AudioPidSelection
audioLanguageSelection :: Maybe AudioLanguageSelection
audioHlsRenditionSelection :: Maybe AudioHlsRenditionSelection
$sel:audioTrackSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioTrackSelection
$sel:audioPidSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioPidSelection
$sel:audioLanguageSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioLanguageSelection
$sel:audioHlsRenditionSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioHlsRenditionSelection
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AudioHlsRenditionSelection
audioHlsRenditionSelection
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AudioLanguageSelection
audioLanguageSelection
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AudioPidSelection
audioPidSelection
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AudioTrackSelection
audioTrackSelection
instance Prelude.NFData AudioSelectorSettings where
rnf :: AudioSelectorSettings -> ()
rnf AudioSelectorSettings' {Maybe AudioHlsRenditionSelection
Maybe AudioLanguageSelection
Maybe AudioPidSelection
Maybe AudioTrackSelection
audioTrackSelection :: Maybe AudioTrackSelection
audioPidSelection :: Maybe AudioPidSelection
audioLanguageSelection :: Maybe AudioLanguageSelection
audioHlsRenditionSelection :: Maybe AudioHlsRenditionSelection
$sel:audioTrackSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioTrackSelection
$sel:audioPidSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioPidSelection
$sel:audioLanguageSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioLanguageSelection
$sel:audioHlsRenditionSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioHlsRenditionSelection
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AudioHlsRenditionSelection
audioHlsRenditionSelection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AudioLanguageSelection
audioLanguageSelection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AudioPidSelection
audioPidSelection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AudioTrackSelection
audioTrackSelection
instance Data.ToJSON AudioSelectorSettings where
toJSON :: AudioSelectorSettings -> Value
toJSON AudioSelectorSettings' {Maybe AudioHlsRenditionSelection
Maybe AudioLanguageSelection
Maybe AudioPidSelection
Maybe AudioTrackSelection
audioTrackSelection :: Maybe AudioTrackSelection
audioPidSelection :: Maybe AudioPidSelection
audioLanguageSelection :: Maybe AudioLanguageSelection
audioHlsRenditionSelection :: Maybe AudioHlsRenditionSelection
$sel:audioTrackSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioTrackSelection
$sel:audioPidSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioPidSelection
$sel:audioLanguageSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioLanguageSelection
$sel:audioHlsRenditionSelection:AudioSelectorSettings' :: AudioSelectorSettings -> Maybe AudioHlsRenditionSelection
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"audioHlsRenditionSelection" 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 AudioHlsRenditionSelection
audioHlsRenditionSelection,
(Key
"audioLanguageSelection" 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 AudioLanguageSelection
audioLanguageSelection,
(Key
"audioPidSelection" 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 AudioPidSelection
audioPidSelection,
(Key
"audioTrackSelection" 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 AudioTrackSelection
audioTrackSelection
]
)