{-# 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.MultiplexStatmuxVideoSettings 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 MultiplexStatmuxVideoSettings = MultiplexStatmuxVideoSettings'
{
MultiplexStatmuxVideoSettings -> Maybe Natural
maximumBitrate :: Prelude.Maybe Prelude.Natural,
MultiplexStatmuxVideoSettings -> Maybe Natural
minimumBitrate :: Prelude.Maybe Prelude.Natural,
MultiplexStatmuxVideoSettings -> Maybe Int
priority :: Prelude.Maybe Prelude.Int
}
deriving (MultiplexStatmuxVideoSettings
-> MultiplexStatmuxVideoSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MultiplexStatmuxVideoSettings
-> MultiplexStatmuxVideoSettings -> Bool
$c/= :: MultiplexStatmuxVideoSettings
-> MultiplexStatmuxVideoSettings -> Bool
== :: MultiplexStatmuxVideoSettings
-> MultiplexStatmuxVideoSettings -> Bool
$c== :: MultiplexStatmuxVideoSettings
-> MultiplexStatmuxVideoSettings -> Bool
Prelude.Eq, ReadPrec [MultiplexStatmuxVideoSettings]
ReadPrec MultiplexStatmuxVideoSettings
Int -> ReadS MultiplexStatmuxVideoSettings
ReadS [MultiplexStatmuxVideoSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MultiplexStatmuxVideoSettings]
$creadListPrec :: ReadPrec [MultiplexStatmuxVideoSettings]
readPrec :: ReadPrec MultiplexStatmuxVideoSettings
$creadPrec :: ReadPrec MultiplexStatmuxVideoSettings
readList :: ReadS [MultiplexStatmuxVideoSettings]
$creadList :: ReadS [MultiplexStatmuxVideoSettings]
readsPrec :: Int -> ReadS MultiplexStatmuxVideoSettings
$creadsPrec :: Int -> ReadS MultiplexStatmuxVideoSettings
Prelude.Read, Int -> MultiplexStatmuxVideoSettings -> ShowS
[MultiplexStatmuxVideoSettings] -> ShowS
MultiplexStatmuxVideoSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MultiplexStatmuxVideoSettings] -> ShowS
$cshowList :: [MultiplexStatmuxVideoSettings] -> ShowS
show :: MultiplexStatmuxVideoSettings -> String
$cshow :: MultiplexStatmuxVideoSettings -> String
showsPrec :: Int -> MultiplexStatmuxVideoSettings -> ShowS
$cshowsPrec :: Int -> MultiplexStatmuxVideoSettings -> ShowS
Prelude.Show, forall x.
Rep MultiplexStatmuxVideoSettings x
-> MultiplexStatmuxVideoSettings
forall x.
MultiplexStatmuxVideoSettings
-> Rep MultiplexStatmuxVideoSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MultiplexStatmuxVideoSettings x
-> MultiplexStatmuxVideoSettings
$cfrom :: forall x.
MultiplexStatmuxVideoSettings
-> Rep MultiplexStatmuxVideoSettings x
Prelude.Generic)
newMultiplexStatmuxVideoSettings ::
MultiplexStatmuxVideoSettings
newMultiplexStatmuxVideoSettings :: MultiplexStatmuxVideoSettings
newMultiplexStatmuxVideoSettings =
MultiplexStatmuxVideoSettings'
{ $sel:maximumBitrate:MultiplexStatmuxVideoSettings' :: Maybe Natural
maximumBitrate =
forall a. Maybe a
Prelude.Nothing,
$sel:minimumBitrate:MultiplexStatmuxVideoSettings' :: Maybe Natural
minimumBitrate = forall a. Maybe a
Prelude.Nothing,
$sel:priority:MultiplexStatmuxVideoSettings' :: Maybe Int
priority = forall a. Maybe a
Prelude.Nothing
}
multiplexStatmuxVideoSettings_maximumBitrate :: Lens.Lens' MultiplexStatmuxVideoSettings (Prelude.Maybe Prelude.Natural)
multiplexStatmuxVideoSettings_maximumBitrate :: Lens' MultiplexStatmuxVideoSettings (Maybe Natural)
multiplexStatmuxVideoSettings_maximumBitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexStatmuxVideoSettings' {Maybe Natural
maximumBitrate :: Maybe Natural
$sel:maximumBitrate:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Natural
maximumBitrate} -> Maybe Natural
maximumBitrate) (\s :: MultiplexStatmuxVideoSettings
s@MultiplexStatmuxVideoSettings' {} Maybe Natural
a -> MultiplexStatmuxVideoSettings
s {$sel:maximumBitrate:MultiplexStatmuxVideoSettings' :: Maybe Natural
maximumBitrate = Maybe Natural
a} :: MultiplexStatmuxVideoSettings)
multiplexStatmuxVideoSettings_minimumBitrate :: Lens.Lens' MultiplexStatmuxVideoSettings (Prelude.Maybe Prelude.Natural)
multiplexStatmuxVideoSettings_minimumBitrate :: Lens' MultiplexStatmuxVideoSettings (Maybe Natural)
multiplexStatmuxVideoSettings_minimumBitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexStatmuxVideoSettings' {Maybe Natural
minimumBitrate :: Maybe Natural
$sel:minimumBitrate:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Natural
minimumBitrate} -> Maybe Natural
minimumBitrate) (\s :: MultiplexStatmuxVideoSettings
s@MultiplexStatmuxVideoSettings' {} Maybe Natural
a -> MultiplexStatmuxVideoSettings
s {$sel:minimumBitrate:MultiplexStatmuxVideoSettings' :: Maybe Natural
minimumBitrate = Maybe Natural
a} :: MultiplexStatmuxVideoSettings)
multiplexStatmuxVideoSettings_priority :: Lens.Lens' MultiplexStatmuxVideoSettings (Prelude.Maybe Prelude.Int)
multiplexStatmuxVideoSettings_priority :: Lens' MultiplexStatmuxVideoSettings (Maybe Int)
multiplexStatmuxVideoSettings_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexStatmuxVideoSettings' {Maybe Int
priority :: Maybe Int
$sel:priority:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Int
priority} -> Maybe Int
priority) (\s :: MultiplexStatmuxVideoSettings
s@MultiplexStatmuxVideoSettings' {} Maybe Int
a -> MultiplexStatmuxVideoSettings
s {$sel:priority:MultiplexStatmuxVideoSettings' :: Maybe Int
priority = Maybe Int
a} :: MultiplexStatmuxVideoSettings)
instance Data.FromJSON MultiplexStatmuxVideoSettings where
parseJSON :: Value -> Parser MultiplexStatmuxVideoSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MultiplexStatmuxVideoSettings"
( \Object
x ->
Maybe Natural
-> Maybe Natural -> Maybe Int -> MultiplexStatmuxVideoSettings
MultiplexStatmuxVideoSettings'
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
"maximumBitrate")
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
"minimumBitrate")
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
"priority")
)
instance
Prelude.Hashable
MultiplexStatmuxVideoSettings
where
hashWithSalt :: Int -> MultiplexStatmuxVideoSettings -> Int
hashWithSalt Int
_salt MultiplexStatmuxVideoSettings' {Maybe Int
Maybe Natural
priority :: Maybe Int
minimumBitrate :: Maybe Natural
maximumBitrate :: Maybe Natural
$sel:priority:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Int
$sel:minimumBitrate:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Natural
$sel:maximumBitrate:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maximumBitrate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
minimumBitrate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
priority
instance Prelude.NFData MultiplexStatmuxVideoSettings where
rnf :: MultiplexStatmuxVideoSettings -> ()
rnf MultiplexStatmuxVideoSettings' {Maybe Int
Maybe Natural
priority :: Maybe Int
minimumBitrate :: Maybe Natural
maximumBitrate :: Maybe Natural
$sel:priority:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Int
$sel:minimumBitrate:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Natural
$sel:maximumBitrate:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumBitrate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
minimumBitrate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
priority
instance Data.ToJSON MultiplexStatmuxVideoSettings where
toJSON :: MultiplexStatmuxVideoSettings -> Value
toJSON MultiplexStatmuxVideoSettings' {Maybe Int
Maybe Natural
priority :: Maybe Int
minimumBitrate :: Maybe Natural
maximumBitrate :: Maybe Natural
$sel:priority:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Int
$sel:minimumBitrate:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Natural
$sel:maximumBitrate:MultiplexStatmuxVideoSettings' :: MultiplexStatmuxVideoSettings -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"maximumBitrate" 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
maximumBitrate,
(Key
"minimumBitrate" 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
minimumBitrate,
(Key
"priority" 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
priority
]
)