{-# 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.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
data RtmpGroupSettings = RtmpGroupSettings'
{
RtmpGroupSettings -> Maybe [RtmpAdMarkers]
adMarkers :: Prelude.Maybe [RtmpAdMarkers],
RtmpGroupSettings -> Maybe AuthenticationScheme
authenticationScheme :: Prelude.Maybe AuthenticationScheme,
RtmpGroupSettings -> Maybe RtmpCacheFullBehavior
cacheFullBehavior :: Prelude.Maybe RtmpCacheFullBehavior,
RtmpGroupSettings -> Maybe Natural
cacheLength :: Prelude.Maybe Prelude.Natural,
RtmpGroupSettings -> Maybe RtmpCaptionData
captionData :: Prelude.Maybe RtmpCaptionData,
RtmpGroupSettings -> Maybe InputLossActionForRtmpOut
inputLossAction :: Prelude.Maybe InputLossActionForRtmpOut,
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)
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
}
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
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)
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)
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)
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)
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)
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
]
)