{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaLive.Types.GlobalConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Global Configuration
--
-- /See:/ 'newGlobalConfiguration' smart constructor.
data GlobalConfiguration = GlobalConfiguration'
  { -- | Value to set the initial audio gain for the Live Event.
    GlobalConfiguration -> Maybe Int
initialAudioGain :: Prelude.Maybe Prelude.Int,
    -- | Indicates the action to take when the current input completes (e.g.
    -- end-of-file). When switchAndLoopInputs is configured the encoder will
    -- restart at the beginning of the first input. When \"none\" is configured
    -- the encoder will transcode either black, a solid color, or a user
    -- specified slate images per the \"Input Loss Behavior\" configuration
    -- until the next input switch occurs (which is controlled through the
    -- Channel Schedule API).
    GlobalConfiguration -> Maybe GlobalConfigurationInputEndAction
inputEndAction :: Prelude.Maybe GlobalConfigurationInputEndAction,
    -- | Settings for system actions when input is lost.
    GlobalConfiguration -> Maybe InputLossBehavior
inputLossBehavior :: Prelude.Maybe InputLossBehavior,
    -- | Indicates how MediaLive pipelines are synchronized. PIPELINE_LOCKING -
    -- MediaLive will attempt to synchronize the output of each pipeline to the
    -- other. EPOCH_LOCKING - MediaLive will attempt to synchronize the output
    -- of each pipeline to the Unix epoch.
    GlobalConfiguration -> Maybe GlobalConfigurationOutputLockingMode
outputLockingMode :: Prelude.Maybe GlobalConfigurationOutputLockingMode,
    -- | Indicates whether the rate of frames emitted by the Live encoder should
    -- be paced by its system clock (which optionally may be locked to another
    -- source via NTP) or should be locked to the clock of the source that is
    -- providing the input stream.
    GlobalConfiguration -> Maybe GlobalConfigurationOutputTimingSource
outputTimingSource :: Prelude.Maybe GlobalConfigurationOutputTimingSource,
    -- | Adjusts video input buffer for streams with very low video framerates.
    -- This is commonly set to enabled for music channels with less than one
    -- video frame per second.
    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)

-- |
-- Create a value of 'GlobalConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'initialAudioGain', 'globalConfiguration_initialAudioGain' - Value to set the initial audio gain for the Live Event.
--
-- 'inputEndAction', 'globalConfiguration_inputEndAction' - Indicates the action to take when the current input completes (e.g.
-- end-of-file). When switchAndLoopInputs is configured the encoder will
-- restart at the beginning of the first input. When \"none\" is configured
-- the encoder will transcode either black, a solid color, or a user
-- specified slate images per the \"Input Loss Behavior\" configuration
-- until the next input switch occurs (which is controlled through the
-- Channel Schedule API).
--
-- 'inputLossBehavior', 'globalConfiguration_inputLossBehavior' - Settings for system actions when input is lost.
--
-- 'outputLockingMode', 'globalConfiguration_outputLockingMode' - Indicates how MediaLive pipelines are synchronized. PIPELINE_LOCKING -
-- MediaLive will attempt to synchronize the output of each pipeline to the
-- other. EPOCH_LOCKING - MediaLive will attempt to synchronize the output
-- of each pipeline to the Unix epoch.
--
-- 'outputTimingSource', 'globalConfiguration_outputTimingSource' - Indicates whether the rate of frames emitted by the Live encoder should
-- be paced by its system clock (which optionally may be locked to another
-- source via NTP) or should be locked to the clock of the source that is
-- providing the input stream.
--
-- 'supportLowFramerateInputs', 'globalConfiguration_supportLowFramerateInputs' - Adjusts video input buffer for streams with very low video framerates.
-- This is commonly set to enabled for music channels with less than one
-- video frame per second.
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
    }

-- | Value to set the initial audio gain for the Live Event.
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)

-- | Indicates the action to take when the current input completes (e.g.
-- end-of-file). When switchAndLoopInputs is configured the encoder will
-- restart at the beginning of the first input. When \"none\" is configured
-- the encoder will transcode either black, a solid color, or a user
-- specified slate images per the \"Input Loss Behavior\" configuration
-- until the next input switch occurs (which is controlled through the
-- Channel Schedule API).
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)

-- | Settings for system actions when input is lost.
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)

-- | Indicates how MediaLive pipelines are synchronized. PIPELINE_LOCKING -
-- MediaLive will attempt to synchronize the output of each pipeline to the
-- other. EPOCH_LOCKING - MediaLive will attempt to synchronize the output
-- of each pipeline to the Unix epoch.
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)

-- | Indicates whether the rate of frames emitted by the Live encoder should
-- be paced by its system clock (which optionally may be locked to another
-- source via NTP) or should be locked to the clock of the source that is
-- providing the input stream.
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)

-- | Adjusts video input buffer for streams with very low video framerates.
-- This is commonly set to enabled for music channels with less than one
-- video frame per second.
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
          ]
      )