{-# 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.GlobalConfiguration 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.GlobalConfigurationInputEndAction
import Amazonka.MediaLive.Types.GlobalConfigurationLowFramerateInputs
import Amazonka.MediaLive.Types.GlobalConfigurationOutputLockingMode
import Amazonka.MediaLive.Types.GlobalConfigurationOutputTimingSource
import Amazonka.MediaLive.Types.InputLossBehavior
import qualified Amazonka.Prelude as Prelude
data GlobalConfiguration = GlobalConfiguration'
{
GlobalConfiguration -> Maybe Int
initialAudioGain :: Prelude.Maybe Prelude.Int,
GlobalConfiguration -> Maybe GlobalConfigurationInputEndAction
inputEndAction :: Prelude.Maybe GlobalConfigurationInputEndAction,
GlobalConfiguration -> Maybe InputLossBehavior
inputLossBehavior :: Prelude.Maybe InputLossBehavior,
GlobalConfiguration -> Maybe GlobalConfigurationOutputLockingMode
outputLockingMode :: Prelude.Maybe GlobalConfigurationOutputLockingMode,
GlobalConfiguration -> Maybe GlobalConfigurationOutputTimingSource
outputTimingSource :: Prelude.Maybe GlobalConfigurationOutputTimingSource,
GlobalConfiguration -> Maybe GlobalConfigurationLowFramerateInputs
supportLowFramerateInputs :: Prelude.Maybe GlobalConfigurationLowFramerateInputs
}
deriving (GlobalConfiguration -> GlobalConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlobalConfiguration -> GlobalConfiguration -> Bool
$c/= :: GlobalConfiguration -> GlobalConfiguration -> Bool
== :: GlobalConfiguration -> GlobalConfiguration -> Bool
$c== :: GlobalConfiguration -> GlobalConfiguration -> Bool
Prelude.Eq, ReadPrec [GlobalConfiguration]
ReadPrec GlobalConfiguration
Int -> ReadS GlobalConfiguration
ReadS [GlobalConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlobalConfiguration]
$creadListPrec :: ReadPrec [GlobalConfiguration]
readPrec :: ReadPrec GlobalConfiguration
$creadPrec :: ReadPrec GlobalConfiguration
readList :: ReadS [GlobalConfiguration]
$creadList :: ReadS [GlobalConfiguration]
readsPrec :: Int -> ReadS GlobalConfiguration
$creadsPrec :: Int -> ReadS GlobalConfiguration
Prelude.Read, Int -> GlobalConfiguration -> ShowS
[GlobalConfiguration] -> ShowS
GlobalConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlobalConfiguration] -> ShowS
$cshowList :: [GlobalConfiguration] -> ShowS
show :: GlobalConfiguration -> String
$cshow :: GlobalConfiguration -> String
showsPrec :: Int -> GlobalConfiguration -> ShowS
$cshowsPrec :: Int -> GlobalConfiguration -> ShowS
Prelude.Show, forall x. Rep GlobalConfiguration x -> GlobalConfiguration
forall x. GlobalConfiguration -> Rep GlobalConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GlobalConfiguration x -> GlobalConfiguration
$cfrom :: forall x. GlobalConfiguration -> Rep GlobalConfiguration x
Prelude.Generic)
newGlobalConfiguration ::
GlobalConfiguration
newGlobalConfiguration :: GlobalConfiguration
newGlobalConfiguration =
GlobalConfiguration'
{ $sel:initialAudioGain:GlobalConfiguration' :: Maybe Int
initialAudioGain =
forall a. Maybe a
Prelude.Nothing,
$sel:inputEndAction:GlobalConfiguration' :: Maybe GlobalConfigurationInputEndAction
inputEndAction = forall a. Maybe a
Prelude.Nothing,
$sel:inputLossBehavior:GlobalConfiguration' :: Maybe InputLossBehavior
inputLossBehavior = forall a. Maybe a
Prelude.Nothing,
$sel:outputLockingMode:GlobalConfiguration' :: Maybe GlobalConfigurationOutputLockingMode
outputLockingMode = forall a. Maybe a
Prelude.Nothing,
$sel:outputTimingSource:GlobalConfiguration' :: Maybe GlobalConfigurationOutputTimingSource
outputTimingSource = forall a. Maybe a
Prelude.Nothing,
$sel:supportLowFramerateInputs:GlobalConfiguration' :: Maybe GlobalConfigurationLowFramerateInputs
supportLowFramerateInputs = forall a. Maybe a
Prelude.Nothing
}
globalConfiguration_initialAudioGain :: Lens.Lens' GlobalConfiguration (Prelude.Maybe Prelude.Int)
globalConfiguration_initialAudioGain :: Lens' GlobalConfiguration (Maybe Int)
globalConfiguration_initialAudioGain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalConfiguration' {Maybe Int
initialAudioGain :: Maybe Int
$sel:initialAudioGain:GlobalConfiguration' :: GlobalConfiguration -> Maybe Int
initialAudioGain} -> Maybe Int
initialAudioGain) (\s :: GlobalConfiguration
s@GlobalConfiguration' {} Maybe Int
a -> GlobalConfiguration
s {$sel:initialAudioGain:GlobalConfiguration' :: Maybe Int
initialAudioGain = Maybe Int
a} :: GlobalConfiguration)
globalConfiguration_inputEndAction :: Lens.Lens' GlobalConfiguration (Prelude.Maybe GlobalConfigurationInputEndAction)
globalConfiguration_inputEndAction :: Lens' GlobalConfiguration (Maybe GlobalConfigurationInputEndAction)
globalConfiguration_inputEndAction = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalConfiguration' {Maybe GlobalConfigurationInputEndAction
inputEndAction :: Maybe GlobalConfigurationInputEndAction
$sel:inputEndAction:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationInputEndAction
inputEndAction} -> Maybe GlobalConfigurationInputEndAction
inputEndAction) (\s :: GlobalConfiguration
s@GlobalConfiguration' {} Maybe GlobalConfigurationInputEndAction
a -> GlobalConfiguration
s {$sel:inputEndAction:GlobalConfiguration' :: Maybe GlobalConfigurationInputEndAction
inputEndAction = Maybe GlobalConfigurationInputEndAction
a} :: GlobalConfiguration)
globalConfiguration_inputLossBehavior :: Lens.Lens' GlobalConfiguration (Prelude.Maybe InputLossBehavior)
globalConfiguration_inputLossBehavior :: Lens' GlobalConfiguration (Maybe InputLossBehavior)
globalConfiguration_inputLossBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalConfiguration' {Maybe InputLossBehavior
inputLossBehavior :: Maybe InputLossBehavior
$sel:inputLossBehavior:GlobalConfiguration' :: GlobalConfiguration -> Maybe InputLossBehavior
inputLossBehavior} -> Maybe InputLossBehavior
inputLossBehavior) (\s :: GlobalConfiguration
s@GlobalConfiguration' {} Maybe InputLossBehavior
a -> GlobalConfiguration
s {$sel:inputLossBehavior:GlobalConfiguration' :: Maybe InputLossBehavior
inputLossBehavior = Maybe InputLossBehavior
a} :: GlobalConfiguration)
globalConfiguration_outputLockingMode :: Lens.Lens' GlobalConfiguration (Prelude.Maybe GlobalConfigurationOutputLockingMode)
globalConfiguration_outputLockingMode :: Lens'
GlobalConfiguration (Maybe GlobalConfigurationOutputLockingMode)
globalConfiguration_outputLockingMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalConfiguration' {Maybe GlobalConfigurationOutputLockingMode
outputLockingMode :: Maybe GlobalConfigurationOutputLockingMode
$sel:outputLockingMode:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationOutputLockingMode
outputLockingMode} -> Maybe GlobalConfigurationOutputLockingMode
outputLockingMode) (\s :: GlobalConfiguration
s@GlobalConfiguration' {} Maybe GlobalConfigurationOutputLockingMode
a -> GlobalConfiguration
s {$sel:outputLockingMode:GlobalConfiguration' :: Maybe GlobalConfigurationOutputLockingMode
outputLockingMode = Maybe GlobalConfigurationOutputLockingMode
a} :: GlobalConfiguration)
globalConfiguration_outputTimingSource :: Lens.Lens' GlobalConfiguration (Prelude.Maybe GlobalConfigurationOutputTimingSource)
globalConfiguration_outputTimingSource :: Lens'
GlobalConfiguration (Maybe GlobalConfigurationOutputTimingSource)
globalConfiguration_outputTimingSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalConfiguration' {Maybe GlobalConfigurationOutputTimingSource
outputTimingSource :: Maybe GlobalConfigurationOutputTimingSource
$sel:outputTimingSource:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationOutputTimingSource
outputTimingSource} -> Maybe GlobalConfigurationOutputTimingSource
outputTimingSource) (\s :: GlobalConfiguration
s@GlobalConfiguration' {} Maybe GlobalConfigurationOutputTimingSource
a -> GlobalConfiguration
s {$sel:outputTimingSource:GlobalConfiguration' :: Maybe GlobalConfigurationOutputTimingSource
outputTimingSource = Maybe GlobalConfigurationOutputTimingSource
a} :: GlobalConfiguration)
globalConfiguration_supportLowFramerateInputs :: Lens.Lens' GlobalConfiguration (Prelude.Maybe GlobalConfigurationLowFramerateInputs)
globalConfiguration_supportLowFramerateInputs :: Lens'
GlobalConfiguration (Maybe GlobalConfigurationLowFramerateInputs)
globalConfiguration_supportLowFramerateInputs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalConfiguration' {Maybe GlobalConfigurationLowFramerateInputs
supportLowFramerateInputs :: Maybe GlobalConfigurationLowFramerateInputs
$sel:supportLowFramerateInputs:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationLowFramerateInputs
supportLowFramerateInputs} -> Maybe GlobalConfigurationLowFramerateInputs
supportLowFramerateInputs) (\s :: GlobalConfiguration
s@GlobalConfiguration' {} Maybe GlobalConfigurationLowFramerateInputs
a -> GlobalConfiguration
s {$sel:supportLowFramerateInputs:GlobalConfiguration' :: Maybe GlobalConfigurationLowFramerateInputs
supportLowFramerateInputs = Maybe GlobalConfigurationLowFramerateInputs
a} :: GlobalConfiguration)
instance Data.FromJSON GlobalConfiguration where
parseJSON :: Value -> Parser GlobalConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"GlobalConfiguration"
( \Object
x ->
Maybe Int
-> Maybe GlobalConfigurationInputEndAction
-> Maybe InputLossBehavior
-> Maybe GlobalConfigurationOutputLockingMode
-> Maybe GlobalConfigurationOutputTimingSource
-> Maybe GlobalConfigurationLowFramerateInputs
-> GlobalConfiguration
GlobalConfiguration'
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
"initialAudioGain")
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
"inputEndAction")
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
"inputLossBehavior")
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
"outputLockingMode")
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
"outputTimingSource")
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
"supportLowFramerateInputs")
)
instance Prelude.Hashable GlobalConfiguration where
hashWithSalt :: Int -> GlobalConfiguration -> Int
hashWithSalt Int
_salt GlobalConfiguration' {Maybe Int
Maybe GlobalConfigurationInputEndAction
Maybe GlobalConfigurationLowFramerateInputs
Maybe GlobalConfigurationOutputLockingMode
Maybe GlobalConfigurationOutputTimingSource
Maybe InputLossBehavior
supportLowFramerateInputs :: Maybe GlobalConfigurationLowFramerateInputs
outputTimingSource :: Maybe GlobalConfigurationOutputTimingSource
outputLockingMode :: Maybe GlobalConfigurationOutputLockingMode
inputLossBehavior :: Maybe InputLossBehavior
inputEndAction :: Maybe GlobalConfigurationInputEndAction
initialAudioGain :: Maybe Int
$sel:supportLowFramerateInputs:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationLowFramerateInputs
$sel:outputTimingSource:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationOutputTimingSource
$sel:outputLockingMode:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationOutputLockingMode
$sel:inputLossBehavior:GlobalConfiguration' :: GlobalConfiguration -> Maybe InputLossBehavior
$sel:inputEndAction:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationInputEndAction
$sel:initialAudioGain:GlobalConfiguration' :: GlobalConfiguration -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
initialAudioGain
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GlobalConfigurationInputEndAction
inputEndAction
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputLossBehavior
inputLossBehavior
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GlobalConfigurationOutputLockingMode
outputLockingMode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GlobalConfigurationOutputTimingSource
outputTimingSource
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GlobalConfigurationLowFramerateInputs
supportLowFramerateInputs
instance Prelude.NFData GlobalConfiguration where
rnf :: GlobalConfiguration -> ()
rnf GlobalConfiguration' {Maybe Int
Maybe GlobalConfigurationInputEndAction
Maybe GlobalConfigurationLowFramerateInputs
Maybe GlobalConfigurationOutputLockingMode
Maybe GlobalConfigurationOutputTimingSource
Maybe InputLossBehavior
supportLowFramerateInputs :: Maybe GlobalConfigurationLowFramerateInputs
outputTimingSource :: Maybe GlobalConfigurationOutputTimingSource
outputLockingMode :: Maybe GlobalConfigurationOutputLockingMode
inputLossBehavior :: Maybe InputLossBehavior
inputEndAction :: Maybe GlobalConfigurationInputEndAction
initialAudioGain :: Maybe Int
$sel:supportLowFramerateInputs:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationLowFramerateInputs
$sel:outputTimingSource:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationOutputTimingSource
$sel:outputLockingMode:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationOutputLockingMode
$sel:inputLossBehavior:GlobalConfiguration' :: GlobalConfiguration -> Maybe InputLossBehavior
$sel:inputEndAction:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationInputEndAction
$sel:initialAudioGain:GlobalConfiguration' :: GlobalConfiguration -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
initialAudioGain
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe GlobalConfigurationInputEndAction
inputEndAction
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputLossBehavior
inputLossBehavior
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe GlobalConfigurationOutputLockingMode
outputLockingMode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe GlobalConfigurationOutputTimingSource
outputTimingSource
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe GlobalConfigurationLowFramerateInputs
supportLowFramerateInputs
instance Data.ToJSON GlobalConfiguration where
toJSON :: GlobalConfiguration -> Value
toJSON GlobalConfiguration' {Maybe Int
Maybe GlobalConfigurationInputEndAction
Maybe GlobalConfigurationLowFramerateInputs
Maybe GlobalConfigurationOutputLockingMode
Maybe GlobalConfigurationOutputTimingSource
Maybe InputLossBehavior
supportLowFramerateInputs :: Maybe GlobalConfigurationLowFramerateInputs
outputTimingSource :: Maybe GlobalConfigurationOutputTimingSource
outputLockingMode :: Maybe GlobalConfigurationOutputLockingMode
inputLossBehavior :: Maybe InputLossBehavior
inputEndAction :: Maybe GlobalConfigurationInputEndAction
initialAudioGain :: Maybe Int
$sel:supportLowFramerateInputs:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationLowFramerateInputs
$sel:outputTimingSource:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationOutputTimingSource
$sel:outputLockingMode:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationOutputLockingMode
$sel:inputLossBehavior:GlobalConfiguration' :: GlobalConfiguration -> Maybe InputLossBehavior
$sel:inputEndAction:GlobalConfiguration' :: GlobalConfiguration -> Maybe GlobalConfigurationInputEndAction
$sel:initialAudioGain:GlobalConfiguration' :: GlobalConfiguration -> Maybe Int
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"initialAudioGain" 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 Int
initialAudioGain,
(Key
"inputEndAction" 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 GlobalConfigurationInputEndAction
inputEndAction,
(Key
"inputLossBehavior" 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 InputLossBehavior
inputLossBehavior,
(Key
"outputLockingMode" 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 GlobalConfigurationOutputLockingMode
outputLockingMode,
(Key
"outputTimingSource" 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 GlobalConfigurationOutputTimingSource
outputTimingSource,
(Key
"supportLowFramerateInputs" 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 GlobalConfigurationLowFramerateInputs
supportLowFramerateInputs
]
)