{-# 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.InputDeviceConfigurableSettings 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.InputDeviceConfiguredInput
import qualified Amazonka.Prelude as Prelude
data InputDeviceConfigurableSettings = InputDeviceConfigurableSettings'
{
InputDeviceConfigurableSettings -> Maybe InputDeviceConfiguredInput
configuredInput :: Prelude.Maybe InputDeviceConfiguredInput,
InputDeviceConfigurableSettings -> Maybe Int
latencyMs :: Prelude.Maybe Prelude.Int,
InputDeviceConfigurableSettings -> Maybe Int
maxBitrate :: Prelude.Maybe Prelude.Int
}
deriving (InputDeviceConfigurableSettings
-> InputDeviceConfigurableSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputDeviceConfigurableSettings
-> InputDeviceConfigurableSettings -> Bool
$c/= :: InputDeviceConfigurableSettings
-> InputDeviceConfigurableSettings -> Bool
== :: InputDeviceConfigurableSettings
-> InputDeviceConfigurableSettings -> Bool
$c== :: InputDeviceConfigurableSettings
-> InputDeviceConfigurableSettings -> Bool
Prelude.Eq, ReadPrec [InputDeviceConfigurableSettings]
ReadPrec InputDeviceConfigurableSettings
Int -> ReadS InputDeviceConfigurableSettings
ReadS [InputDeviceConfigurableSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputDeviceConfigurableSettings]
$creadListPrec :: ReadPrec [InputDeviceConfigurableSettings]
readPrec :: ReadPrec InputDeviceConfigurableSettings
$creadPrec :: ReadPrec InputDeviceConfigurableSettings
readList :: ReadS [InputDeviceConfigurableSettings]
$creadList :: ReadS [InputDeviceConfigurableSettings]
readsPrec :: Int -> ReadS InputDeviceConfigurableSettings
$creadsPrec :: Int -> ReadS InputDeviceConfigurableSettings
Prelude.Read, Int -> InputDeviceConfigurableSettings -> ShowS
[InputDeviceConfigurableSettings] -> ShowS
InputDeviceConfigurableSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputDeviceConfigurableSettings] -> ShowS
$cshowList :: [InputDeviceConfigurableSettings] -> ShowS
show :: InputDeviceConfigurableSettings -> String
$cshow :: InputDeviceConfigurableSettings -> String
showsPrec :: Int -> InputDeviceConfigurableSettings -> ShowS
$cshowsPrec :: Int -> InputDeviceConfigurableSettings -> ShowS
Prelude.Show, forall x.
Rep InputDeviceConfigurableSettings x
-> InputDeviceConfigurableSettings
forall x.
InputDeviceConfigurableSettings
-> Rep InputDeviceConfigurableSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InputDeviceConfigurableSettings x
-> InputDeviceConfigurableSettings
$cfrom :: forall x.
InputDeviceConfigurableSettings
-> Rep InputDeviceConfigurableSettings x
Prelude.Generic)
newInputDeviceConfigurableSettings ::
InputDeviceConfigurableSettings
newInputDeviceConfigurableSettings :: InputDeviceConfigurableSettings
newInputDeviceConfigurableSettings =
InputDeviceConfigurableSettings'
{ $sel:configuredInput:InputDeviceConfigurableSettings' :: Maybe InputDeviceConfiguredInput
configuredInput =
forall a. Maybe a
Prelude.Nothing,
$sel:latencyMs:InputDeviceConfigurableSettings' :: Maybe Int
latencyMs = forall a. Maybe a
Prelude.Nothing,
$sel:maxBitrate:InputDeviceConfigurableSettings' :: Maybe Int
maxBitrate = forall a. Maybe a
Prelude.Nothing
}
inputDeviceConfigurableSettings_configuredInput :: Lens.Lens' InputDeviceConfigurableSettings (Prelude.Maybe InputDeviceConfiguredInput)
inputDeviceConfigurableSettings_configuredInput :: Lens'
InputDeviceConfigurableSettings (Maybe InputDeviceConfiguredInput)
inputDeviceConfigurableSettings_configuredInput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceConfigurableSettings' {Maybe InputDeviceConfiguredInput
configuredInput :: Maybe InputDeviceConfiguredInput
$sel:configuredInput:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe InputDeviceConfiguredInput
configuredInput} -> Maybe InputDeviceConfiguredInput
configuredInput) (\s :: InputDeviceConfigurableSettings
s@InputDeviceConfigurableSettings' {} Maybe InputDeviceConfiguredInput
a -> InputDeviceConfigurableSettings
s {$sel:configuredInput:InputDeviceConfigurableSettings' :: Maybe InputDeviceConfiguredInput
configuredInput = Maybe InputDeviceConfiguredInput
a} :: InputDeviceConfigurableSettings)
inputDeviceConfigurableSettings_latencyMs :: Lens.Lens' InputDeviceConfigurableSettings (Prelude.Maybe Prelude.Int)
inputDeviceConfigurableSettings_latencyMs :: Lens' InputDeviceConfigurableSettings (Maybe Int)
inputDeviceConfigurableSettings_latencyMs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceConfigurableSettings' {Maybe Int
latencyMs :: Maybe Int
$sel:latencyMs:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe Int
latencyMs} -> Maybe Int
latencyMs) (\s :: InputDeviceConfigurableSettings
s@InputDeviceConfigurableSettings' {} Maybe Int
a -> InputDeviceConfigurableSettings
s {$sel:latencyMs:InputDeviceConfigurableSettings' :: Maybe Int
latencyMs = Maybe Int
a} :: InputDeviceConfigurableSettings)
inputDeviceConfigurableSettings_maxBitrate :: Lens.Lens' InputDeviceConfigurableSettings (Prelude.Maybe Prelude.Int)
inputDeviceConfigurableSettings_maxBitrate :: Lens' InputDeviceConfigurableSettings (Maybe Int)
inputDeviceConfigurableSettings_maxBitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceConfigurableSettings' {Maybe Int
maxBitrate :: Maybe Int
$sel:maxBitrate:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe Int
maxBitrate} -> Maybe Int
maxBitrate) (\s :: InputDeviceConfigurableSettings
s@InputDeviceConfigurableSettings' {} Maybe Int
a -> InputDeviceConfigurableSettings
s {$sel:maxBitrate:InputDeviceConfigurableSettings' :: Maybe Int
maxBitrate = Maybe Int
a} :: InputDeviceConfigurableSettings)
instance
Prelude.Hashable
InputDeviceConfigurableSettings
where
hashWithSalt :: Int -> InputDeviceConfigurableSettings -> Int
hashWithSalt
Int
_salt
InputDeviceConfigurableSettings' {Maybe Int
Maybe InputDeviceConfiguredInput
maxBitrate :: Maybe Int
latencyMs :: Maybe Int
configuredInput :: Maybe InputDeviceConfiguredInput
$sel:maxBitrate:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe Int
$sel:latencyMs:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe Int
$sel:configuredInput:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe InputDeviceConfiguredInput
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputDeviceConfiguredInput
configuredInput
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
latencyMs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxBitrate
instance
Prelude.NFData
InputDeviceConfigurableSettings
where
rnf :: InputDeviceConfigurableSettings -> ()
rnf InputDeviceConfigurableSettings' {Maybe Int
Maybe InputDeviceConfiguredInput
maxBitrate :: Maybe Int
latencyMs :: Maybe Int
configuredInput :: Maybe InputDeviceConfiguredInput
$sel:maxBitrate:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe Int
$sel:latencyMs:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe Int
$sel:configuredInput:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe InputDeviceConfiguredInput
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe InputDeviceConfiguredInput
configuredInput
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
latencyMs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxBitrate
instance Data.ToJSON InputDeviceConfigurableSettings where
toJSON :: InputDeviceConfigurableSettings -> Value
toJSON InputDeviceConfigurableSettings' {Maybe Int
Maybe InputDeviceConfiguredInput
maxBitrate :: Maybe Int
latencyMs :: Maybe Int
configuredInput :: Maybe InputDeviceConfiguredInput
$sel:maxBitrate:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe Int
$sel:latencyMs:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe Int
$sel:configuredInput:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe InputDeviceConfiguredInput
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"configuredInput" 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 InputDeviceConfiguredInput
configuredInput,
(Key
"latencyMs" 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
latencyMs,
(Key
"maxBitrate" 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
maxBitrate
]
)