{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaLive.Types.InputDeviceHdSettings
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Settings that describe the active source from the input device, and the
-- video characteristics of that source.
--
-- /See:/ 'newInputDeviceHdSettings' smart constructor.
data InputDeviceHdSettings = InputDeviceHdSettings'
  { -- | The frame rate of the video source.
    InputDeviceHdSettings -> Maybe Double
framerate :: Prelude.Maybe Prelude.Double,
    -- | The scan type of the video source.
    InputDeviceHdSettings -> Maybe InputDeviceScanType
scanType :: Prelude.Maybe InputDeviceScanType,
    -- | The state of the input device.
    InputDeviceHdSettings -> Maybe InputDeviceState
deviceState :: Prelude.Maybe InputDeviceState,
    -- | The height of the video source, in pixels.
    InputDeviceHdSettings -> Maybe Int
height :: Prelude.Maybe Prelude.Int,
    -- | If you specified Auto as the configured input, specifies which of the
    -- sources is currently active (SDI or HDMI).
    InputDeviceHdSettings -> Maybe InputDeviceActiveInput
activeInput :: Prelude.Maybe InputDeviceActiveInput,
    -- | The width of the video source, in pixels.
    InputDeviceHdSettings -> Maybe Int
width :: Prelude.Maybe Prelude.Int,
    -- | The source at the input device that is currently active. You can specify
    -- this source.
    InputDeviceHdSettings -> Maybe InputDeviceConfiguredInput
configuredInput :: Prelude.Maybe InputDeviceConfiguredInput,
    -- | The current maximum bitrate for ingesting this source, in bits per
    -- second. You can specify this maximum.
    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)

-- |
-- Create a value of 'InputDeviceHdSettings' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'framerate', 'inputDeviceHdSettings_framerate' - The frame rate of the video source.
--
-- 'scanType', 'inputDeviceHdSettings_scanType' - The scan type of the video source.
--
-- 'deviceState', 'inputDeviceHdSettings_deviceState' - The state of the input device.
--
-- 'height', 'inputDeviceHdSettings_height' - The height of the video source, in pixels.
--
-- 'activeInput', 'inputDeviceHdSettings_activeInput' - If you specified Auto as the configured input, specifies which of the
-- sources is currently active (SDI or HDMI).
--
-- 'width', 'inputDeviceHdSettings_width' - The width of the video source, in pixels.
--
-- 'configuredInput', 'inputDeviceHdSettings_configuredInput' - The source at the input device that is currently active. You can specify
-- this source.
--
-- 'maxBitrate', 'inputDeviceHdSettings_maxBitrate' - The current maximum bitrate for ingesting this source, in bits per
-- second. You can specify this maximum.
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
    }

-- | The frame rate of the video source.
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)

-- | The scan type of the video source.
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)

-- | The state of the input device.
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)

-- | The height of the video source, in pixels.
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)

-- | If you specified Auto as the configured input, specifies which of the
-- sources is currently active (SDI or HDMI).
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)

-- | The width of the video source, in pixels.
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)

-- | The source at the input device that is currently active. You can specify
-- this source.
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)

-- | The current maximum bitrate for ingesting this source, in bits per
-- second. You can specify this maximum.
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