{-# 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.MediaConvert.Types.H265QvbrSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data H265QvbrSettings = H265QvbrSettings'
{
H265QvbrSettings -> Maybe Double
qvbrQualityLevelFineTune :: Prelude.Maybe Prelude.Double,
H265QvbrSettings -> Maybe Natural
maxAverageBitrate :: Prelude.Maybe Prelude.Natural,
H265QvbrSettings -> Maybe Natural
qvbrQualityLevel :: Prelude.Maybe Prelude.Natural
}
deriving (H265QvbrSettings -> H265QvbrSettings -> Bool
(H265QvbrSettings -> H265QvbrSettings -> Bool)
-> (H265QvbrSettings -> H265QvbrSettings -> Bool)
-> Eq H265QvbrSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: H265QvbrSettings -> H265QvbrSettings -> Bool
$c/= :: H265QvbrSettings -> H265QvbrSettings -> Bool
== :: H265QvbrSettings -> H265QvbrSettings -> Bool
$c== :: H265QvbrSettings -> H265QvbrSettings -> Bool
Prelude.Eq, ReadPrec [H265QvbrSettings]
ReadPrec H265QvbrSettings
Int -> ReadS H265QvbrSettings
ReadS [H265QvbrSettings]
(Int -> ReadS H265QvbrSettings)
-> ReadS [H265QvbrSettings]
-> ReadPrec H265QvbrSettings
-> ReadPrec [H265QvbrSettings]
-> Read H265QvbrSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [H265QvbrSettings]
$creadListPrec :: ReadPrec [H265QvbrSettings]
readPrec :: ReadPrec H265QvbrSettings
$creadPrec :: ReadPrec H265QvbrSettings
readList :: ReadS [H265QvbrSettings]
$creadList :: ReadS [H265QvbrSettings]
readsPrec :: Int -> ReadS H265QvbrSettings
$creadsPrec :: Int -> ReadS H265QvbrSettings
Prelude.Read, Int -> H265QvbrSettings -> ShowS
[H265QvbrSettings] -> ShowS
H265QvbrSettings -> String
(Int -> H265QvbrSettings -> ShowS)
-> (H265QvbrSettings -> String)
-> ([H265QvbrSettings] -> ShowS)
-> Show H265QvbrSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [H265QvbrSettings] -> ShowS
$cshowList :: [H265QvbrSettings] -> ShowS
show :: H265QvbrSettings -> String
$cshow :: H265QvbrSettings -> String
showsPrec :: Int -> H265QvbrSettings -> ShowS
$cshowsPrec :: Int -> H265QvbrSettings -> ShowS
Prelude.Show, (forall x. H265QvbrSettings -> Rep H265QvbrSettings x)
-> (forall x. Rep H265QvbrSettings x -> H265QvbrSettings)
-> Generic H265QvbrSettings
forall x. Rep H265QvbrSettings x -> H265QvbrSettings
forall x. H265QvbrSettings -> Rep H265QvbrSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep H265QvbrSettings x -> H265QvbrSettings
$cfrom :: forall x. H265QvbrSettings -> Rep H265QvbrSettings x
Prelude.Generic)
newH265QvbrSettings ::
H265QvbrSettings
newH265QvbrSettings :: H265QvbrSettings
newH265QvbrSettings =
H265QvbrSettings' :: Maybe Double -> Maybe Natural -> Maybe Natural -> H265QvbrSettings
H265QvbrSettings'
{ $sel:qvbrQualityLevelFineTune:H265QvbrSettings' :: Maybe Double
qvbrQualityLevelFineTune =
Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:maxAverageBitrate:H265QvbrSettings' :: Maybe Natural
maxAverageBitrate = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:qvbrQualityLevel:H265QvbrSettings' :: Maybe Natural
qvbrQualityLevel = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
h265QvbrSettings_qvbrQualityLevelFineTune :: Lens.Lens' H265QvbrSettings (Prelude.Maybe Prelude.Double)
h265QvbrSettings_qvbrQualityLevelFineTune :: (Maybe Double -> f (Maybe Double))
-> H265QvbrSettings -> f H265QvbrSettings
h265QvbrSettings_qvbrQualityLevelFineTune = (H265QvbrSettings -> Maybe Double)
-> (H265QvbrSettings -> Maybe Double -> H265QvbrSettings)
-> Lens
H265QvbrSettings H265QvbrSettings (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\H265QvbrSettings' {Maybe Double
qvbrQualityLevelFineTune :: Maybe Double
$sel:qvbrQualityLevelFineTune:H265QvbrSettings' :: H265QvbrSettings -> Maybe Double
qvbrQualityLevelFineTune} -> Maybe Double
qvbrQualityLevelFineTune) (\s :: H265QvbrSettings
s@H265QvbrSettings' {} Maybe Double
a -> H265QvbrSettings
s {$sel:qvbrQualityLevelFineTune:H265QvbrSettings' :: Maybe Double
qvbrQualityLevelFineTune = Maybe Double
a} :: H265QvbrSettings)
h265QvbrSettings_maxAverageBitrate :: Lens.Lens' H265QvbrSettings (Prelude.Maybe Prelude.Natural)
h265QvbrSettings_maxAverageBitrate :: (Maybe Natural -> f (Maybe Natural))
-> H265QvbrSettings -> f H265QvbrSettings
h265QvbrSettings_maxAverageBitrate = (H265QvbrSettings -> Maybe Natural)
-> (H265QvbrSettings -> Maybe Natural -> H265QvbrSettings)
-> Lens
H265QvbrSettings H265QvbrSettings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\H265QvbrSettings' {Maybe Natural
maxAverageBitrate :: Maybe Natural
$sel:maxAverageBitrate:H265QvbrSettings' :: H265QvbrSettings -> Maybe Natural
maxAverageBitrate} -> Maybe Natural
maxAverageBitrate) (\s :: H265QvbrSettings
s@H265QvbrSettings' {} Maybe Natural
a -> H265QvbrSettings
s {$sel:maxAverageBitrate:H265QvbrSettings' :: Maybe Natural
maxAverageBitrate = Maybe Natural
a} :: H265QvbrSettings)
h265QvbrSettings_qvbrQualityLevel :: Lens.Lens' H265QvbrSettings (Prelude.Maybe Prelude.Natural)
h265QvbrSettings_qvbrQualityLevel :: (Maybe Natural -> f (Maybe Natural))
-> H265QvbrSettings -> f H265QvbrSettings
h265QvbrSettings_qvbrQualityLevel = (H265QvbrSettings -> Maybe Natural)
-> (H265QvbrSettings -> Maybe Natural -> H265QvbrSettings)
-> Lens
H265QvbrSettings H265QvbrSettings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\H265QvbrSettings' {Maybe Natural
qvbrQualityLevel :: Maybe Natural
$sel:qvbrQualityLevel:H265QvbrSettings' :: H265QvbrSettings -> Maybe Natural
qvbrQualityLevel} -> Maybe Natural
qvbrQualityLevel) (\s :: H265QvbrSettings
s@H265QvbrSettings' {} Maybe Natural
a -> H265QvbrSettings
s {$sel:qvbrQualityLevel:H265QvbrSettings' :: Maybe Natural
qvbrQualityLevel = Maybe Natural
a} :: H265QvbrSettings)
instance Core.FromJSON H265QvbrSettings where
parseJSON :: Value -> Parser H265QvbrSettings
parseJSON =
String
-> (Object -> Parser H265QvbrSettings)
-> Value
-> Parser H265QvbrSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"H265QvbrSettings"
( \Object
x ->
Maybe Double -> Maybe Natural -> Maybe Natural -> H265QvbrSettings
H265QvbrSettings'
(Maybe Double
-> Maybe Natural -> Maybe Natural -> H265QvbrSettings)
-> Parser (Maybe Double)
-> Parser (Maybe Natural -> Maybe Natural -> H265QvbrSettings)
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
"qvbrQualityLevelFineTune")
Parser (Maybe Natural -> Maybe Natural -> H265QvbrSettings)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> H265QvbrSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxAverageBitrate")
Parser (Maybe Natural -> H265QvbrSettings)
-> Parser (Maybe Natural) -> Parser H265QvbrSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"qvbrQualityLevel")
)
instance Prelude.Hashable H265QvbrSettings
instance Prelude.NFData H265QvbrSettings
instance Core.ToJSON H265QvbrSettings where
toJSON :: H265QvbrSettings -> Value
toJSON H265QvbrSettings' {Maybe Double
Maybe Natural
qvbrQualityLevel :: Maybe Natural
maxAverageBitrate :: Maybe Natural
qvbrQualityLevelFineTune :: Maybe Double
$sel:qvbrQualityLevel:H265QvbrSettings' :: H265QvbrSettings -> Maybe Natural
$sel:maxAverageBitrate:H265QvbrSettings' :: H265QvbrSettings -> Maybe Natural
$sel:qvbrQualityLevelFineTune:H265QvbrSettings' :: H265QvbrSettings -> Maybe Double
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"qvbrQualityLevelFineTune" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
qvbrQualityLevelFineTune,
(Text
"maxAverageBitrate" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxAverageBitrate,
(Text
"qvbrQualityLevel" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
qvbrQualityLevel
]
)