{-# 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.InputDeviceHdSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.InputDeviceActiveInput
import Amazonka.MediaLive.Types.InputDeviceConfiguredInput
import Amazonka.MediaLive.Types.InputDeviceScanType
import Amazonka.MediaLive.Types.InputDeviceState
import qualified Amazonka.Prelude as Prelude
data InputDeviceHdSettings = InputDeviceHdSettings'
{
InputDeviceHdSettings -> Maybe Double
framerate :: Prelude.Maybe Prelude.Double,
InputDeviceHdSettings -> Maybe InputDeviceScanType
scanType :: Prelude.Maybe InputDeviceScanType,
InputDeviceHdSettings -> Maybe InputDeviceState
deviceState :: Prelude.Maybe InputDeviceState,
InputDeviceHdSettings -> Maybe Int
height :: Prelude.Maybe Prelude.Int,
InputDeviceHdSettings -> Maybe InputDeviceActiveInput
activeInput :: Prelude.Maybe InputDeviceActiveInput,
InputDeviceHdSettings -> Maybe Int
width :: Prelude.Maybe Prelude.Int,
InputDeviceHdSettings -> Maybe InputDeviceConfiguredInput
configuredInput :: Prelude.Maybe InputDeviceConfiguredInput,
InputDeviceHdSettings -> Maybe Int
maxBitrate :: Prelude.Maybe Prelude.Int
}
deriving (InputDeviceHdSettings -> InputDeviceHdSettings -> Bool
(InputDeviceHdSettings -> InputDeviceHdSettings -> Bool)
-> (InputDeviceHdSettings -> InputDeviceHdSettings -> Bool)
-> Eq InputDeviceHdSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputDeviceHdSettings -> InputDeviceHdSettings -> Bool
$c/= :: InputDeviceHdSettings -> InputDeviceHdSettings -> Bool
== :: InputDeviceHdSettings -> InputDeviceHdSettings -> Bool
$c== :: InputDeviceHdSettings -> InputDeviceHdSettings -> Bool
Prelude.Eq, ReadPrec [InputDeviceHdSettings]
ReadPrec InputDeviceHdSettings
Int -> ReadS InputDeviceHdSettings
ReadS [InputDeviceHdSettings]
(Int -> ReadS InputDeviceHdSettings)
-> ReadS [InputDeviceHdSettings]
-> ReadPrec InputDeviceHdSettings
-> ReadPrec [InputDeviceHdSettings]
-> Read InputDeviceHdSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputDeviceHdSettings]
$creadListPrec :: ReadPrec [InputDeviceHdSettings]
readPrec :: ReadPrec InputDeviceHdSettings
$creadPrec :: ReadPrec InputDeviceHdSettings
readList :: ReadS [InputDeviceHdSettings]
$creadList :: ReadS [InputDeviceHdSettings]
readsPrec :: Int -> ReadS InputDeviceHdSettings
$creadsPrec :: Int -> ReadS InputDeviceHdSettings
Prelude.Read, Int -> InputDeviceHdSettings -> ShowS
[InputDeviceHdSettings] -> ShowS
InputDeviceHdSettings -> String
(Int -> InputDeviceHdSettings -> ShowS)
-> (InputDeviceHdSettings -> String)
-> ([InputDeviceHdSettings] -> ShowS)
-> Show InputDeviceHdSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputDeviceHdSettings] -> ShowS
$cshowList :: [InputDeviceHdSettings] -> ShowS
show :: InputDeviceHdSettings -> String
$cshow :: InputDeviceHdSettings -> String
showsPrec :: Int -> InputDeviceHdSettings -> ShowS
$cshowsPrec :: Int -> InputDeviceHdSettings -> ShowS
Prelude.Show, (forall x. InputDeviceHdSettings -> Rep InputDeviceHdSettings x)
-> (forall x. Rep InputDeviceHdSettings x -> InputDeviceHdSettings)
-> Generic InputDeviceHdSettings
forall x. Rep InputDeviceHdSettings x -> InputDeviceHdSettings
forall x. InputDeviceHdSettings -> Rep InputDeviceHdSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InputDeviceHdSettings x -> InputDeviceHdSettings
$cfrom :: forall x. InputDeviceHdSettings -> Rep InputDeviceHdSettings x
Prelude.Generic)
newInputDeviceHdSettings ::
InputDeviceHdSettings
newInputDeviceHdSettings :: InputDeviceHdSettings
newInputDeviceHdSettings =
InputDeviceHdSettings' :: Maybe Double
-> Maybe InputDeviceScanType
-> Maybe InputDeviceState
-> Maybe Int
-> Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings
InputDeviceHdSettings'
{ $sel:framerate:InputDeviceHdSettings' :: Maybe Double
framerate = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:scanType:InputDeviceHdSettings' :: Maybe InputDeviceScanType
scanType = Maybe InputDeviceScanType
forall a. Maybe a
Prelude.Nothing,
$sel:deviceState:InputDeviceHdSettings' :: Maybe InputDeviceState
deviceState = Maybe InputDeviceState
forall a. Maybe a
Prelude.Nothing,
$sel:height:InputDeviceHdSettings' :: Maybe Int
height = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:activeInput:InputDeviceHdSettings' :: Maybe InputDeviceActiveInput
activeInput = Maybe InputDeviceActiveInput
forall a. Maybe a
Prelude.Nothing,
$sel:width:InputDeviceHdSettings' :: Maybe Int
width = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:configuredInput:InputDeviceHdSettings' :: Maybe InputDeviceConfiguredInput
configuredInput = Maybe InputDeviceConfiguredInput
forall a. Maybe a
Prelude.Nothing,
$sel:maxBitrate:InputDeviceHdSettings' :: Maybe Int
maxBitrate = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
inputDeviceHdSettings_framerate :: Lens.Lens' InputDeviceHdSettings (Prelude.Maybe Prelude.Double)
inputDeviceHdSettings_framerate :: (Maybe Double -> f (Maybe Double))
-> InputDeviceHdSettings -> f InputDeviceHdSettings
inputDeviceHdSettings_framerate = (InputDeviceHdSettings -> Maybe Double)
-> (InputDeviceHdSettings -> Maybe Double -> InputDeviceHdSettings)
-> Lens
InputDeviceHdSettings
InputDeviceHdSettings
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceHdSettings' {Maybe Double
framerate :: Maybe Double
$sel:framerate:InputDeviceHdSettings' :: InputDeviceHdSettings -> Maybe Double
framerate} -> Maybe Double
framerate) (\s :: InputDeviceHdSettings
s@InputDeviceHdSettings' {} Maybe Double
a -> InputDeviceHdSettings
s {$sel:framerate:InputDeviceHdSettings' :: Maybe Double
framerate = Maybe Double
a} :: InputDeviceHdSettings)
inputDeviceHdSettings_scanType :: Lens.Lens' InputDeviceHdSettings (Prelude.Maybe InputDeviceScanType)
inputDeviceHdSettings_scanType :: (Maybe InputDeviceScanType -> f (Maybe InputDeviceScanType))
-> InputDeviceHdSettings -> f InputDeviceHdSettings
inputDeviceHdSettings_scanType = (InputDeviceHdSettings -> Maybe InputDeviceScanType)
-> (InputDeviceHdSettings
-> Maybe InputDeviceScanType -> InputDeviceHdSettings)
-> Lens
InputDeviceHdSettings
InputDeviceHdSettings
(Maybe InputDeviceScanType)
(Maybe InputDeviceScanType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceHdSettings' {Maybe InputDeviceScanType
scanType :: Maybe InputDeviceScanType
$sel:scanType:InputDeviceHdSettings' :: InputDeviceHdSettings -> Maybe InputDeviceScanType
scanType} -> Maybe InputDeviceScanType
scanType) (\s :: InputDeviceHdSettings
s@InputDeviceHdSettings' {} Maybe InputDeviceScanType
a -> InputDeviceHdSettings
s {$sel:scanType:InputDeviceHdSettings' :: Maybe InputDeviceScanType
scanType = Maybe InputDeviceScanType
a} :: InputDeviceHdSettings)
inputDeviceHdSettings_deviceState :: Lens.Lens' InputDeviceHdSettings (Prelude.Maybe InputDeviceState)
inputDeviceHdSettings_deviceState :: (Maybe InputDeviceState -> f (Maybe InputDeviceState))
-> InputDeviceHdSettings -> f InputDeviceHdSettings
inputDeviceHdSettings_deviceState = (InputDeviceHdSettings -> Maybe InputDeviceState)
-> (InputDeviceHdSettings
-> Maybe InputDeviceState -> InputDeviceHdSettings)
-> Lens
InputDeviceHdSettings
InputDeviceHdSettings
(Maybe InputDeviceState)
(Maybe InputDeviceState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceHdSettings' {Maybe InputDeviceState
deviceState :: Maybe InputDeviceState
$sel:deviceState:InputDeviceHdSettings' :: InputDeviceHdSettings -> Maybe InputDeviceState
deviceState} -> Maybe InputDeviceState
deviceState) (\s :: InputDeviceHdSettings
s@InputDeviceHdSettings' {} Maybe InputDeviceState
a -> InputDeviceHdSettings
s {$sel:deviceState:InputDeviceHdSettings' :: Maybe InputDeviceState
deviceState = Maybe InputDeviceState
a} :: InputDeviceHdSettings)
inputDeviceHdSettings_height :: Lens.Lens' InputDeviceHdSettings (Prelude.Maybe Prelude.Int)
inputDeviceHdSettings_height :: (Maybe Int -> f (Maybe Int))
-> InputDeviceHdSettings -> f InputDeviceHdSettings
inputDeviceHdSettings_height = (InputDeviceHdSettings -> Maybe Int)
-> (InputDeviceHdSettings -> Maybe Int -> InputDeviceHdSettings)
-> Lens
InputDeviceHdSettings InputDeviceHdSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceHdSettings' {Maybe Int
height :: Maybe Int
$sel:height:InputDeviceHdSettings' :: InputDeviceHdSettings -> Maybe Int
height} -> Maybe Int
height) (\s :: InputDeviceHdSettings
s@InputDeviceHdSettings' {} Maybe Int
a -> InputDeviceHdSettings
s {$sel:height:InputDeviceHdSettings' :: Maybe Int
height = Maybe Int
a} :: InputDeviceHdSettings)
inputDeviceHdSettings_activeInput :: Lens.Lens' InputDeviceHdSettings (Prelude.Maybe InputDeviceActiveInput)
inputDeviceHdSettings_activeInput :: (Maybe InputDeviceActiveInput -> f (Maybe InputDeviceActiveInput))
-> InputDeviceHdSettings -> f InputDeviceHdSettings
inputDeviceHdSettings_activeInput = (InputDeviceHdSettings -> Maybe InputDeviceActiveInput)
-> (InputDeviceHdSettings
-> Maybe InputDeviceActiveInput -> InputDeviceHdSettings)
-> Lens
InputDeviceHdSettings
InputDeviceHdSettings
(Maybe InputDeviceActiveInput)
(Maybe InputDeviceActiveInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceHdSettings' {Maybe InputDeviceActiveInput
activeInput :: Maybe InputDeviceActiveInput
$sel:activeInput:InputDeviceHdSettings' :: InputDeviceHdSettings -> Maybe InputDeviceActiveInput
activeInput} -> Maybe InputDeviceActiveInput
activeInput) (\s :: InputDeviceHdSettings
s@InputDeviceHdSettings' {} Maybe InputDeviceActiveInput
a -> InputDeviceHdSettings
s {$sel:activeInput:InputDeviceHdSettings' :: Maybe InputDeviceActiveInput
activeInput = Maybe InputDeviceActiveInput
a} :: InputDeviceHdSettings)
inputDeviceHdSettings_width :: Lens.Lens' InputDeviceHdSettings (Prelude.Maybe Prelude.Int)
inputDeviceHdSettings_width :: (Maybe Int -> f (Maybe Int))
-> InputDeviceHdSettings -> f InputDeviceHdSettings
inputDeviceHdSettings_width = (InputDeviceHdSettings -> Maybe Int)
-> (InputDeviceHdSettings -> Maybe Int -> InputDeviceHdSettings)
-> Lens
InputDeviceHdSettings InputDeviceHdSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceHdSettings' {Maybe Int
width :: Maybe Int
$sel:width:InputDeviceHdSettings' :: InputDeviceHdSettings -> Maybe Int
width} -> Maybe Int
width) (\s :: InputDeviceHdSettings
s@InputDeviceHdSettings' {} Maybe Int
a -> InputDeviceHdSettings
s {$sel:width:InputDeviceHdSettings' :: Maybe Int
width = Maybe Int
a} :: InputDeviceHdSettings)
inputDeviceHdSettings_configuredInput :: Lens.Lens' InputDeviceHdSettings (Prelude.Maybe InputDeviceConfiguredInput)
inputDeviceHdSettings_configuredInput :: (Maybe InputDeviceConfiguredInput
-> f (Maybe InputDeviceConfiguredInput))
-> InputDeviceHdSettings -> f InputDeviceHdSettings
inputDeviceHdSettings_configuredInput = (InputDeviceHdSettings -> Maybe InputDeviceConfiguredInput)
-> (InputDeviceHdSettings
-> Maybe InputDeviceConfiguredInput -> InputDeviceHdSettings)
-> Lens
InputDeviceHdSettings
InputDeviceHdSettings
(Maybe InputDeviceConfiguredInput)
(Maybe InputDeviceConfiguredInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceHdSettings' {Maybe InputDeviceConfiguredInput
configuredInput :: Maybe InputDeviceConfiguredInput
$sel:configuredInput:InputDeviceHdSettings' :: InputDeviceHdSettings -> Maybe InputDeviceConfiguredInput
configuredInput} -> Maybe InputDeviceConfiguredInput
configuredInput) (\s :: InputDeviceHdSettings
s@InputDeviceHdSettings' {} Maybe InputDeviceConfiguredInput
a -> InputDeviceHdSettings
s {$sel:configuredInput:InputDeviceHdSettings' :: Maybe InputDeviceConfiguredInput
configuredInput = Maybe InputDeviceConfiguredInput
a} :: InputDeviceHdSettings)
inputDeviceHdSettings_maxBitrate :: Lens.Lens' InputDeviceHdSettings (Prelude.Maybe Prelude.Int)
inputDeviceHdSettings_maxBitrate :: (Maybe Int -> f (Maybe Int))
-> InputDeviceHdSettings -> f InputDeviceHdSettings
inputDeviceHdSettings_maxBitrate = (InputDeviceHdSettings -> Maybe Int)
-> (InputDeviceHdSettings -> Maybe Int -> InputDeviceHdSettings)
-> Lens
InputDeviceHdSettings InputDeviceHdSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceHdSettings' {Maybe Int
maxBitrate :: Maybe Int
$sel:maxBitrate:InputDeviceHdSettings' :: InputDeviceHdSettings -> Maybe Int
maxBitrate} -> Maybe Int
maxBitrate) (\s :: InputDeviceHdSettings
s@InputDeviceHdSettings' {} Maybe Int
a -> InputDeviceHdSettings
s {$sel:maxBitrate:InputDeviceHdSettings' :: Maybe Int
maxBitrate = Maybe Int
a} :: InputDeviceHdSettings)
instance Core.FromJSON InputDeviceHdSettings where
parseJSON :: Value -> Parser InputDeviceHdSettings
parseJSON =
String
-> (Object -> Parser InputDeviceHdSettings)
-> Value
-> Parser InputDeviceHdSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InputDeviceHdSettings"
( \Object
x ->
Maybe Double
-> Maybe InputDeviceScanType
-> Maybe InputDeviceState
-> Maybe Int
-> Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings
InputDeviceHdSettings'
(Maybe Double
-> Maybe InputDeviceScanType
-> Maybe InputDeviceState
-> Maybe Int
-> Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
-> Parser (Maybe Double)
-> Parser
(Maybe InputDeviceScanType
-> Maybe InputDeviceState
-> Maybe Int
-> Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerate")
Parser
(Maybe InputDeviceScanType
-> Maybe InputDeviceState
-> Maybe Int
-> Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
-> Parser (Maybe InputDeviceScanType)
-> Parser
(Maybe InputDeviceState
-> Maybe Int
-> Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputDeviceScanType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scanType")
Parser
(Maybe InputDeviceState
-> Maybe Int
-> Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
-> Parser (Maybe InputDeviceState)
-> Parser
(Maybe Int
-> Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputDeviceState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deviceState")
Parser
(Maybe Int
-> Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
-> Parser (Maybe Int)
-> Parser
(Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"height")
Parser
(Maybe InputDeviceActiveInput
-> Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
-> Parser (Maybe InputDeviceActiveInput)
-> Parser
(Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputDeviceActiveInput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"activeInput")
Parser
(Maybe Int
-> Maybe InputDeviceConfiguredInput
-> Maybe Int
-> InputDeviceHdSettings)
-> Parser (Maybe Int)
-> Parser
(Maybe InputDeviceConfiguredInput
-> Maybe Int -> InputDeviceHdSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"width")
Parser
(Maybe InputDeviceConfiguredInput
-> Maybe Int -> InputDeviceHdSettings)
-> Parser (Maybe InputDeviceConfiguredInput)
-> Parser (Maybe Int -> InputDeviceHdSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputDeviceConfiguredInput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configuredInput")
Parser (Maybe Int -> InputDeviceHdSettings)
-> Parser (Maybe Int) -> Parser InputDeviceHdSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxBitrate")
)
instance Prelude.Hashable InputDeviceHdSettings
instance Prelude.NFData InputDeviceHdSettings