{-# 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.Lens as Lens
import Amazonka.MediaLive.Types.InputDeviceConfiguredInput
import qualified Amazonka.Prelude as Prelude
data InputDeviceConfigurableSettings = InputDeviceConfigurableSettings'
{
InputDeviceConfigurableSettings -> Maybe InputDeviceConfiguredInput
configuredInput :: Prelude.Maybe InputDeviceConfiguredInput,
InputDeviceConfigurableSettings -> Maybe Int
maxBitrate :: Prelude.Maybe Prelude.Int
}
deriving (InputDeviceConfigurableSettings
-> InputDeviceConfigurableSettings -> Bool
(InputDeviceConfigurableSettings
-> InputDeviceConfigurableSettings -> Bool)
-> (InputDeviceConfigurableSettings
-> InputDeviceConfigurableSettings -> Bool)
-> Eq InputDeviceConfigurableSettings
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]
(Int -> ReadS InputDeviceConfigurableSettings)
-> ReadS [InputDeviceConfigurableSettings]
-> ReadPrec InputDeviceConfigurableSettings
-> ReadPrec [InputDeviceConfigurableSettings]
-> Read 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
(Int -> InputDeviceConfigurableSettings -> ShowS)
-> (InputDeviceConfigurableSettings -> String)
-> ([InputDeviceConfigurableSettings] -> ShowS)
-> Show InputDeviceConfigurableSettings
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.
InputDeviceConfigurableSettings
-> Rep InputDeviceConfigurableSettings x)
-> (forall x.
Rep InputDeviceConfigurableSettings x
-> InputDeviceConfigurableSettings)
-> Generic InputDeviceConfigurableSettings
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' :: Maybe InputDeviceConfiguredInput
-> Maybe Int -> InputDeviceConfigurableSettings
InputDeviceConfigurableSettings'
{ $sel:configuredInput:InputDeviceConfigurableSettings' :: Maybe InputDeviceConfiguredInput
configuredInput =
Maybe InputDeviceConfiguredInput
forall a. Maybe a
Prelude.Nothing,
$sel:maxBitrate:InputDeviceConfigurableSettings' :: Maybe Int
maxBitrate = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
inputDeviceConfigurableSettings_configuredInput :: Lens.Lens' InputDeviceConfigurableSettings (Prelude.Maybe InputDeviceConfiguredInput)
inputDeviceConfigurableSettings_configuredInput :: (Maybe InputDeviceConfiguredInput
-> f (Maybe InputDeviceConfiguredInput))
-> InputDeviceConfigurableSettings
-> f InputDeviceConfigurableSettings
inputDeviceConfigurableSettings_configuredInput = (InputDeviceConfigurableSettings
-> Maybe InputDeviceConfiguredInput)
-> (InputDeviceConfigurableSettings
-> Maybe InputDeviceConfiguredInput
-> InputDeviceConfigurableSettings)
-> Lens
InputDeviceConfigurableSettings
InputDeviceConfigurableSettings
(Maybe InputDeviceConfiguredInput)
(Maybe InputDeviceConfiguredInput)
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_maxBitrate :: Lens.Lens' InputDeviceConfigurableSettings (Prelude.Maybe Prelude.Int)
inputDeviceConfigurableSettings_maxBitrate :: (Maybe Int -> f (Maybe Int))
-> InputDeviceConfigurableSettings
-> f InputDeviceConfigurableSettings
inputDeviceConfigurableSettings_maxBitrate = (InputDeviceConfigurableSettings -> Maybe Int)
-> (InputDeviceConfigurableSettings
-> Maybe Int -> InputDeviceConfigurableSettings)
-> Lens
InputDeviceConfigurableSettings
InputDeviceConfigurableSettings
(Maybe Int)
(Maybe Int)
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
instance
Prelude.NFData
InputDeviceConfigurableSettings
instance Core.ToJSON InputDeviceConfigurableSettings where
toJSON :: InputDeviceConfigurableSettings -> Value
toJSON InputDeviceConfigurableSettings' {Maybe Int
Maybe InputDeviceConfiguredInput
maxBitrate :: Maybe Int
configuredInput :: Maybe InputDeviceConfiguredInput
$sel:maxBitrate:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe Int
$sel:configuredInput:InputDeviceConfigurableSettings' :: InputDeviceConfigurableSettings -> Maybe InputDeviceConfiguredInput
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"configuredInput" Text -> InputDeviceConfiguredInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(InputDeviceConfiguredInput -> Pair)
-> Maybe InputDeviceConfiguredInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputDeviceConfiguredInput
configuredInput,
(Text
"maxBitrate" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxBitrate
]
)