{-# 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.ReservationResourceSpecification
-- 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.ReservationResourceSpecification where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.ChannelClass
import Amazonka.MediaLive.Types.ReservationCodec
import Amazonka.MediaLive.Types.ReservationMaximumBitrate
import Amazonka.MediaLive.Types.ReservationMaximumFramerate
import Amazonka.MediaLive.Types.ReservationResolution
import Amazonka.MediaLive.Types.ReservationResourceType
import Amazonka.MediaLive.Types.ReservationSpecialFeature
import Amazonka.MediaLive.Types.ReservationVideoQuality
import qualified Amazonka.Prelude as Prelude

-- | Resource configuration (codec, resolution, bitrate, ...)
--
-- /See:/ 'newReservationResourceSpecification' smart constructor.
data ReservationResourceSpecification = ReservationResourceSpecification'
  { -- | Video quality, e.g. \'STANDARD\' (Outputs only)
    ReservationResourceSpecification -> Maybe ReservationVideoQuality
videoQuality :: Prelude.Maybe ReservationVideoQuality,
    -- | Maximum framerate, e.g. \'MAX_30_FPS\' (Outputs only)
    ReservationResourceSpecification
-> Maybe ReservationMaximumFramerate
maximumFramerate :: Prelude.Maybe ReservationMaximumFramerate,
    -- | Resource type, \'INPUT\', \'OUTPUT\', \'MULTIPLEX\', or \'CHANNEL\'
    ReservationResourceSpecification -> Maybe ReservationResourceType
resourceType :: Prelude.Maybe ReservationResourceType,
    -- | Resolution, e.g. \'HD\'
    ReservationResourceSpecification -> Maybe ReservationResolution
resolution :: Prelude.Maybe ReservationResolution,
    -- | Codec, e.g. \'AVC\'
    ReservationResourceSpecification -> Maybe ReservationCodec
codec :: Prelude.Maybe ReservationCodec,
    -- | Special feature, e.g. \'AUDIO_NORMALIZATION\' (Channels only)
    ReservationResourceSpecification -> Maybe ReservationSpecialFeature
specialFeature :: Prelude.Maybe ReservationSpecialFeature,
    -- | Channel class, e.g. \'STANDARD\'
    ReservationResourceSpecification -> Maybe ChannelClass
channelClass :: Prelude.Maybe ChannelClass,
    -- | Maximum bitrate, e.g. \'MAX_20_MBPS\'
    ReservationResourceSpecification -> Maybe ReservationMaximumBitrate
maximumBitrate :: Prelude.Maybe ReservationMaximumBitrate
  }
  deriving (ReservationResourceSpecification
-> ReservationResourceSpecification -> Bool
(ReservationResourceSpecification
 -> ReservationResourceSpecification -> Bool)
-> (ReservationResourceSpecification
    -> ReservationResourceSpecification -> Bool)
-> Eq ReservationResourceSpecification
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReservationResourceSpecification
-> ReservationResourceSpecification -> Bool
$c/= :: ReservationResourceSpecification
-> ReservationResourceSpecification -> Bool
== :: ReservationResourceSpecification
-> ReservationResourceSpecification -> Bool
$c== :: ReservationResourceSpecification
-> ReservationResourceSpecification -> Bool
Prelude.Eq, ReadPrec [ReservationResourceSpecification]
ReadPrec ReservationResourceSpecification
Int -> ReadS ReservationResourceSpecification
ReadS [ReservationResourceSpecification]
(Int -> ReadS ReservationResourceSpecification)
-> ReadS [ReservationResourceSpecification]
-> ReadPrec ReservationResourceSpecification
-> ReadPrec [ReservationResourceSpecification]
-> Read ReservationResourceSpecification
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReservationResourceSpecification]
$creadListPrec :: ReadPrec [ReservationResourceSpecification]
readPrec :: ReadPrec ReservationResourceSpecification
$creadPrec :: ReadPrec ReservationResourceSpecification
readList :: ReadS [ReservationResourceSpecification]
$creadList :: ReadS [ReservationResourceSpecification]
readsPrec :: Int -> ReadS ReservationResourceSpecification
$creadsPrec :: Int -> ReadS ReservationResourceSpecification
Prelude.Read, Int -> ReservationResourceSpecification -> ShowS
[ReservationResourceSpecification] -> ShowS
ReservationResourceSpecification -> String
(Int -> ReservationResourceSpecification -> ShowS)
-> (ReservationResourceSpecification -> String)
-> ([ReservationResourceSpecification] -> ShowS)
-> Show ReservationResourceSpecification
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReservationResourceSpecification] -> ShowS
$cshowList :: [ReservationResourceSpecification] -> ShowS
show :: ReservationResourceSpecification -> String
$cshow :: ReservationResourceSpecification -> String
showsPrec :: Int -> ReservationResourceSpecification -> ShowS
$cshowsPrec :: Int -> ReservationResourceSpecification -> ShowS
Prelude.Show, (forall x.
 ReservationResourceSpecification
 -> Rep ReservationResourceSpecification x)
-> (forall x.
    Rep ReservationResourceSpecification x
    -> ReservationResourceSpecification)
-> Generic ReservationResourceSpecification
forall x.
Rep ReservationResourceSpecification x
-> ReservationResourceSpecification
forall x.
ReservationResourceSpecification
-> Rep ReservationResourceSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReservationResourceSpecification x
-> ReservationResourceSpecification
$cfrom :: forall x.
ReservationResourceSpecification
-> Rep ReservationResourceSpecification x
Prelude.Generic)

-- |
-- Create a value of 'ReservationResourceSpecification' 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:
--
-- 'videoQuality', 'reservationResourceSpecification_videoQuality' - Video quality, e.g. \'STANDARD\' (Outputs only)
--
-- 'maximumFramerate', 'reservationResourceSpecification_maximumFramerate' - Maximum framerate, e.g. \'MAX_30_FPS\' (Outputs only)
--
-- 'resourceType', 'reservationResourceSpecification_resourceType' - Resource type, \'INPUT\', \'OUTPUT\', \'MULTIPLEX\', or \'CHANNEL\'
--
-- 'resolution', 'reservationResourceSpecification_resolution' - Resolution, e.g. \'HD\'
--
-- 'codec', 'reservationResourceSpecification_codec' - Codec, e.g. \'AVC\'
--
-- 'specialFeature', 'reservationResourceSpecification_specialFeature' - Special feature, e.g. \'AUDIO_NORMALIZATION\' (Channels only)
--
-- 'channelClass', 'reservationResourceSpecification_channelClass' - Channel class, e.g. \'STANDARD\'
--
-- 'maximumBitrate', 'reservationResourceSpecification_maximumBitrate' - Maximum bitrate, e.g. \'MAX_20_MBPS\'
newReservationResourceSpecification ::
  ReservationResourceSpecification
newReservationResourceSpecification :: ReservationResourceSpecification
newReservationResourceSpecification =
  ReservationResourceSpecification' :: Maybe ReservationVideoQuality
-> Maybe ReservationMaximumFramerate
-> Maybe ReservationResourceType
-> Maybe ReservationResolution
-> Maybe ReservationCodec
-> Maybe ReservationSpecialFeature
-> Maybe ChannelClass
-> Maybe ReservationMaximumBitrate
-> ReservationResourceSpecification
ReservationResourceSpecification'
    { $sel:videoQuality:ReservationResourceSpecification' :: Maybe ReservationVideoQuality
videoQuality =
        Maybe ReservationVideoQuality
forall a. Maybe a
Prelude.Nothing,
      $sel:maximumFramerate:ReservationResourceSpecification' :: Maybe ReservationMaximumFramerate
maximumFramerate = Maybe ReservationMaximumFramerate
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:ReservationResourceSpecification' :: Maybe ReservationResourceType
resourceType = Maybe ReservationResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:resolution:ReservationResourceSpecification' :: Maybe ReservationResolution
resolution = Maybe ReservationResolution
forall a. Maybe a
Prelude.Nothing,
      $sel:codec:ReservationResourceSpecification' :: Maybe ReservationCodec
codec = Maybe ReservationCodec
forall a. Maybe a
Prelude.Nothing,
      $sel:specialFeature:ReservationResourceSpecification' :: Maybe ReservationSpecialFeature
specialFeature = Maybe ReservationSpecialFeature
forall a. Maybe a
Prelude.Nothing,
      $sel:channelClass:ReservationResourceSpecification' :: Maybe ChannelClass
channelClass = Maybe ChannelClass
forall a. Maybe a
Prelude.Nothing,
      $sel:maximumBitrate:ReservationResourceSpecification' :: Maybe ReservationMaximumBitrate
maximumBitrate = Maybe ReservationMaximumBitrate
forall a. Maybe a
Prelude.Nothing
    }

-- | Video quality, e.g. \'STANDARD\' (Outputs only)
reservationResourceSpecification_videoQuality :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationVideoQuality)
reservationResourceSpecification_videoQuality :: (Maybe ReservationVideoQuality
 -> f (Maybe ReservationVideoQuality))
-> ReservationResourceSpecification
-> f ReservationResourceSpecification
reservationResourceSpecification_videoQuality = (ReservationResourceSpecification -> Maybe ReservationVideoQuality)
-> (ReservationResourceSpecification
    -> Maybe ReservationVideoQuality
    -> ReservationResourceSpecification)
-> Lens
     ReservationResourceSpecification
     ReservationResourceSpecification
     (Maybe ReservationVideoQuality)
     (Maybe ReservationVideoQuality)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationResourceSpecification' {Maybe ReservationVideoQuality
videoQuality :: Maybe ReservationVideoQuality
$sel:videoQuality:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationVideoQuality
videoQuality} -> Maybe ReservationVideoQuality
videoQuality) (\s :: ReservationResourceSpecification
s@ReservationResourceSpecification' {} Maybe ReservationVideoQuality
a -> ReservationResourceSpecification
s {$sel:videoQuality:ReservationResourceSpecification' :: Maybe ReservationVideoQuality
videoQuality = Maybe ReservationVideoQuality
a} :: ReservationResourceSpecification)

-- | Maximum framerate, e.g. \'MAX_30_FPS\' (Outputs only)
reservationResourceSpecification_maximumFramerate :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationMaximumFramerate)
reservationResourceSpecification_maximumFramerate :: (Maybe ReservationMaximumFramerate
 -> f (Maybe ReservationMaximumFramerate))
-> ReservationResourceSpecification
-> f ReservationResourceSpecification
reservationResourceSpecification_maximumFramerate = (ReservationResourceSpecification
 -> Maybe ReservationMaximumFramerate)
-> (ReservationResourceSpecification
    -> Maybe ReservationMaximumFramerate
    -> ReservationResourceSpecification)
-> Lens
     ReservationResourceSpecification
     ReservationResourceSpecification
     (Maybe ReservationMaximumFramerate)
     (Maybe ReservationMaximumFramerate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationResourceSpecification' {Maybe ReservationMaximumFramerate
maximumFramerate :: Maybe ReservationMaximumFramerate
$sel:maximumFramerate:ReservationResourceSpecification' :: ReservationResourceSpecification
-> Maybe ReservationMaximumFramerate
maximumFramerate} -> Maybe ReservationMaximumFramerate
maximumFramerate) (\s :: ReservationResourceSpecification
s@ReservationResourceSpecification' {} Maybe ReservationMaximumFramerate
a -> ReservationResourceSpecification
s {$sel:maximumFramerate:ReservationResourceSpecification' :: Maybe ReservationMaximumFramerate
maximumFramerate = Maybe ReservationMaximumFramerate
a} :: ReservationResourceSpecification)

-- | Resource type, \'INPUT\', \'OUTPUT\', \'MULTIPLEX\', or \'CHANNEL\'
reservationResourceSpecification_resourceType :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationResourceType)
reservationResourceSpecification_resourceType :: (Maybe ReservationResourceType
 -> f (Maybe ReservationResourceType))
-> ReservationResourceSpecification
-> f ReservationResourceSpecification
reservationResourceSpecification_resourceType = (ReservationResourceSpecification -> Maybe ReservationResourceType)
-> (ReservationResourceSpecification
    -> Maybe ReservationResourceType
    -> ReservationResourceSpecification)
-> Lens
     ReservationResourceSpecification
     ReservationResourceSpecification
     (Maybe ReservationResourceType)
     (Maybe ReservationResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationResourceSpecification' {Maybe ReservationResourceType
resourceType :: Maybe ReservationResourceType
$sel:resourceType:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationResourceType
resourceType} -> Maybe ReservationResourceType
resourceType) (\s :: ReservationResourceSpecification
s@ReservationResourceSpecification' {} Maybe ReservationResourceType
a -> ReservationResourceSpecification
s {$sel:resourceType:ReservationResourceSpecification' :: Maybe ReservationResourceType
resourceType = Maybe ReservationResourceType
a} :: ReservationResourceSpecification)

-- | Resolution, e.g. \'HD\'
reservationResourceSpecification_resolution :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationResolution)
reservationResourceSpecification_resolution :: (Maybe ReservationResolution -> f (Maybe ReservationResolution))
-> ReservationResourceSpecification
-> f ReservationResourceSpecification
reservationResourceSpecification_resolution = (ReservationResourceSpecification -> Maybe ReservationResolution)
-> (ReservationResourceSpecification
    -> Maybe ReservationResolution -> ReservationResourceSpecification)
-> Lens
     ReservationResourceSpecification
     ReservationResourceSpecification
     (Maybe ReservationResolution)
     (Maybe ReservationResolution)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationResourceSpecification' {Maybe ReservationResolution
resolution :: Maybe ReservationResolution
$sel:resolution:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationResolution
resolution} -> Maybe ReservationResolution
resolution) (\s :: ReservationResourceSpecification
s@ReservationResourceSpecification' {} Maybe ReservationResolution
a -> ReservationResourceSpecification
s {$sel:resolution:ReservationResourceSpecification' :: Maybe ReservationResolution
resolution = Maybe ReservationResolution
a} :: ReservationResourceSpecification)

-- | Codec, e.g. \'AVC\'
reservationResourceSpecification_codec :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationCodec)
reservationResourceSpecification_codec :: (Maybe ReservationCodec -> f (Maybe ReservationCodec))
-> ReservationResourceSpecification
-> f ReservationResourceSpecification
reservationResourceSpecification_codec = (ReservationResourceSpecification -> Maybe ReservationCodec)
-> (ReservationResourceSpecification
    -> Maybe ReservationCodec -> ReservationResourceSpecification)
-> Lens
     ReservationResourceSpecification
     ReservationResourceSpecification
     (Maybe ReservationCodec)
     (Maybe ReservationCodec)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationResourceSpecification' {Maybe ReservationCodec
codec :: Maybe ReservationCodec
$sel:codec:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationCodec
codec} -> Maybe ReservationCodec
codec) (\s :: ReservationResourceSpecification
s@ReservationResourceSpecification' {} Maybe ReservationCodec
a -> ReservationResourceSpecification
s {$sel:codec:ReservationResourceSpecification' :: Maybe ReservationCodec
codec = Maybe ReservationCodec
a} :: ReservationResourceSpecification)

-- | Special feature, e.g. \'AUDIO_NORMALIZATION\' (Channels only)
reservationResourceSpecification_specialFeature :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationSpecialFeature)
reservationResourceSpecification_specialFeature :: (Maybe ReservationSpecialFeature
 -> f (Maybe ReservationSpecialFeature))
-> ReservationResourceSpecification
-> f ReservationResourceSpecification
reservationResourceSpecification_specialFeature = (ReservationResourceSpecification
 -> Maybe ReservationSpecialFeature)
-> (ReservationResourceSpecification
    -> Maybe ReservationSpecialFeature
    -> ReservationResourceSpecification)
-> Lens
     ReservationResourceSpecification
     ReservationResourceSpecification
     (Maybe ReservationSpecialFeature)
     (Maybe ReservationSpecialFeature)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationResourceSpecification' {Maybe ReservationSpecialFeature
specialFeature :: Maybe ReservationSpecialFeature
$sel:specialFeature:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationSpecialFeature
specialFeature} -> Maybe ReservationSpecialFeature
specialFeature) (\s :: ReservationResourceSpecification
s@ReservationResourceSpecification' {} Maybe ReservationSpecialFeature
a -> ReservationResourceSpecification
s {$sel:specialFeature:ReservationResourceSpecification' :: Maybe ReservationSpecialFeature
specialFeature = Maybe ReservationSpecialFeature
a} :: ReservationResourceSpecification)

-- | Channel class, e.g. \'STANDARD\'
reservationResourceSpecification_channelClass :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ChannelClass)
reservationResourceSpecification_channelClass :: (Maybe ChannelClass -> f (Maybe ChannelClass))
-> ReservationResourceSpecification
-> f ReservationResourceSpecification
reservationResourceSpecification_channelClass = (ReservationResourceSpecification -> Maybe ChannelClass)
-> (ReservationResourceSpecification
    -> Maybe ChannelClass -> ReservationResourceSpecification)
-> Lens
     ReservationResourceSpecification
     ReservationResourceSpecification
     (Maybe ChannelClass)
     (Maybe ChannelClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationResourceSpecification' {Maybe ChannelClass
channelClass :: Maybe ChannelClass
$sel:channelClass:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ChannelClass
channelClass} -> Maybe ChannelClass
channelClass) (\s :: ReservationResourceSpecification
s@ReservationResourceSpecification' {} Maybe ChannelClass
a -> ReservationResourceSpecification
s {$sel:channelClass:ReservationResourceSpecification' :: Maybe ChannelClass
channelClass = Maybe ChannelClass
a} :: ReservationResourceSpecification)

-- | Maximum bitrate, e.g. \'MAX_20_MBPS\'
reservationResourceSpecification_maximumBitrate :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationMaximumBitrate)
reservationResourceSpecification_maximumBitrate :: (Maybe ReservationMaximumBitrate
 -> f (Maybe ReservationMaximumBitrate))
-> ReservationResourceSpecification
-> f ReservationResourceSpecification
reservationResourceSpecification_maximumBitrate = (ReservationResourceSpecification
 -> Maybe ReservationMaximumBitrate)
-> (ReservationResourceSpecification
    -> Maybe ReservationMaximumBitrate
    -> ReservationResourceSpecification)
-> Lens
     ReservationResourceSpecification
     ReservationResourceSpecification
     (Maybe ReservationMaximumBitrate)
     (Maybe ReservationMaximumBitrate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationResourceSpecification' {Maybe ReservationMaximumBitrate
maximumBitrate :: Maybe ReservationMaximumBitrate
$sel:maximumBitrate:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationMaximumBitrate
maximumBitrate} -> Maybe ReservationMaximumBitrate
maximumBitrate) (\s :: ReservationResourceSpecification
s@ReservationResourceSpecification' {} Maybe ReservationMaximumBitrate
a -> ReservationResourceSpecification
s {$sel:maximumBitrate:ReservationResourceSpecification' :: Maybe ReservationMaximumBitrate
maximumBitrate = Maybe ReservationMaximumBitrate
a} :: ReservationResourceSpecification)

instance
  Core.FromJSON
    ReservationResourceSpecification
  where
  parseJSON :: Value -> Parser ReservationResourceSpecification
parseJSON =
    String
-> (Object -> Parser ReservationResourceSpecification)
-> Value
-> Parser ReservationResourceSpecification
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReservationResourceSpecification"
      ( \Object
x ->
          Maybe ReservationVideoQuality
-> Maybe ReservationMaximumFramerate
-> Maybe ReservationResourceType
-> Maybe ReservationResolution
-> Maybe ReservationCodec
-> Maybe ReservationSpecialFeature
-> Maybe ChannelClass
-> Maybe ReservationMaximumBitrate
-> ReservationResourceSpecification
ReservationResourceSpecification'
            (Maybe ReservationVideoQuality
 -> Maybe ReservationMaximumFramerate
 -> Maybe ReservationResourceType
 -> Maybe ReservationResolution
 -> Maybe ReservationCodec
 -> Maybe ReservationSpecialFeature
 -> Maybe ChannelClass
 -> Maybe ReservationMaximumBitrate
 -> ReservationResourceSpecification)
-> Parser (Maybe ReservationVideoQuality)
-> Parser
     (Maybe ReservationMaximumFramerate
      -> Maybe ReservationResourceType
      -> Maybe ReservationResolution
      -> Maybe ReservationCodec
      -> Maybe ReservationSpecialFeature
      -> Maybe ChannelClass
      -> Maybe ReservationMaximumBitrate
      -> ReservationResourceSpecification)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReservationVideoQuality)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"videoQuality")
            Parser
  (Maybe ReservationMaximumFramerate
   -> Maybe ReservationResourceType
   -> Maybe ReservationResolution
   -> Maybe ReservationCodec
   -> Maybe ReservationSpecialFeature
   -> Maybe ChannelClass
   -> Maybe ReservationMaximumBitrate
   -> ReservationResourceSpecification)
-> Parser (Maybe ReservationMaximumFramerate)
-> Parser
     (Maybe ReservationResourceType
      -> Maybe ReservationResolution
      -> Maybe ReservationCodec
      -> Maybe ReservationSpecialFeature
      -> Maybe ChannelClass
      -> Maybe ReservationMaximumBitrate
      -> ReservationResourceSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReservationMaximumFramerate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maximumFramerate")
            Parser
  (Maybe ReservationResourceType
   -> Maybe ReservationResolution
   -> Maybe ReservationCodec
   -> Maybe ReservationSpecialFeature
   -> Maybe ChannelClass
   -> Maybe ReservationMaximumBitrate
   -> ReservationResourceSpecification)
-> Parser (Maybe ReservationResourceType)
-> Parser
     (Maybe ReservationResolution
      -> Maybe ReservationCodec
      -> Maybe ReservationSpecialFeature
      -> Maybe ChannelClass
      -> Maybe ReservationMaximumBitrate
      -> ReservationResourceSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReservationResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
            Parser
  (Maybe ReservationResolution
   -> Maybe ReservationCodec
   -> Maybe ReservationSpecialFeature
   -> Maybe ChannelClass
   -> Maybe ReservationMaximumBitrate
   -> ReservationResourceSpecification)
-> Parser (Maybe ReservationResolution)
-> Parser
     (Maybe ReservationCodec
      -> Maybe ReservationSpecialFeature
      -> Maybe ChannelClass
      -> Maybe ReservationMaximumBitrate
      -> ReservationResourceSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReservationResolution)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resolution")
            Parser
  (Maybe ReservationCodec
   -> Maybe ReservationSpecialFeature
   -> Maybe ChannelClass
   -> Maybe ReservationMaximumBitrate
   -> ReservationResourceSpecification)
-> Parser (Maybe ReservationCodec)
-> Parser
     (Maybe ReservationSpecialFeature
      -> Maybe ChannelClass
      -> Maybe ReservationMaximumBitrate
      -> ReservationResourceSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReservationCodec)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"codec")
            Parser
  (Maybe ReservationSpecialFeature
   -> Maybe ChannelClass
   -> Maybe ReservationMaximumBitrate
   -> ReservationResourceSpecification)
-> Parser (Maybe ReservationSpecialFeature)
-> Parser
     (Maybe ChannelClass
      -> Maybe ReservationMaximumBitrate
      -> ReservationResourceSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReservationSpecialFeature)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"specialFeature")
            Parser
  (Maybe ChannelClass
   -> Maybe ReservationMaximumBitrate
   -> ReservationResourceSpecification)
-> Parser (Maybe ChannelClass)
-> Parser
     (Maybe ReservationMaximumBitrate
      -> ReservationResourceSpecification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelClass)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"channelClass")
            Parser
  (Maybe ReservationMaximumBitrate
   -> ReservationResourceSpecification)
-> Parser (Maybe ReservationMaximumBitrate)
-> Parser ReservationResourceSpecification
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReservationMaximumBitrate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maximumBitrate")
      )

instance
  Prelude.Hashable
    ReservationResourceSpecification

instance
  Prelude.NFData
    ReservationResourceSpecification