{-# 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.ReservationResourceSpecification 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.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
data ReservationResourceSpecification = ReservationResourceSpecification'
{
ReservationResourceSpecification -> Maybe ChannelClass
channelClass :: Prelude.Maybe ChannelClass,
ReservationResourceSpecification -> Maybe ReservationCodec
codec :: Prelude.Maybe ReservationCodec,
ReservationResourceSpecification -> Maybe ReservationMaximumBitrate
maximumBitrate :: Prelude.Maybe ReservationMaximumBitrate,
ReservationResourceSpecification
-> Maybe ReservationMaximumFramerate
maximumFramerate :: Prelude.Maybe ReservationMaximumFramerate,
ReservationResourceSpecification -> Maybe ReservationResolution
resolution :: Prelude.Maybe ReservationResolution,
ReservationResourceSpecification -> Maybe ReservationResourceType
resourceType :: Prelude.Maybe ReservationResourceType,
ReservationResourceSpecification -> Maybe ReservationSpecialFeature
specialFeature :: Prelude.Maybe ReservationSpecialFeature,
ReservationResourceSpecification -> Maybe ReservationVideoQuality
videoQuality :: Prelude.Maybe ReservationVideoQuality
}
deriving (ReservationResourceSpecification
-> ReservationResourceSpecification -> Bool
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]
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
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.
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)
newReservationResourceSpecification ::
ReservationResourceSpecification
newReservationResourceSpecification :: ReservationResourceSpecification
newReservationResourceSpecification =
ReservationResourceSpecification'
{ $sel:channelClass:ReservationResourceSpecification' :: Maybe ChannelClass
channelClass =
forall a. Maybe a
Prelude.Nothing,
$sel:codec:ReservationResourceSpecification' :: Maybe ReservationCodec
codec = forall a. Maybe a
Prelude.Nothing,
$sel:maximumBitrate:ReservationResourceSpecification' :: Maybe ReservationMaximumBitrate
maximumBitrate = forall a. Maybe a
Prelude.Nothing,
$sel:maximumFramerate:ReservationResourceSpecification' :: Maybe ReservationMaximumFramerate
maximumFramerate = forall a. Maybe a
Prelude.Nothing,
$sel:resolution:ReservationResourceSpecification' :: Maybe ReservationResolution
resolution = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:ReservationResourceSpecification' :: Maybe ReservationResourceType
resourceType = forall a. Maybe a
Prelude.Nothing,
$sel:specialFeature:ReservationResourceSpecification' :: Maybe ReservationSpecialFeature
specialFeature = forall a. Maybe a
Prelude.Nothing,
$sel:videoQuality:ReservationResourceSpecification' :: Maybe ReservationVideoQuality
videoQuality = forall a. Maybe a
Prelude.Nothing
}
reservationResourceSpecification_channelClass :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ChannelClass)
reservationResourceSpecification_channelClass :: Lens' ReservationResourceSpecification (Maybe ChannelClass)
reservationResourceSpecification_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)
reservationResourceSpecification_codec :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationCodec)
reservationResourceSpecification_codec :: Lens' ReservationResourceSpecification (Maybe ReservationCodec)
reservationResourceSpecification_codec = 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)
reservationResourceSpecification_maximumBitrate :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationMaximumBitrate)
reservationResourceSpecification_maximumBitrate :: Lens'
ReservationResourceSpecification (Maybe ReservationMaximumBitrate)
reservationResourceSpecification_maximumBitrate = 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)
reservationResourceSpecification_maximumFramerate :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationMaximumFramerate)
reservationResourceSpecification_maximumFramerate :: Lens'
ReservationResourceSpecification
(Maybe ReservationMaximumFramerate)
reservationResourceSpecification_maximumFramerate = 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)
reservationResourceSpecification_resolution :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationResolution)
reservationResourceSpecification_resolution :: Lens'
ReservationResourceSpecification (Maybe ReservationResolution)
reservationResourceSpecification_resolution = 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)
reservationResourceSpecification_resourceType :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationResourceType)
reservationResourceSpecification_resourceType :: Lens'
ReservationResourceSpecification (Maybe ReservationResourceType)
reservationResourceSpecification_resourceType = 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)
reservationResourceSpecification_specialFeature :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationSpecialFeature)
reservationResourceSpecification_specialFeature :: Lens'
ReservationResourceSpecification (Maybe ReservationSpecialFeature)
reservationResourceSpecification_specialFeature = 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)
reservationResourceSpecification_videoQuality :: Lens.Lens' ReservationResourceSpecification (Prelude.Maybe ReservationVideoQuality)
reservationResourceSpecification_videoQuality :: Lens'
ReservationResourceSpecification (Maybe ReservationVideoQuality)
reservationResourceSpecification_videoQuality = 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)
instance
Data.FromJSON
ReservationResourceSpecification
where
parseJSON :: Value -> Parser ReservationResourceSpecification
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReservationResourceSpecification"
( \Object
x ->
Maybe ChannelClass
-> Maybe ReservationCodec
-> Maybe ReservationMaximumBitrate
-> Maybe ReservationMaximumFramerate
-> Maybe ReservationResolution
-> Maybe ReservationResourceType
-> Maybe ReservationSpecialFeature
-> Maybe ReservationVideoQuality
-> ReservationResourceSpecification
ReservationResourceSpecification'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"channelClass")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"codec")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"maximumBitrate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"maximumFramerate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"resolution")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"resourceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"specialFeature")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"videoQuality")
)
instance
Prelude.Hashable
ReservationResourceSpecification
where
hashWithSalt :: Int -> ReservationResourceSpecification -> Int
hashWithSalt
Int
_salt
ReservationResourceSpecification' {Maybe ChannelClass
Maybe ReservationCodec
Maybe ReservationMaximumBitrate
Maybe ReservationMaximumFramerate
Maybe ReservationResolution
Maybe ReservationResourceType
Maybe ReservationSpecialFeature
Maybe ReservationVideoQuality
videoQuality :: Maybe ReservationVideoQuality
specialFeature :: Maybe ReservationSpecialFeature
resourceType :: Maybe ReservationResourceType
resolution :: Maybe ReservationResolution
maximumFramerate :: Maybe ReservationMaximumFramerate
maximumBitrate :: Maybe ReservationMaximumBitrate
codec :: Maybe ReservationCodec
channelClass :: Maybe ChannelClass
$sel:videoQuality:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationVideoQuality
$sel:specialFeature:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationSpecialFeature
$sel:resourceType:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationResourceType
$sel:resolution:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationResolution
$sel:maximumFramerate:ReservationResourceSpecification' :: ReservationResourceSpecification
-> Maybe ReservationMaximumFramerate
$sel:maximumBitrate:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationMaximumBitrate
$sel:codec:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationCodec
$sel:channelClass:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ChannelClass
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChannelClass
channelClass
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationCodec
codec
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationMaximumBitrate
maximumBitrate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationMaximumFramerate
maximumFramerate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationResolution
resolution
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationResourceType
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationSpecialFeature
specialFeature
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationVideoQuality
videoQuality
instance
Prelude.NFData
ReservationResourceSpecification
where
rnf :: ReservationResourceSpecification -> ()
rnf ReservationResourceSpecification' {Maybe ChannelClass
Maybe ReservationCodec
Maybe ReservationMaximumBitrate
Maybe ReservationMaximumFramerate
Maybe ReservationResolution
Maybe ReservationResourceType
Maybe ReservationSpecialFeature
Maybe ReservationVideoQuality
videoQuality :: Maybe ReservationVideoQuality
specialFeature :: Maybe ReservationSpecialFeature
resourceType :: Maybe ReservationResourceType
resolution :: Maybe ReservationResolution
maximumFramerate :: Maybe ReservationMaximumFramerate
maximumBitrate :: Maybe ReservationMaximumBitrate
codec :: Maybe ReservationCodec
channelClass :: Maybe ChannelClass
$sel:videoQuality:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationVideoQuality
$sel:specialFeature:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationSpecialFeature
$sel:resourceType:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationResourceType
$sel:resolution:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationResolution
$sel:maximumFramerate:ReservationResourceSpecification' :: ReservationResourceSpecification
-> Maybe ReservationMaximumFramerate
$sel:maximumBitrate:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationMaximumBitrate
$sel:codec:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ReservationCodec
$sel:channelClass:ReservationResourceSpecification' :: ReservationResourceSpecification -> Maybe ChannelClass
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ChannelClass
channelClass
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationCodec
codec
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationMaximumBitrate
maximumBitrate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationMaximumFramerate
maximumFramerate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationResolution
resolution
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationResourceType
resourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationSpecialFeature
specialFeature
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationVideoQuality
videoQuality