{-# 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.Textract.Types.SignatureDetection where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Textract.Types.Geometry
data SignatureDetection = SignatureDetection'
{
SignatureDetection -> Maybe Double
confidence :: Prelude.Maybe Prelude.Double,
SignatureDetection -> Maybe Geometry
geometry :: Prelude.Maybe Geometry
}
deriving (SignatureDetection -> SignatureDetection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureDetection -> SignatureDetection -> Bool
$c/= :: SignatureDetection -> SignatureDetection -> Bool
== :: SignatureDetection -> SignatureDetection -> Bool
$c== :: SignatureDetection -> SignatureDetection -> Bool
Prelude.Eq, ReadPrec [SignatureDetection]
ReadPrec SignatureDetection
Int -> ReadS SignatureDetection
ReadS [SignatureDetection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignatureDetection]
$creadListPrec :: ReadPrec [SignatureDetection]
readPrec :: ReadPrec SignatureDetection
$creadPrec :: ReadPrec SignatureDetection
readList :: ReadS [SignatureDetection]
$creadList :: ReadS [SignatureDetection]
readsPrec :: Int -> ReadS SignatureDetection
$creadsPrec :: Int -> ReadS SignatureDetection
Prelude.Read, Int -> SignatureDetection -> ShowS
[SignatureDetection] -> ShowS
SignatureDetection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureDetection] -> ShowS
$cshowList :: [SignatureDetection] -> ShowS
show :: SignatureDetection -> String
$cshow :: SignatureDetection -> String
showsPrec :: Int -> SignatureDetection -> ShowS
$cshowsPrec :: Int -> SignatureDetection -> ShowS
Prelude.Show, forall x. Rep SignatureDetection x -> SignatureDetection
forall x. SignatureDetection -> Rep SignatureDetection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SignatureDetection x -> SignatureDetection
$cfrom :: forall x. SignatureDetection -> Rep SignatureDetection x
Prelude.Generic)
newSignatureDetection ::
SignatureDetection
newSignatureDetection :: SignatureDetection
newSignatureDetection =
SignatureDetection'
{ $sel:confidence:SignatureDetection' :: Maybe Double
confidence = forall a. Maybe a
Prelude.Nothing,
$sel:geometry:SignatureDetection' :: Maybe Geometry
geometry = forall a. Maybe a
Prelude.Nothing
}
signatureDetection_confidence :: Lens.Lens' SignatureDetection (Prelude.Maybe Prelude.Double)
signatureDetection_confidence :: Lens' SignatureDetection (Maybe Double)
signatureDetection_confidence = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignatureDetection' {Maybe Double
confidence :: Maybe Double
$sel:confidence:SignatureDetection' :: SignatureDetection -> Maybe Double
confidence} -> Maybe Double
confidence) (\s :: SignatureDetection
s@SignatureDetection' {} Maybe Double
a -> SignatureDetection
s {$sel:confidence:SignatureDetection' :: Maybe Double
confidence = Maybe Double
a} :: SignatureDetection)
signatureDetection_geometry :: Lens.Lens' SignatureDetection (Prelude.Maybe Geometry)
signatureDetection_geometry :: Lens' SignatureDetection (Maybe Geometry)
signatureDetection_geometry = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignatureDetection' {Maybe Geometry
geometry :: Maybe Geometry
$sel:geometry:SignatureDetection' :: SignatureDetection -> Maybe Geometry
geometry} -> Maybe Geometry
geometry) (\s :: SignatureDetection
s@SignatureDetection' {} Maybe Geometry
a -> SignatureDetection
s {$sel:geometry:SignatureDetection' :: Maybe Geometry
geometry = Maybe Geometry
a} :: SignatureDetection)
instance Data.FromJSON SignatureDetection where
parseJSON :: Value -> Parser SignatureDetection
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SignatureDetection"
( \Object
x ->
Maybe Double -> Maybe Geometry -> SignatureDetection
SignatureDetection'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Confidence")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Geometry")
)
instance Prelude.Hashable SignatureDetection where
hashWithSalt :: Int -> SignatureDetection -> Int
hashWithSalt Int
_salt SignatureDetection' {Maybe Double
Maybe Geometry
geometry :: Maybe Geometry
confidence :: Maybe Double
$sel:geometry:SignatureDetection' :: SignatureDetection -> Maybe Geometry
$sel:confidence:SignatureDetection' :: SignatureDetection -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
confidence
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Geometry
geometry
instance Prelude.NFData SignatureDetection where
rnf :: SignatureDetection -> ()
rnf SignatureDetection' {Maybe Double
Maybe Geometry
geometry :: Maybe Geometry
confidence :: Maybe Double
$sel:geometry:SignatureDetection' :: SignatureDetection -> Maybe Geometry
$sel:confidence:SignatureDetection' :: SignatureDetection -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
confidence
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Geometry
geometry