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