{-# 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.Rekognition.Types.ImageQuality where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ImageQuality = ImageQuality'
{
ImageQuality -> Maybe Double
sharpness :: Prelude.Maybe Prelude.Double,
ImageQuality -> Maybe Double
brightness :: Prelude.Maybe Prelude.Double
}
deriving (ImageQuality -> ImageQuality -> Bool
(ImageQuality -> ImageQuality -> Bool)
-> (ImageQuality -> ImageQuality -> Bool) -> Eq ImageQuality
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageQuality -> ImageQuality -> Bool
$c/= :: ImageQuality -> ImageQuality -> Bool
== :: ImageQuality -> ImageQuality -> Bool
$c== :: ImageQuality -> ImageQuality -> Bool
Prelude.Eq, ReadPrec [ImageQuality]
ReadPrec ImageQuality
Int -> ReadS ImageQuality
ReadS [ImageQuality]
(Int -> ReadS ImageQuality)
-> ReadS [ImageQuality]
-> ReadPrec ImageQuality
-> ReadPrec [ImageQuality]
-> Read ImageQuality
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImageQuality]
$creadListPrec :: ReadPrec [ImageQuality]
readPrec :: ReadPrec ImageQuality
$creadPrec :: ReadPrec ImageQuality
readList :: ReadS [ImageQuality]
$creadList :: ReadS [ImageQuality]
readsPrec :: Int -> ReadS ImageQuality
$creadsPrec :: Int -> ReadS ImageQuality
Prelude.Read, Int -> ImageQuality -> ShowS
[ImageQuality] -> ShowS
ImageQuality -> String
(Int -> ImageQuality -> ShowS)
-> (ImageQuality -> String)
-> ([ImageQuality] -> ShowS)
-> Show ImageQuality
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImageQuality] -> ShowS
$cshowList :: [ImageQuality] -> ShowS
show :: ImageQuality -> String
$cshow :: ImageQuality -> String
showsPrec :: Int -> ImageQuality -> ShowS
$cshowsPrec :: Int -> ImageQuality -> ShowS
Prelude.Show, (forall x. ImageQuality -> Rep ImageQuality x)
-> (forall x. Rep ImageQuality x -> ImageQuality)
-> Generic ImageQuality
forall x. Rep ImageQuality x -> ImageQuality
forall x. ImageQuality -> Rep ImageQuality x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImageQuality x -> ImageQuality
$cfrom :: forall x. ImageQuality -> Rep ImageQuality x
Prelude.Generic)
newImageQuality ::
ImageQuality
newImageQuality :: ImageQuality
newImageQuality =
ImageQuality' :: Maybe Double -> Maybe Double -> ImageQuality
ImageQuality'
{ $sel:sharpness:ImageQuality' :: Maybe Double
sharpness = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:brightness:ImageQuality' :: Maybe Double
brightness = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
imageQuality_sharpness :: Lens.Lens' ImageQuality (Prelude.Maybe Prelude.Double)
imageQuality_sharpness :: (Maybe Double -> f (Maybe Double))
-> ImageQuality -> f ImageQuality
imageQuality_sharpness = (ImageQuality -> Maybe Double)
-> (ImageQuality -> Maybe Double -> ImageQuality)
-> Lens ImageQuality ImageQuality (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageQuality' {Maybe Double
sharpness :: Maybe Double
$sel:sharpness:ImageQuality' :: ImageQuality -> Maybe Double
sharpness} -> Maybe Double
sharpness) (\s :: ImageQuality
s@ImageQuality' {} Maybe Double
a -> ImageQuality
s {$sel:sharpness:ImageQuality' :: Maybe Double
sharpness = Maybe Double
a} :: ImageQuality)
imageQuality_brightness :: Lens.Lens' ImageQuality (Prelude.Maybe Prelude.Double)
imageQuality_brightness :: (Maybe Double -> f (Maybe Double))
-> ImageQuality -> f ImageQuality
imageQuality_brightness = (ImageQuality -> Maybe Double)
-> (ImageQuality -> Maybe Double -> ImageQuality)
-> Lens ImageQuality ImageQuality (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageQuality' {Maybe Double
brightness :: Maybe Double
$sel:brightness:ImageQuality' :: ImageQuality -> Maybe Double
brightness} -> Maybe Double
brightness) (\s :: ImageQuality
s@ImageQuality' {} Maybe Double
a -> ImageQuality
s {$sel:brightness:ImageQuality' :: Maybe Double
brightness = Maybe Double
a} :: ImageQuality)
instance Core.FromJSON ImageQuality where
parseJSON :: Value -> Parser ImageQuality
parseJSON =
String
-> (Object -> Parser ImageQuality) -> Value -> Parser ImageQuality
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ImageQuality"
( \Object
x ->
Maybe Double -> Maybe Double -> ImageQuality
ImageQuality'
(Maybe Double -> Maybe Double -> ImageQuality)
-> Parser (Maybe Double) -> Parser (Maybe Double -> ImageQuality)
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
"Sharpness")
Parser (Maybe Double -> ImageQuality)
-> Parser (Maybe Double) -> Parser ImageQuality
forall (f :: * -> *) a b. Applicative f => 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
"Brightness")
)
instance Prelude.Hashable ImageQuality
instance Prelude.NFData ImageQuality