{-# 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.RtmpGroupSettings
-- 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.RtmpGroupSettings 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.AuthenticationScheme
import Amazonka.MediaLive.Types.InputLossActionForRtmpOut
import Amazonka.MediaLive.Types.RtmpAdMarkers
import Amazonka.MediaLive.Types.RtmpCacheFullBehavior
import Amazonka.MediaLive.Types.RtmpCaptionData
import qualified Amazonka.Prelude as Prelude

-- | Rtmp Group Settings
--
-- /See:/ 'newRtmpGroupSettings' smart constructor.
data RtmpGroupSettings = RtmpGroupSettings'
  { -- | Choose the ad marker type for this output group. MediaLive will create a
    -- message based on the content of each SCTE-35 message, format it for that
    -- marker type, and insert it in the datastream.
    RtmpGroupSettings -> Maybe [RtmpAdMarkers]
adMarkers :: Prelude.Maybe [RtmpAdMarkers],
    -- | Authentication scheme to use when connecting with CDN
    RtmpGroupSettings -> Maybe AuthenticationScheme
authenticationScheme :: Prelude.Maybe AuthenticationScheme,
    -- | Controls behavior when content cache fills up. If remote origin server
    -- stalls the RTMP connection and does not accept content fast enough the
    -- \'Media Cache\' will fill up. When the cache reaches the duration
    -- specified by cacheLength the cache will stop accepting new content. If
    -- set to disconnectImmediately, the RTMP output will force a disconnect.
    -- Clear the media cache, and reconnect after restartDelay seconds. If set
    -- to waitForServer, the RTMP output will wait up to 5 minutes to allow the
    -- origin server to begin accepting data again.
    RtmpGroupSettings -> Maybe RtmpCacheFullBehavior
cacheFullBehavior :: Prelude.Maybe RtmpCacheFullBehavior,
    -- | Cache length, in seconds, is used to calculate buffer size.
    RtmpGroupSettings -> Maybe Natural
cacheLength :: Prelude.Maybe Prelude.Natural,
    -- | Controls the types of data that passes to onCaptionInfo outputs. If set
    -- to \'all\' then 608 and 708 carried DTVCC data will be passed. If set to
    -- \'field1AndField2608\' then DTVCC data will be stripped out, but 608
    -- data from both fields will be passed. If set to \'field1608\' then only
    -- the data carried in 608 from field 1 video will be passed.
    RtmpGroupSettings -> Maybe RtmpCaptionData
captionData :: Prelude.Maybe RtmpCaptionData,
    -- | Controls the behavior of this RTMP group if input becomes unavailable. -
    -- emitOutput: Emit a slate until input returns. - pauseOutput: Stop
    -- transmitting data until input returns. This does not close the
    -- underlying RTMP connection.
    RtmpGroupSettings -> Maybe InputLossActionForRtmpOut
inputLossAction :: Prelude.Maybe InputLossActionForRtmpOut,
    -- | If a streaming output fails, number of seconds to wait until a restart
    -- is initiated. A value of 0 means never restart.
    RtmpGroupSettings -> Maybe Natural
restartDelay :: Prelude.Maybe Prelude.Natural
  }
  deriving (RtmpGroupSettings -> RtmpGroupSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RtmpGroupSettings -> RtmpGroupSettings -> Bool
$c/= :: RtmpGroupSettings -> RtmpGroupSettings -> Bool
== :: RtmpGroupSettings -> RtmpGroupSettings -> Bool
$c== :: RtmpGroupSettings -> RtmpGroupSettings -> Bool
Prelude.Eq, ReadPrec [RtmpGroupSettings]
ReadPrec RtmpGroupSettings
Int -> ReadS RtmpGroupSettings
ReadS [RtmpGroupSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RtmpGroupSettings]
$creadListPrec :: ReadPrec [RtmpGroupSettings]
readPrec :: ReadPrec RtmpGroupSettings
$creadPrec :: ReadPrec RtmpGroupSettings
readList :: ReadS [RtmpGroupSettings]
$creadList :: ReadS [RtmpGroupSettings]
readsPrec :: Int -> ReadS RtmpGroupSettings
$creadsPrec :: Int -> ReadS RtmpGroupSettings
Prelude.Read, Int -> RtmpGroupSettings -> ShowS
[RtmpGroupSettings] -> ShowS
RtmpGroupSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RtmpGroupSettings] -> ShowS
$cshowList :: [RtmpGroupSettings] -> ShowS
show :: RtmpGroupSettings -> String
$cshow :: RtmpGroupSettings -> String
showsPrec :: Int -> RtmpGroupSettings -> ShowS
$cshowsPrec :: Int -> RtmpGroupSettings -> ShowS
Prelude.Show, forall x. Rep RtmpGroupSettings x -> RtmpGroupSettings
forall x. RtmpGroupSettings -> Rep RtmpGroupSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RtmpGroupSettings x -> RtmpGroupSettings
$cfrom :: forall x. RtmpGroupSettings -> Rep RtmpGroupSettings x
Prelude.Generic)

-- |
-- Create a value of 'RtmpGroupSettings' 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:
--
-- 'adMarkers', 'rtmpGroupSettings_adMarkers' - Choose the ad marker type for this output group. MediaLive will create a
-- message based on the content of each SCTE-35 message, format it for that
-- marker type, and insert it in the datastream.
--
-- 'authenticationScheme', 'rtmpGroupSettings_authenticationScheme' - Authentication scheme to use when connecting with CDN
--
-- 'cacheFullBehavior', 'rtmpGroupSettings_cacheFullBehavior' - Controls behavior when content cache fills up. If remote origin server
-- stalls the RTMP connection and does not accept content fast enough the
-- \'Media Cache\' will fill up. When the cache reaches the duration
-- specified by cacheLength the cache will stop accepting new content. If
-- set to disconnectImmediately, the RTMP output will force a disconnect.
-- Clear the media cache, and reconnect after restartDelay seconds. If set
-- to waitForServer, the RTMP output will wait up to 5 minutes to allow the
-- origin server to begin accepting data again.
--
-- 'cacheLength', 'rtmpGroupSettings_cacheLength' - Cache length, in seconds, is used to calculate buffer size.
--
-- 'captionData', 'rtmpGroupSettings_captionData' - Controls the types of data that passes to onCaptionInfo outputs. If set
-- to \'all\' then 608 and 708 carried DTVCC data will be passed. If set to
-- \'field1AndField2608\' then DTVCC data will be stripped out, but 608
-- data from both fields will be passed. If set to \'field1608\' then only
-- the data carried in 608 from field 1 video will be passed.
--
-- 'inputLossAction', 'rtmpGroupSettings_inputLossAction' - Controls the behavior of this RTMP group if input becomes unavailable. -
-- emitOutput: Emit a slate until input returns. - pauseOutput: Stop
-- transmitting data until input returns. This does not close the
-- underlying RTMP connection.
--
-- 'restartDelay', 'rtmpGroupSettings_restartDelay' - If a streaming output fails, number of seconds to wait until a restart
-- is initiated. A value of 0 means never restart.
newRtmpGroupSettings ::
  RtmpGroupSettings
newRtmpGroupSettings :: RtmpGroupSettings
newRtmpGroupSettings =
  RtmpGroupSettings'
    { $sel:adMarkers:RtmpGroupSettings' :: Maybe [RtmpAdMarkers]
adMarkers = forall a. Maybe a
Prelude.Nothing,
      $sel:authenticationScheme:RtmpGroupSettings' :: Maybe AuthenticationScheme
authenticationScheme = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheFullBehavior:RtmpGroupSettings' :: Maybe RtmpCacheFullBehavior
cacheFullBehavior = forall a. Maybe a
Prelude.Nothing,
      $sel:cacheLength:RtmpGroupSettings' :: Maybe Natural
cacheLength = forall a. Maybe a
Prelude.Nothing,
      $sel:captionData:RtmpGroupSettings' :: Maybe RtmpCaptionData
captionData = forall a. Maybe a
Prelude.Nothing,
      $sel:inputLossAction:RtmpGroupSettings' :: Maybe InputLossActionForRtmpOut
inputLossAction = forall a. Maybe a
Prelude.Nothing,
      $sel:restartDelay:RtmpGroupSettings' :: Maybe Natural
restartDelay = forall a. Maybe a
Prelude.Nothing
    }

-- | Choose the ad marker type for this output group. MediaLive will create a
-- message based on the content of each SCTE-35 message, format it for that
-- marker type, and insert it in the datastream.
rtmpGroupSettings_adMarkers :: Lens.Lens' RtmpGroupSettings (Prelude.Maybe [RtmpAdMarkers])
rtmpGroupSettings_adMarkers :: Lens' RtmpGroupSettings (Maybe [RtmpAdMarkers])
rtmpGroupSettings_adMarkers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RtmpGroupSettings' {Maybe [RtmpAdMarkers]
adMarkers :: Maybe [RtmpAdMarkers]
$sel:adMarkers:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe [RtmpAdMarkers]
adMarkers} -> Maybe [RtmpAdMarkers]
adMarkers) (\s :: RtmpGroupSettings
s@RtmpGroupSettings' {} Maybe [RtmpAdMarkers]
a -> RtmpGroupSettings
s {$sel:adMarkers:RtmpGroupSettings' :: Maybe [RtmpAdMarkers]
adMarkers = Maybe [RtmpAdMarkers]
a} :: RtmpGroupSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Authentication scheme to use when connecting with CDN
rtmpGroupSettings_authenticationScheme :: Lens.Lens' RtmpGroupSettings (Prelude.Maybe AuthenticationScheme)
rtmpGroupSettings_authenticationScheme :: Lens' RtmpGroupSettings (Maybe AuthenticationScheme)
rtmpGroupSettings_authenticationScheme = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RtmpGroupSettings' {Maybe AuthenticationScheme
authenticationScheme :: Maybe AuthenticationScheme
$sel:authenticationScheme:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe AuthenticationScheme
authenticationScheme} -> Maybe AuthenticationScheme
authenticationScheme) (\s :: RtmpGroupSettings
s@RtmpGroupSettings' {} Maybe AuthenticationScheme
a -> RtmpGroupSettings
s {$sel:authenticationScheme:RtmpGroupSettings' :: Maybe AuthenticationScheme
authenticationScheme = Maybe AuthenticationScheme
a} :: RtmpGroupSettings)

-- | Controls behavior when content cache fills up. If remote origin server
-- stalls the RTMP connection and does not accept content fast enough the
-- \'Media Cache\' will fill up. When the cache reaches the duration
-- specified by cacheLength the cache will stop accepting new content. If
-- set to disconnectImmediately, the RTMP output will force a disconnect.
-- Clear the media cache, and reconnect after restartDelay seconds. If set
-- to waitForServer, the RTMP output will wait up to 5 minutes to allow the
-- origin server to begin accepting data again.
rtmpGroupSettings_cacheFullBehavior :: Lens.Lens' RtmpGroupSettings (Prelude.Maybe RtmpCacheFullBehavior)
rtmpGroupSettings_cacheFullBehavior :: Lens' RtmpGroupSettings (Maybe RtmpCacheFullBehavior)
rtmpGroupSettings_cacheFullBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RtmpGroupSettings' {Maybe RtmpCacheFullBehavior
cacheFullBehavior :: Maybe RtmpCacheFullBehavior
$sel:cacheFullBehavior:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe RtmpCacheFullBehavior
cacheFullBehavior} -> Maybe RtmpCacheFullBehavior
cacheFullBehavior) (\s :: RtmpGroupSettings
s@RtmpGroupSettings' {} Maybe RtmpCacheFullBehavior
a -> RtmpGroupSettings
s {$sel:cacheFullBehavior:RtmpGroupSettings' :: Maybe RtmpCacheFullBehavior
cacheFullBehavior = Maybe RtmpCacheFullBehavior
a} :: RtmpGroupSettings)

-- | Cache length, in seconds, is used to calculate buffer size.
rtmpGroupSettings_cacheLength :: Lens.Lens' RtmpGroupSettings (Prelude.Maybe Prelude.Natural)
rtmpGroupSettings_cacheLength :: Lens' RtmpGroupSettings (Maybe Natural)
rtmpGroupSettings_cacheLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RtmpGroupSettings' {Maybe Natural
cacheLength :: Maybe Natural
$sel:cacheLength:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe Natural
cacheLength} -> Maybe Natural
cacheLength) (\s :: RtmpGroupSettings
s@RtmpGroupSettings' {} Maybe Natural
a -> RtmpGroupSettings
s {$sel:cacheLength:RtmpGroupSettings' :: Maybe Natural
cacheLength = Maybe Natural
a} :: RtmpGroupSettings)

-- | Controls the types of data that passes to onCaptionInfo outputs. If set
-- to \'all\' then 608 and 708 carried DTVCC data will be passed. If set to
-- \'field1AndField2608\' then DTVCC data will be stripped out, but 608
-- data from both fields will be passed. If set to \'field1608\' then only
-- the data carried in 608 from field 1 video will be passed.
rtmpGroupSettings_captionData :: Lens.Lens' RtmpGroupSettings (Prelude.Maybe RtmpCaptionData)
rtmpGroupSettings_captionData :: Lens' RtmpGroupSettings (Maybe RtmpCaptionData)
rtmpGroupSettings_captionData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RtmpGroupSettings' {Maybe RtmpCaptionData
captionData :: Maybe RtmpCaptionData
$sel:captionData:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe RtmpCaptionData
captionData} -> Maybe RtmpCaptionData
captionData) (\s :: RtmpGroupSettings
s@RtmpGroupSettings' {} Maybe RtmpCaptionData
a -> RtmpGroupSettings
s {$sel:captionData:RtmpGroupSettings' :: Maybe RtmpCaptionData
captionData = Maybe RtmpCaptionData
a} :: RtmpGroupSettings)

-- | Controls the behavior of this RTMP group if input becomes unavailable. -
-- emitOutput: Emit a slate until input returns. - pauseOutput: Stop
-- transmitting data until input returns. This does not close the
-- underlying RTMP connection.
rtmpGroupSettings_inputLossAction :: Lens.Lens' RtmpGroupSettings (Prelude.Maybe InputLossActionForRtmpOut)
rtmpGroupSettings_inputLossAction :: Lens' RtmpGroupSettings (Maybe InputLossActionForRtmpOut)
rtmpGroupSettings_inputLossAction = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RtmpGroupSettings' {Maybe InputLossActionForRtmpOut
inputLossAction :: Maybe InputLossActionForRtmpOut
$sel:inputLossAction:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe InputLossActionForRtmpOut
inputLossAction} -> Maybe InputLossActionForRtmpOut
inputLossAction) (\s :: RtmpGroupSettings
s@RtmpGroupSettings' {} Maybe InputLossActionForRtmpOut
a -> RtmpGroupSettings
s {$sel:inputLossAction:RtmpGroupSettings' :: Maybe InputLossActionForRtmpOut
inputLossAction = Maybe InputLossActionForRtmpOut
a} :: RtmpGroupSettings)

-- | If a streaming output fails, number of seconds to wait until a restart
-- is initiated. A value of 0 means never restart.
rtmpGroupSettings_restartDelay :: Lens.Lens' RtmpGroupSettings (Prelude.Maybe Prelude.Natural)
rtmpGroupSettings_restartDelay :: Lens' RtmpGroupSettings (Maybe Natural)
rtmpGroupSettings_restartDelay = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RtmpGroupSettings' {Maybe Natural
restartDelay :: Maybe Natural
$sel:restartDelay:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe Natural
restartDelay} -> Maybe Natural
restartDelay) (\s :: RtmpGroupSettings
s@RtmpGroupSettings' {} Maybe Natural
a -> RtmpGroupSettings
s {$sel:restartDelay:RtmpGroupSettings' :: Maybe Natural
restartDelay = Maybe Natural
a} :: RtmpGroupSettings)

instance Data.FromJSON RtmpGroupSettings where
  parseJSON :: Value -> Parser RtmpGroupSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RtmpGroupSettings"
      ( \Object
x ->
          Maybe [RtmpAdMarkers]
-> Maybe AuthenticationScheme
-> Maybe RtmpCacheFullBehavior
-> Maybe Natural
-> Maybe RtmpCaptionData
-> Maybe InputLossActionForRtmpOut
-> Maybe Natural
-> RtmpGroupSettings
RtmpGroupSettings'
            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
"adMarkers" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"authenticationScheme")
            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
"cacheFullBehavior")
            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
"cacheLength")
            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
"captionData")
            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
"inputLossAction")
            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
"restartDelay")
      )

instance Prelude.Hashable RtmpGroupSettings where
  hashWithSalt :: Int -> RtmpGroupSettings -> Int
hashWithSalt Int
_salt RtmpGroupSettings' {Maybe Natural
Maybe [RtmpAdMarkers]
Maybe AuthenticationScheme
Maybe InputLossActionForRtmpOut
Maybe RtmpCacheFullBehavior
Maybe RtmpCaptionData
restartDelay :: Maybe Natural
inputLossAction :: Maybe InputLossActionForRtmpOut
captionData :: Maybe RtmpCaptionData
cacheLength :: Maybe Natural
cacheFullBehavior :: Maybe RtmpCacheFullBehavior
authenticationScheme :: Maybe AuthenticationScheme
adMarkers :: Maybe [RtmpAdMarkers]
$sel:restartDelay:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe Natural
$sel:inputLossAction:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe InputLossActionForRtmpOut
$sel:captionData:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe RtmpCaptionData
$sel:cacheLength:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe Natural
$sel:cacheFullBehavior:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe RtmpCacheFullBehavior
$sel:authenticationScheme:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe AuthenticationScheme
$sel:adMarkers:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe [RtmpAdMarkers]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [RtmpAdMarkers]
adMarkers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AuthenticationScheme
authenticationScheme
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RtmpCacheFullBehavior
cacheFullBehavior
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
cacheLength
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RtmpCaptionData
captionData
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputLossActionForRtmpOut
inputLossAction
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
restartDelay

instance Prelude.NFData RtmpGroupSettings where
  rnf :: RtmpGroupSettings -> ()
rnf RtmpGroupSettings' {Maybe Natural
Maybe [RtmpAdMarkers]
Maybe AuthenticationScheme
Maybe InputLossActionForRtmpOut
Maybe RtmpCacheFullBehavior
Maybe RtmpCaptionData
restartDelay :: Maybe Natural
inputLossAction :: Maybe InputLossActionForRtmpOut
captionData :: Maybe RtmpCaptionData
cacheLength :: Maybe Natural
cacheFullBehavior :: Maybe RtmpCacheFullBehavior
authenticationScheme :: Maybe AuthenticationScheme
adMarkers :: Maybe [RtmpAdMarkers]
$sel:restartDelay:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe Natural
$sel:inputLossAction:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe InputLossActionForRtmpOut
$sel:captionData:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe RtmpCaptionData
$sel:cacheLength:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe Natural
$sel:cacheFullBehavior:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe RtmpCacheFullBehavior
$sel:authenticationScheme:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe AuthenticationScheme
$sel:adMarkers:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe [RtmpAdMarkers]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [RtmpAdMarkers]
adMarkers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AuthenticationScheme
authenticationScheme
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RtmpCacheFullBehavior
cacheFullBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
cacheLength
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RtmpCaptionData
captionData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputLossActionForRtmpOut
inputLossAction
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
restartDelay

instance Data.ToJSON RtmpGroupSettings where
  toJSON :: RtmpGroupSettings -> Value
toJSON RtmpGroupSettings' {Maybe Natural
Maybe [RtmpAdMarkers]
Maybe AuthenticationScheme
Maybe InputLossActionForRtmpOut
Maybe RtmpCacheFullBehavior
Maybe RtmpCaptionData
restartDelay :: Maybe Natural
inputLossAction :: Maybe InputLossActionForRtmpOut
captionData :: Maybe RtmpCaptionData
cacheLength :: Maybe Natural
cacheFullBehavior :: Maybe RtmpCacheFullBehavior
authenticationScheme :: Maybe AuthenticationScheme
adMarkers :: Maybe [RtmpAdMarkers]
$sel:restartDelay:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe Natural
$sel:inputLossAction:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe InputLossActionForRtmpOut
$sel:captionData:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe RtmpCaptionData
$sel:cacheLength:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe Natural
$sel:cacheFullBehavior:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe RtmpCacheFullBehavior
$sel:authenticationScheme:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe AuthenticationScheme
$sel:adMarkers:RtmpGroupSettings' :: RtmpGroupSettings -> Maybe [RtmpAdMarkers]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"adMarkers" 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 [RtmpAdMarkers]
adMarkers,
            (Key
"authenticationScheme" 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 AuthenticationScheme
authenticationScheme,
            (Key
"cacheFullBehavior" 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 RtmpCacheFullBehavior
cacheFullBehavior,
            (Key
"cacheLength" 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 Natural
cacheLength,
            (Key
"captionData" 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 RtmpCaptionData
captionData,
            (Key
"inputLossAction" 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 InputLossActionForRtmpOut
inputLossAction,
            (Key
"restartDelay" 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 Natural
restartDelay
          ]
      )