{-# 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.DetectedSignature 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
data DetectedSignature = DetectedSignature'
{
DetectedSignature -> Maybe Natural
page :: Prelude.Maybe Prelude.Natural
}
deriving (DetectedSignature -> DetectedSignature -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectedSignature -> DetectedSignature -> Bool
$c/= :: DetectedSignature -> DetectedSignature -> Bool
== :: DetectedSignature -> DetectedSignature -> Bool
$c== :: DetectedSignature -> DetectedSignature -> Bool
Prelude.Eq, ReadPrec [DetectedSignature]
ReadPrec DetectedSignature
Int -> ReadS DetectedSignature
ReadS [DetectedSignature]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectedSignature]
$creadListPrec :: ReadPrec [DetectedSignature]
readPrec :: ReadPrec DetectedSignature
$creadPrec :: ReadPrec DetectedSignature
readList :: ReadS [DetectedSignature]
$creadList :: ReadS [DetectedSignature]
readsPrec :: Int -> ReadS DetectedSignature
$creadsPrec :: Int -> ReadS DetectedSignature
Prelude.Read, Int -> DetectedSignature -> ShowS
[DetectedSignature] -> ShowS
DetectedSignature -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectedSignature] -> ShowS
$cshowList :: [DetectedSignature] -> ShowS
show :: DetectedSignature -> String
$cshow :: DetectedSignature -> String
showsPrec :: Int -> DetectedSignature -> ShowS
$cshowsPrec :: Int -> DetectedSignature -> ShowS
Prelude.Show, forall x. Rep DetectedSignature x -> DetectedSignature
forall x. DetectedSignature -> Rep DetectedSignature x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DetectedSignature x -> DetectedSignature
$cfrom :: forall x. DetectedSignature -> Rep DetectedSignature x
Prelude.Generic)
newDetectedSignature ::
DetectedSignature
newDetectedSignature :: DetectedSignature
newDetectedSignature =
DetectedSignature' {$sel:page:DetectedSignature' :: Maybe Natural
page = forall a. Maybe a
Prelude.Nothing}
detectedSignature_page :: Lens.Lens' DetectedSignature (Prelude.Maybe Prelude.Natural)
detectedSignature_page :: Lens' DetectedSignature (Maybe Natural)
detectedSignature_page = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectedSignature' {Maybe Natural
page :: Maybe Natural
$sel:page:DetectedSignature' :: DetectedSignature -> Maybe Natural
page} -> Maybe Natural
page) (\s :: DetectedSignature
s@DetectedSignature' {} Maybe Natural
a -> DetectedSignature
s {$sel:page:DetectedSignature' :: Maybe Natural
page = Maybe Natural
a} :: DetectedSignature)
instance Data.FromJSON DetectedSignature where
parseJSON :: Value -> Parser DetectedSignature
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DetectedSignature"
( \Object
x ->
Maybe Natural -> DetectedSignature
DetectedSignature' 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
"Page")
)
instance Prelude.Hashable DetectedSignature where
hashWithSalt :: Int -> DetectedSignature -> Int
hashWithSalt Int
_salt DetectedSignature' {Maybe Natural
page :: Maybe Natural
$sel:page:DetectedSignature' :: DetectedSignature -> Maybe Natural
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
page
instance Prelude.NFData DetectedSignature where
rnf :: DetectedSignature -> ()
rnf DetectedSignature' {Maybe Natural
page :: Maybe Natural
$sel:page:DetectedSignature' :: DetectedSignature -> Maybe Natural
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
page