{-# 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.MultiplexSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data MultiplexSettings = MultiplexSettings'
{
MultiplexSettings -> Maybe Natural
maximumVideoBufferDelayMilliseconds :: Prelude.Maybe Prelude.Natural,
MultiplexSettings -> Maybe Natural
transportStreamReservedBitrate :: Prelude.Maybe Prelude.Natural,
MultiplexSettings -> Natural
transportStreamBitrate :: Prelude.Natural,
MultiplexSettings -> Natural
transportStreamId :: Prelude.Natural
}
deriving (MultiplexSettings -> MultiplexSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MultiplexSettings -> MultiplexSettings -> Bool
$c/= :: MultiplexSettings -> MultiplexSettings -> Bool
== :: MultiplexSettings -> MultiplexSettings -> Bool
$c== :: MultiplexSettings -> MultiplexSettings -> Bool
Prelude.Eq, ReadPrec [MultiplexSettings]
ReadPrec MultiplexSettings
Int -> ReadS MultiplexSettings
ReadS [MultiplexSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MultiplexSettings]
$creadListPrec :: ReadPrec [MultiplexSettings]
readPrec :: ReadPrec MultiplexSettings
$creadPrec :: ReadPrec MultiplexSettings
readList :: ReadS [MultiplexSettings]
$creadList :: ReadS [MultiplexSettings]
readsPrec :: Int -> ReadS MultiplexSettings
$creadsPrec :: Int -> ReadS MultiplexSettings
Prelude.Read, Int -> MultiplexSettings -> ShowS
[MultiplexSettings] -> ShowS
MultiplexSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MultiplexSettings] -> ShowS
$cshowList :: [MultiplexSettings] -> ShowS
show :: MultiplexSettings -> String
$cshow :: MultiplexSettings -> String
showsPrec :: Int -> MultiplexSettings -> ShowS
$cshowsPrec :: Int -> MultiplexSettings -> ShowS
Prelude.Show, forall x. Rep MultiplexSettings x -> MultiplexSettings
forall x. MultiplexSettings -> Rep MultiplexSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MultiplexSettings x -> MultiplexSettings
$cfrom :: forall x. MultiplexSettings -> Rep MultiplexSettings x
Prelude.Generic)
newMultiplexSettings ::
Prelude.Natural ->
Prelude.Natural ->
MultiplexSettings
newMultiplexSettings :: Natural -> Natural -> MultiplexSettings
newMultiplexSettings
Natural
pTransportStreamBitrate_
Natural
pTransportStreamId_ =
MultiplexSettings'
{ $sel:maximumVideoBufferDelayMilliseconds:MultiplexSettings' :: Maybe Natural
maximumVideoBufferDelayMilliseconds =
forall a. Maybe a
Prelude.Nothing,
$sel:transportStreamReservedBitrate:MultiplexSettings' :: Maybe Natural
transportStreamReservedBitrate = forall a. Maybe a
Prelude.Nothing,
$sel:transportStreamBitrate:MultiplexSettings' :: Natural
transportStreamBitrate = Natural
pTransportStreamBitrate_,
$sel:transportStreamId:MultiplexSettings' :: Natural
transportStreamId = Natural
pTransportStreamId_
}
multiplexSettings_maximumVideoBufferDelayMilliseconds :: Lens.Lens' MultiplexSettings (Prelude.Maybe Prelude.Natural)
multiplexSettings_maximumVideoBufferDelayMilliseconds :: Lens' MultiplexSettings (Maybe Natural)
multiplexSettings_maximumVideoBufferDelayMilliseconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexSettings' {Maybe Natural
maximumVideoBufferDelayMilliseconds :: Maybe Natural
$sel:maximumVideoBufferDelayMilliseconds:MultiplexSettings' :: MultiplexSettings -> Maybe Natural
maximumVideoBufferDelayMilliseconds} -> Maybe Natural
maximumVideoBufferDelayMilliseconds) (\s :: MultiplexSettings
s@MultiplexSettings' {} Maybe Natural
a -> MultiplexSettings
s {$sel:maximumVideoBufferDelayMilliseconds:MultiplexSettings' :: Maybe Natural
maximumVideoBufferDelayMilliseconds = Maybe Natural
a} :: MultiplexSettings)
multiplexSettings_transportStreamReservedBitrate :: Lens.Lens' MultiplexSettings (Prelude.Maybe Prelude.Natural)
multiplexSettings_transportStreamReservedBitrate :: Lens' MultiplexSettings (Maybe Natural)
multiplexSettings_transportStreamReservedBitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexSettings' {Maybe Natural
transportStreamReservedBitrate :: Maybe Natural
$sel:transportStreamReservedBitrate:MultiplexSettings' :: MultiplexSettings -> Maybe Natural
transportStreamReservedBitrate} -> Maybe Natural
transportStreamReservedBitrate) (\s :: MultiplexSettings
s@MultiplexSettings' {} Maybe Natural
a -> MultiplexSettings
s {$sel:transportStreamReservedBitrate:MultiplexSettings' :: Maybe Natural
transportStreamReservedBitrate = Maybe Natural
a} :: MultiplexSettings)
multiplexSettings_transportStreamBitrate :: Lens.Lens' MultiplexSettings Prelude.Natural
multiplexSettings_transportStreamBitrate :: Lens' MultiplexSettings Natural
multiplexSettings_transportStreamBitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexSettings' {Natural
transportStreamBitrate :: Natural
$sel:transportStreamBitrate:MultiplexSettings' :: MultiplexSettings -> Natural
transportStreamBitrate} -> Natural
transportStreamBitrate) (\s :: MultiplexSettings
s@MultiplexSettings' {} Natural
a -> MultiplexSettings
s {$sel:transportStreamBitrate:MultiplexSettings' :: Natural
transportStreamBitrate = Natural
a} :: MultiplexSettings)
multiplexSettings_transportStreamId :: Lens.Lens' MultiplexSettings Prelude.Natural
multiplexSettings_transportStreamId :: Lens' MultiplexSettings Natural
multiplexSettings_transportStreamId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexSettings' {Natural
transportStreamId :: Natural
$sel:transportStreamId:MultiplexSettings' :: MultiplexSettings -> Natural
transportStreamId} -> Natural
transportStreamId) (\s :: MultiplexSettings
s@MultiplexSettings' {} Natural
a -> MultiplexSettings
s {$sel:transportStreamId:MultiplexSettings' :: Natural
transportStreamId = Natural
a} :: MultiplexSettings)
instance Data.FromJSON MultiplexSettings where
parseJSON :: Value -> Parser MultiplexSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MultiplexSettings"
( \Object
x ->
Maybe Natural
-> Maybe Natural -> Natural -> Natural -> MultiplexSettings
MultiplexSettings'
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
"maximumVideoBufferDelayMilliseconds")
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
"transportStreamReservedBitrate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"transportStreamBitrate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"transportStreamId")
)
instance Prelude.Hashable MultiplexSettings where
hashWithSalt :: Int -> MultiplexSettings -> Int
hashWithSalt Int
_salt MultiplexSettings' {Natural
Maybe Natural
transportStreamId :: Natural
transportStreamBitrate :: Natural
transportStreamReservedBitrate :: Maybe Natural
maximumVideoBufferDelayMilliseconds :: Maybe Natural
$sel:transportStreamId:MultiplexSettings' :: MultiplexSettings -> Natural
$sel:transportStreamBitrate:MultiplexSettings' :: MultiplexSettings -> Natural
$sel:transportStreamReservedBitrate:MultiplexSettings' :: MultiplexSettings -> Maybe Natural
$sel:maximumVideoBufferDelayMilliseconds:MultiplexSettings' :: MultiplexSettings -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maximumVideoBufferDelayMilliseconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
transportStreamReservedBitrate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
transportStreamBitrate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
transportStreamId
instance Prelude.NFData MultiplexSettings where
rnf :: MultiplexSettings -> ()
rnf MultiplexSettings' {Natural
Maybe Natural
transportStreamId :: Natural
transportStreamBitrate :: Natural
transportStreamReservedBitrate :: Maybe Natural
maximumVideoBufferDelayMilliseconds :: Maybe Natural
$sel:transportStreamId:MultiplexSettings' :: MultiplexSettings -> Natural
$sel:transportStreamBitrate:MultiplexSettings' :: MultiplexSettings -> Natural
$sel:transportStreamReservedBitrate:MultiplexSettings' :: MultiplexSettings -> Maybe Natural
$sel:maximumVideoBufferDelayMilliseconds:MultiplexSettings' :: MultiplexSettings -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumVideoBufferDelayMilliseconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
transportStreamReservedBitrate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
transportStreamBitrate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
transportStreamId
instance Data.ToJSON MultiplexSettings where
toJSON :: MultiplexSettings -> Value
toJSON MultiplexSettings' {Natural
Maybe Natural
transportStreamId :: Natural
transportStreamBitrate :: Natural
transportStreamReservedBitrate :: Maybe Natural
maximumVideoBufferDelayMilliseconds :: Maybe Natural
$sel:transportStreamId:MultiplexSettings' :: MultiplexSettings -> Natural
$sel:transportStreamBitrate:MultiplexSettings' :: MultiplexSettings -> Natural
$sel:transportStreamReservedBitrate:MultiplexSettings' :: MultiplexSettings -> Maybe Natural
$sel:maximumVideoBufferDelayMilliseconds:MultiplexSettings' :: MultiplexSettings -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"maximumVideoBufferDelayMilliseconds" 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
maximumVideoBufferDelayMilliseconds,
(Key
"transportStreamReservedBitrate" 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
transportStreamReservedBitrate,
forall a. a -> Maybe a
Prelude.Just
( Key
"transportStreamBitrate"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
transportStreamBitrate
),
forall a. a -> Maybe a
Prelude.Just
(Key
"transportStreamId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
transportStreamId)
]
)