{-# 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.MediaConnect.Types.EncodingParameters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.Types.EncoderProfile
import qualified Amazonka.Prelude as Prelude
data EncodingParameters = EncodingParameters'
{
EncodingParameters -> EncoderProfile
encoderProfile :: EncoderProfile,
EncodingParameters -> Double
compressionFactor :: Prelude.Double
}
deriving (EncodingParameters -> EncodingParameters -> Bool
(EncodingParameters -> EncodingParameters -> Bool)
-> (EncodingParameters -> EncodingParameters -> Bool)
-> Eq EncodingParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EncodingParameters -> EncodingParameters -> Bool
$c/= :: EncodingParameters -> EncodingParameters -> Bool
== :: EncodingParameters -> EncodingParameters -> Bool
$c== :: EncodingParameters -> EncodingParameters -> Bool
Prelude.Eq, ReadPrec [EncodingParameters]
ReadPrec EncodingParameters
Int -> ReadS EncodingParameters
ReadS [EncodingParameters]
(Int -> ReadS EncodingParameters)
-> ReadS [EncodingParameters]
-> ReadPrec EncodingParameters
-> ReadPrec [EncodingParameters]
-> Read EncodingParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EncodingParameters]
$creadListPrec :: ReadPrec [EncodingParameters]
readPrec :: ReadPrec EncodingParameters
$creadPrec :: ReadPrec EncodingParameters
readList :: ReadS [EncodingParameters]
$creadList :: ReadS [EncodingParameters]
readsPrec :: Int -> ReadS EncodingParameters
$creadsPrec :: Int -> ReadS EncodingParameters
Prelude.Read, Int -> EncodingParameters -> ShowS
[EncodingParameters] -> ShowS
EncodingParameters -> String
(Int -> EncodingParameters -> ShowS)
-> (EncodingParameters -> String)
-> ([EncodingParameters] -> ShowS)
-> Show EncodingParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EncodingParameters] -> ShowS
$cshowList :: [EncodingParameters] -> ShowS
show :: EncodingParameters -> String
$cshow :: EncodingParameters -> String
showsPrec :: Int -> EncodingParameters -> ShowS
$cshowsPrec :: Int -> EncodingParameters -> ShowS
Prelude.Show, (forall x. EncodingParameters -> Rep EncodingParameters x)
-> (forall x. Rep EncodingParameters x -> EncodingParameters)
-> Generic EncodingParameters
forall x. Rep EncodingParameters x -> EncodingParameters
forall x. EncodingParameters -> Rep EncodingParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EncodingParameters x -> EncodingParameters
$cfrom :: forall x. EncodingParameters -> Rep EncodingParameters x
Prelude.Generic)
newEncodingParameters ::
EncoderProfile ->
Prelude.Double ->
EncodingParameters
newEncodingParameters :: EncoderProfile -> Double -> EncodingParameters
newEncodingParameters
EncoderProfile
pEncoderProfile_
Double
pCompressionFactor_ =
EncodingParameters' :: EncoderProfile -> Double -> EncodingParameters
EncodingParameters'
{ $sel:encoderProfile:EncodingParameters' :: EncoderProfile
encoderProfile =
EncoderProfile
pEncoderProfile_,
$sel:compressionFactor:EncodingParameters' :: Double
compressionFactor = Double
pCompressionFactor_
}
encodingParameters_encoderProfile :: Lens.Lens' EncodingParameters EncoderProfile
encodingParameters_encoderProfile :: (EncoderProfile -> f EncoderProfile)
-> EncodingParameters -> f EncodingParameters
encodingParameters_encoderProfile = (EncodingParameters -> EncoderProfile)
-> (EncodingParameters -> EncoderProfile -> EncodingParameters)
-> Lens
EncodingParameters EncodingParameters EncoderProfile EncoderProfile
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncodingParameters' {EncoderProfile
encoderProfile :: EncoderProfile
$sel:encoderProfile:EncodingParameters' :: EncodingParameters -> EncoderProfile
encoderProfile} -> EncoderProfile
encoderProfile) (\s :: EncodingParameters
s@EncodingParameters' {} EncoderProfile
a -> EncodingParameters
s {$sel:encoderProfile:EncodingParameters' :: EncoderProfile
encoderProfile = EncoderProfile
a} :: EncodingParameters)
encodingParameters_compressionFactor :: Lens.Lens' EncodingParameters Prelude.Double
encodingParameters_compressionFactor :: (Double -> f Double) -> EncodingParameters -> f EncodingParameters
encodingParameters_compressionFactor = (EncodingParameters -> Double)
-> (EncodingParameters -> Double -> EncodingParameters)
-> Lens EncodingParameters EncodingParameters Double Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncodingParameters' {Double
compressionFactor :: Double
$sel:compressionFactor:EncodingParameters' :: EncodingParameters -> Double
compressionFactor} -> Double
compressionFactor) (\s :: EncodingParameters
s@EncodingParameters' {} Double
a -> EncodingParameters
s {$sel:compressionFactor:EncodingParameters' :: Double
compressionFactor = Double
a} :: EncodingParameters)
instance Core.FromJSON EncodingParameters where
parseJSON :: Value -> Parser EncodingParameters
parseJSON =
String
-> (Object -> Parser EncodingParameters)
-> Value
-> Parser EncodingParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EncodingParameters"
( \Object
x ->
EncoderProfile -> Double -> EncodingParameters
EncodingParameters'
(EncoderProfile -> Double -> EncodingParameters)
-> Parser EncoderProfile -> Parser (Double -> EncodingParameters)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser EncoderProfile
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"encoderProfile")
Parser (Double -> EncodingParameters)
-> Parser Double -> Parser EncodingParameters
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Double
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"compressionFactor")
)
instance Prelude.Hashable EncodingParameters
instance Prelude.NFData EncodingParameters