{-# 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.AnalyzeIDDetections 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.NormalizedValue
data AnalyzeIDDetections = AnalyzeIDDetections'
{
AnalyzeIDDetections -> Maybe Double
confidence :: Prelude.Maybe Prelude.Double,
AnalyzeIDDetections -> Maybe NormalizedValue
normalizedValue :: Prelude.Maybe NormalizedValue,
AnalyzeIDDetections -> Text
text :: Prelude.Text
}
deriving (AnalyzeIDDetections -> AnalyzeIDDetections -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnalyzeIDDetections -> AnalyzeIDDetections -> Bool
$c/= :: AnalyzeIDDetections -> AnalyzeIDDetections -> Bool
== :: AnalyzeIDDetections -> AnalyzeIDDetections -> Bool
$c== :: AnalyzeIDDetections -> AnalyzeIDDetections -> Bool
Prelude.Eq, ReadPrec [AnalyzeIDDetections]
ReadPrec AnalyzeIDDetections
Int -> ReadS AnalyzeIDDetections
ReadS [AnalyzeIDDetections]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnalyzeIDDetections]
$creadListPrec :: ReadPrec [AnalyzeIDDetections]
readPrec :: ReadPrec AnalyzeIDDetections
$creadPrec :: ReadPrec AnalyzeIDDetections
readList :: ReadS [AnalyzeIDDetections]
$creadList :: ReadS [AnalyzeIDDetections]
readsPrec :: Int -> ReadS AnalyzeIDDetections
$creadsPrec :: Int -> ReadS AnalyzeIDDetections
Prelude.Read, Int -> AnalyzeIDDetections -> ShowS
[AnalyzeIDDetections] -> ShowS
AnalyzeIDDetections -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnalyzeIDDetections] -> ShowS
$cshowList :: [AnalyzeIDDetections] -> ShowS
show :: AnalyzeIDDetections -> String
$cshow :: AnalyzeIDDetections -> String
showsPrec :: Int -> AnalyzeIDDetections -> ShowS
$cshowsPrec :: Int -> AnalyzeIDDetections -> ShowS
Prelude.Show, forall x. Rep AnalyzeIDDetections x -> AnalyzeIDDetections
forall x. AnalyzeIDDetections -> Rep AnalyzeIDDetections x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AnalyzeIDDetections x -> AnalyzeIDDetections
$cfrom :: forall x. AnalyzeIDDetections -> Rep AnalyzeIDDetections x
Prelude.Generic)
newAnalyzeIDDetections ::
Prelude.Text ->
AnalyzeIDDetections
newAnalyzeIDDetections :: Text -> AnalyzeIDDetections
newAnalyzeIDDetections Text
pText_ =
AnalyzeIDDetections'
{ $sel:confidence:AnalyzeIDDetections' :: Maybe Double
confidence = forall a. Maybe a
Prelude.Nothing,
$sel:normalizedValue:AnalyzeIDDetections' :: Maybe NormalizedValue
normalizedValue = forall a. Maybe a
Prelude.Nothing,
$sel:text:AnalyzeIDDetections' :: Text
text = Text
pText_
}
analyzeIDDetections_confidence :: Lens.Lens' AnalyzeIDDetections (Prelude.Maybe Prelude.Double)
analyzeIDDetections_confidence :: Lens' AnalyzeIDDetections (Maybe Double)
analyzeIDDetections_confidence = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeIDDetections' {Maybe Double
confidence :: Maybe Double
$sel:confidence:AnalyzeIDDetections' :: AnalyzeIDDetections -> Maybe Double
confidence} -> Maybe Double
confidence) (\s :: AnalyzeIDDetections
s@AnalyzeIDDetections' {} Maybe Double
a -> AnalyzeIDDetections
s {$sel:confidence:AnalyzeIDDetections' :: Maybe Double
confidence = Maybe Double
a} :: AnalyzeIDDetections)
analyzeIDDetections_normalizedValue :: Lens.Lens' AnalyzeIDDetections (Prelude.Maybe NormalizedValue)
analyzeIDDetections_normalizedValue :: Lens' AnalyzeIDDetections (Maybe NormalizedValue)
analyzeIDDetections_normalizedValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeIDDetections' {Maybe NormalizedValue
normalizedValue :: Maybe NormalizedValue
$sel:normalizedValue:AnalyzeIDDetections' :: AnalyzeIDDetections -> Maybe NormalizedValue
normalizedValue} -> Maybe NormalizedValue
normalizedValue) (\s :: AnalyzeIDDetections
s@AnalyzeIDDetections' {} Maybe NormalizedValue
a -> AnalyzeIDDetections
s {$sel:normalizedValue:AnalyzeIDDetections' :: Maybe NormalizedValue
normalizedValue = Maybe NormalizedValue
a} :: AnalyzeIDDetections)
analyzeIDDetections_text :: Lens.Lens' AnalyzeIDDetections Prelude.Text
analyzeIDDetections_text :: Lens' AnalyzeIDDetections Text
analyzeIDDetections_text = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeIDDetections' {Text
text :: Text
$sel:text:AnalyzeIDDetections' :: AnalyzeIDDetections -> Text
text} -> Text
text) (\s :: AnalyzeIDDetections
s@AnalyzeIDDetections' {} Text
a -> AnalyzeIDDetections
s {$sel:text:AnalyzeIDDetections' :: Text
text = Text
a} :: AnalyzeIDDetections)
instance Data.FromJSON AnalyzeIDDetections where
parseJSON :: Value -> Parser AnalyzeIDDetections
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AnalyzeIDDetections"
( \Object
x ->
Maybe Double
-> Maybe NormalizedValue -> Text -> AnalyzeIDDetections
AnalyzeIDDetections'
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
"NormalizedValue")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Text")
)
instance Prelude.Hashable AnalyzeIDDetections where
hashWithSalt :: Int -> AnalyzeIDDetections -> Int
hashWithSalt Int
_salt AnalyzeIDDetections' {Maybe Double
Maybe NormalizedValue
Text
text :: Text
normalizedValue :: Maybe NormalizedValue
confidence :: Maybe Double
$sel:text:AnalyzeIDDetections' :: AnalyzeIDDetections -> Text
$sel:normalizedValue:AnalyzeIDDetections' :: AnalyzeIDDetections -> Maybe NormalizedValue
$sel:confidence:AnalyzeIDDetections' :: AnalyzeIDDetections -> 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 NormalizedValue
normalizedValue
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
text
instance Prelude.NFData AnalyzeIDDetections where
rnf :: AnalyzeIDDetections -> ()
rnf AnalyzeIDDetections' {Maybe Double
Maybe NormalizedValue
Text
text :: Text
normalizedValue :: Maybe NormalizedValue
confidence :: Maybe Double
$sel:text:AnalyzeIDDetections' :: AnalyzeIDDetections -> Text
$sel:normalizedValue:AnalyzeIDDetections' :: AnalyzeIDDetections -> Maybe NormalizedValue
$sel:confidence:AnalyzeIDDetections' :: AnalyzeIDDetections -> 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 NormalizedValue
normalizedValue
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
text