{-# 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.EncodingParametersRequest 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 EncodingParametersRequest = EncodingParametersRequest'
{
EncodingParametersRequest -> EncoderProfile
encoderProfile :: EncoderProfile,
EncodingParametersRequest -> Double
compressionFactor :: Prelude.Double
}
deriving (EncodingParametersRequest -> EncodingParametersRequest -> Bool
(EncodingParametersRequest -> EncodingParametersRequest -> Bool)
-> (EncodingParametersRequest -> EncodingParametersRequest -> Bool)
-> Eq EncodingParametersRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EncodingParametersRequest -> EncodingParametersRequest -> Bool
$c/= :: EncodingParametersRequest -> EncodingParametersRequest -> Bool
== :: EncodingParametersRequest -> EncodingParametersRequest -> Bool
$c== :: EncodingParametersRequest -> EncodingParametersRequest -> Bool
Prelude.Eq, ReadPrec [EncodingParametersRequest]
ReadPrec EncodingParametersRequest
Int -> ReadS EncodingParametersRequest
ReadS [EncodingParametersRequest]
(Int -> ReadS EncodingParametersRequest)
-> ReadS [EncodingParametersRequest]
-> ReadPrec EncodingParametersRequest
-> ReadPrec [EncodingParametersRequest]
-> Read EncodingParametersRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EncodingParametersRequest]
$creadListPrec :: ReadPrec [EncodingParametersRequest]
readPrec :: ReadPrec EncodingParametersRequest
$creadPrec :: ReadPrec EncodingParametersRequest
readList :: ReadS [EncodingParametersRequest]
$creadList :: ReadS [EncodingParametersRequest]
readsPrec :: Int -> ReadS EncodingParametersRequest
$creadsPrec :: Int -> ReadS EncodingParametersRequest
Prelude.Read, Int -> EncodingParametersRequest -> ShowS
[EncodingParametersRequest] -> ShowS
EncodingParametersRequest -> String
(Int -> EncodingParametersRequest -> ShowS)
-> (EncodingParametersRequest -> String)
-> ([EncodingParametersRequest] -> ShowS)
-> Show EncodingParametersRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EncodingParametersRequest] -> ShowS
$cshowList :: [EncodingParametersRequest] -> ShowS
show :: EncodingParametersRequest -> String
$cshow :: EncodingParametersRequest -> String
showsPrec :: Int -> EncodingParametersRequest -> ShowS
$cshowsPrec :: Int -> EncodingParametersRequest -> ShowS
Prelude.Show, (forall x.
EncodingParametersRequest -> Rep EncodingParametersRequest x)
-> (forall x.
Rep EncodingParametersRequest x -> EncodingParametersRequest)
-> Generic EncodingParametersRequest
forall x.
Rep EncodingParametersRequest x -> EncodingParametersRequest
forall x.
EncodingParametersRequest -> Rep EncodingParametersRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EncodingParametersRequest x -> EncodingParametersRequest
$cfrom :: forall x.
EncodingParametersRequest -> Rep EncodingParametersRequest x
Prelude.Generic)
newEncodingParametersRequest ::
EncoderProfile ->
Prelude.Double ->
EncodingParametersRequest
newEncodingParametersRequest :: EncoderProfile -> Double -> EncodingParametersRequest
newEncodingParametersRequest
EncoderProfile
pEncoderProfile_
Double
pCompressionFactor_ =
EncodingParametersRequest' :: EncoderProfile -> Double -> EncodingParametersRequest
EncodingParametersRequest'
{ $sel:encoderProfile:EncodingParametersRequest' :: EncoderProfile
encoderProfile =
EncoderProfile
pEncoderProfile_,
$sel:compressionFactor:EncodingParametersRequest' :: Double
compressionFactor = Double
pCompressionFactor_
}
encodingParametersRequest_encoderProfile :: Lens.Lens' EncodingParametersRequest EncoderProfile
encodingParametersRequest_encoderProfile :: (EncoderProfile -> f EncoderProfile)
-> EncodingParametersRequest -> f EncodingParametersRequest
encodingParametersRequest_encoderProfile = (EncodingParametersRequest -> EncoderProfile)
-> (EncodingParametersRequest
-> EncoderProfile -> EncodingParametersRequest)
-> Lens
EncodingParametersRequest
EncodingParametersRequest
EncoderProfile
EncoderProfile
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncodingParametersRequest' {EncoderProfile
encoderProfile :: EncoderProfile
$sel:encoderProfile:EncodingParametersRequest' :: EncodingParametersRequest -> EncoderProfile
encoderProfile} -> EncoderProfile
encoderProfile) (\s :: EncodingParametersRequest
s@EncodingParametersRequest' {} EncoderProfile
a -> EncodingParametersRequest
s {$sel:encoderProfile:EncodingParametersRequest' :: EncoderProfile
encoderProfile = EncoderProfile
a} :: EncodingParametersRequest)
encodingParametersRequest_compressionFactor :: Lens.Lens' EncodingParametersRequest Prelude.Double
encodingParametersRequest_compressionFactor :: (Double -> f Double)
-> EncodingParametersRequest -> f EncodingParametersRequest
encodingParametersRequest_compressionFactor = (EncodingParametersRequest -> Double)
-> (EncodingParametersRequest
-> Double -> EncodingParametersRequest)
-> Lens
EncodingParametersRequest EncodingParametersRequest Double Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EncodingParametersRequest' {Double
compressionFactor :: Double
$sel:compressionFactor:EncodingParametersRequest' :: EncodingParametersRequest -> Double
compressionFactor} -> Double
compressionFactor) (\s :: EncodingParametersRequest
s@EncodingParametersRequest' {} Double
a -> EncodingParametersRequest
s {$sel:compressionFactor:EncodingParametersRequest' :: Double
compressionFactor = Double
a} :: EncodingParametersRequest)
instance Prelude.Hashable EncodingParametersRequest
instance Prelude.NFData EncodingParametersRequest
instance Core.ToJSON EncodingParametersRequest where
toJSON :: EncodingParametersRequest -> Value
toJSON EncodingParametersRequest' {Double
EncoderProfile
compressionFactor :: Double
encoderProfile :: EncoderProfile
$sel:compressionFactor:EncodingParametersRequest' :: EncodingParametersRequest -> Double
$sel:encoderProfile:EncodingParametersRequest' :: EncodingParametersRequest -> EncoderProfile
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"encoderProfile" Text -> EncoderProfile -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= EncoderProfile
encoderProfile),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"compressionFactor" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Double
compressionFactor)
]
)